PDA

View Full Version : ennemie inocent



Jedi Nizar
10-16-2000, 02:55 AM
hi, can someone tell me how i can make that the ennemies don't open the fire only if I shoot the first?

------------------
May The Force Be With You

mailto:jedi_nizar@yahoo.comjedi_nizar@yahoo.com</A>

Home Page: The Art of a Jedi (http://fan.starwars.com/TheArtofaJEDI/jediart.html)

SDA_Lakuti
10-17-2000, 08:57 AM
I have an idea.. but not sure exactly how to script it...


alright.. set a civilian, with the desired 3do/pup/snd all that stuff... then you make a second guy same 3do/pup/snd that is armed and ready to kill.. now you set the cog on the civilian.. so if he is damaged, then he will be deleted and turned into the bad guy...


any scripters wanan tell him how to do that? i am not very good with cogs myself..

------------------
SDÅ_Lªkútí

Fardreamer
10-17-2000, 11:31 AM
Erm, no. If it's JK, open the enemy's AI file and set the alignment (in the header section) to 0. Then take the original ai and rename it to something else. Next open his cog, add a damaged: message, and an ai to the symbols section, and insert the line of code: AiSetClass(thing, newai) in the damaged message. You could add some validity checks to make sure the player was the aggressor.

Here's what I mean:


symbols
ai enemyai=whatever.ai //the original AI file (unmodified)
thing enemy
thing player
message damaged
//add the above to the symbols section
//of the thing's template cog
...
end

code
damaged:
AiSetClass(enemy, enemyai);
...
Return;
...
end