Difference between revisions of "Running Scripts On Arrows"

42 bytes added ,  09:19, 12 October 2006
forgot gamemode block
imported>Scruggs
imported>Scruggs
(forgot gamemode block)
Line 18: Line 18:
float fQuestDelayTime ; controls processing speed of this script
float fQuestDelayTime ; controls processing speed of this script
short relocate ; set this to 1 when we need to call moveTo
short relocate ; set this to 1 when we need to call moveTo
begin gameMode


if ( fQuestDelayTime != 0.001 )
if ( fQuestDelayTime != 0.001 )
Line 50: Line 52:
else ; player has changed cells
else ; player has changed cells
set relocate to 1
set relocate to 1
endif</pre>
endif
 
end</pre>


Notice that the use of the '''relocate''' variable splits the movement from one cell to the next into four stages. This is to make sure that the trigger zone retains its collision properties after it is moved.
Notice that the use of the '''relocate''' variable splits the movement from one cell to the next into four stages. This is to make sure that the trigger zone retains its collision properties after it is moved.
Line 69: Line 73:
float fQuestDelayTime ; controls processing speed of this script
float fQuestDelayTime ; controls processing speed of this script
short relocate ; set this to 1 when we need to call moveTo
short relocate ; set this to 1 when we need to call moveTo
begin gameMode


if ( fQuestDelayTime != 0.001 )
if ( fQuestDelayTime != 0.001 )
Line 108: Line 114:
else ; player has changed cells
else ; player has changed cells
set relocate to 1
set relocate to 1
endif</pre>
endif
 
end</pre>


Here, [[GetScale]] returns the player's height as a proportion of the default racial height of 128. For the default height, we want the trigger zone placed 115 units above the player's feet when standing, and 95 units above when sneaking. Then we modify the offset to account for the player's vertical facing.
Here, [[GetScale]] returns the player's height as a proportion of the default racial height of 128. For the default height, we want the trigger zone placed 115 units above the player's feet when standing, and 95 units above when sneaking. Then we modify the offset to account for the player's vertical facing.
Anonymous user