SphereCommunity
Create a moving item - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Create a moving item (/Thread-Create-a-moving-item)



Create a moving item - UltimaAku - 10-16-2014 10:25 PM

Hey there all!

Anyone know how to go about making an item that when created, it moves one space at a time in a direction then removes itself? trying to make good use of the boulder trap Tongue


RE: Create a moving item - Extreme - 10-16-2014 11:45 PM

Place it on ground and use TIMERD and @TIMER to do what you want.

TIMERD 1
ON=@TIMER
MOVE ...
TIMERD 1


RE: Create a moving item - UltimaAku - 10-17-2014 07:13 PM

Brilliant! thank you very much Smile

also, for those who wants to use this, i'll post one of them for the world Big Grin

[ITEMDEF i_boulder_1]
ID=i_trap_boulder
NAME=boulder trap
TYPE=t_normal
CATEGORY=Funhouse
SUBSECTION=Traps
DESCRIPTION=Boulder Trap 1

ON=@CREATE
ATTR=010
TIMERD 1

ON=@TIMER
IF (<MORE1>=60) ///Number of spaces it moves
REMOVE
RETURN 1 ///This must be here to stop the sphere decay errors
ELSE
MOVE -1 0 /// Directions North = 0 1 East = 1 0 South = 0 -1 West = -1 0
MORE1=<more1>+1
TIMERD 1
RETURN 1 ///This must be here to stop the sphere decay errors
ENDIF

ON=@STEP
SRC.DAMAGE=250