Posted: Thu Aug 16, 2007 3:24 pm
Conspiracy theories don't need to hold water, just fools that believe them.
I finally got a chance to try this out, and it does work as you suggested. I've set up a stunnedAI.plist that brings the ship to a dead stop for 30 seconds or so, before exiting back to the previous AI and continuing on its merry way. A slightly more violent effect can be created by setting the speed to zero and doing performTumble, which leaves the ship flailing about on the spot with its engines still firing. I might use this effect for another rather more vindictive weapon.Arexack_Heretic wrote:One could set the AI of an NPC temporarily to an affectedByWeaponAI.plist, easy as far as I can see.Code: Select all
You would do it like this. Have weapon do: "performScriptedActionOnTarget: setAITo: affectedByWeaponAI.plist" and becomeExplosion or otherwise deactivate/vanish. The AI should have a bahaviour, a timer and exitAI when the timer is exceeded. The NPC returns to his previous AI, which may not be written with a RESTARTED message in mind, so it will just continue doing the last medhod called unless UPDATE message interrupts this. Failing this, the mindless state will continue untill some other input breaks the quo.
Does that work on the player as well? I wouldn't guess so, but I haven't tested it. Anyway, in my view every weapon should affect the player in the same way as the NPC's if used against him.Ramirez wrote:I finally got a chance to try this out, and it does work as you suggested. I've set up a stunnedAI.plist that brings the ship to a dead stop for 30 seconds or so, before exiting back to the previous AI and continuing on its merry way. A slightly more violent effect can be created by setting the speed to zero and doing performTumble, which leaves the ship flailing about on the spot with its engines still firing. I might use this effect for another rather more vindictive weapon.Arexack_Heretic wrote:One could set the AI of an NPC temporarily to an affectedByWeaponAI.plist, easy as far as I can see.Code: Select all
You would do it like this. Have weapon do: "performScriptedActionOnTarget: setAITo: affectedByWeaponAI.plist" and becomeExplosion or otherwise deactivate/vanish. The AI should have a bahaviour, a timer and exitAI when the timer is exceeded. The NPC returns to his previous AI, which may not be written with a RESTARTED message in mind, so it will just continue doing the last medhod called unless UPDATE message interrupts this. Failing this, the mindless state will continue untill some other input breaks the quo.