Difference between revisions of "Command an NPC/Creature to Attack"
Command an NPC/Creature to Attack (edit)
Revision as of 07:01, 24 December 2009
, 07:01, 24 December 2009→Create the Object script for your NPC
imported>Phinix |
imported>Phinix |
||
Line 99: | Line 99: | ||
set activestat to 0 | set activestat to 0 | ||
elseif button == 1 | elseif button == 1 | ||
set timer to 1.5 | |||
set globalvar1 to 2 | set globalvar1 to 2 | ||
set activestat to 0 | set activestat to 0 | ||
Line 105: | Line 106: | ||
endif | endif | ||
endif | endif | ||
endif | endif | ||
if globalvar1 == 2 | if globalvar1 == 2 | ||
if | if timer == 0 | ||
set globalvar1 to 0 | |||
elseif timer > 0 | |||
set timer to timer - getSecondsPassed | |||
StopCombatAlarmOnActor | |||
elseif timer < 0 | |||
set timer to 0 | |||
endif | |||
endif | endif | ||
end | end |