P3D-Legacy/P3D/Content/Data/Scripts/dungeon/crackfloors.dat

29 lines
1.8 KiB
Plaintext

version=2
@storage.clear
@storage.set(integer,crackID,<math.int(<player.position(z)>*20+<player.position(x)>)>)
:if:<register.registered(dungeoncrackedice<storage.get(integer,crackID)>)>=True
@sound.play(ice_break)
@level.wait(20)
@player.warp(dungeon\2\4.dat,~,3.1,~)
@level.update
@player.setmovement(0,-3,0)
@player.move(1)
@sound.play(destroy)
:end
:endif
@sound.play(ice_crack)
@entity.setvisible(<storage.get(integer,crackID)>,1)
@register.unregister(dungeonuncrackfloor)
@register.register(dungeoncrackedice<storage.get(integer,crackID)>)
:if:<register.registered(dungeoncrackedicecount)>=False
@register.register(dungeoncrackedicecount,int,0)
:endif
@register.change(dungeoncrackedicecount,<register.value(dungeoncrackedicecount)>+1)
:if:<register.value(dungeoncrackedicecount)>=100
@entity.remove(140)
@sound.play(destroy)
:endif
:if:<player.position>=9,0,-2
@entity.remove(140)
:endif
:end