Difference between revisions of "Command an NPC/Creature to Attack"
Command an NPC/Creature to Attack (edit)
Revision as of 07:03, 24 December 2009
, 07:03, 24 December 2009→Create the Object script for your NPC
imported>Phinix |
imported>Phinix |
||
Line 91: | Line 91: | ||
end | end | ||
beginGameMode | |||
ifactivestat==2 | |||
setbuttontogetbuttonpressed | |||
ifbutton>-1 | |||
ifbutton==0 | |||
setglobalvar1to1 | |||
setactivestatto0 | |||
elseifbutton==1 | |||
settimerto1.5 | |||
setglobalvar1to2 | |||
setactivestatto0 | |||
elseifbutton==2 | |||
setactivestatto0 | |||
endif | endif | ||
endif | endif | ||
endif | endif | ||
ifglobalvar1==2 | |||
iftimer==0 | |||
setglobalvar1to0 | |||
elseiftimer>0 | |||
settimertotimer-getSecondsPassed | |||
StopCombatAlarmOnActor | |||
elseiftimer<0 | |||
settimerto0 | |||
endif | |||
endif | endif | ||
end | end |