Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Enemy and Friend Cog
Enemy and Friend Cog
2002-06-22, 4:00 PM #1
In my level you disguise yourself as a stormtrooper. While you have the disguise on, stormtroopers will not attack you. When you take it off they will. But if you attack them while you have the suit on, then they will keep attacking you.

I don't think this is very hard to do, but I do have one question before I start writing it. How do I dynamically set if an actor is against me or an allie through cog?

------------------
Script Warehouse
The Jedi's Saber
2002-06-22, 4:03 PM #2
Its all in the AI file. Just fun an array through all of the objects in a levels, looking for enemy stormtroopers. When found, change its AI to something non-volatile and back.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-06-22, 5:16 PM #3
So I'll have to replace the friendly stormtrooper with a mean one through cog?

------------------
Script Warehouse
The Jedi's Saber
2002-06-23, 1:03 AM #4
Code:
For(I=0;I<=Getthingcount();I=I+1) If(Getthingtemplate(I) == Troop_type) AIsetclass(I, New_AI);


A loop to change every enemy of a specific template to a new AI file.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-06-23, 5:14 PM #5
Thanks. [http://forums.massassi.net/html/biggrin.gif]


One more question (as of now) what message should I use?

------------------
Script Warehouse
The Jedi's Saber
2002-06-24, 4:49 AM #6
Code:
Startup:
Sleep(.5);
For(I=0;I<=Getthingcount();I=I+1) If(Getthingtemplate(I) == Troop_type) { Capturething(I); AIsetclass(I, Gentle_AI); }
Stop;

Damaged:
If(Getthingparent(Getsourceref()) != Player || AImad) Stop;
AImad=1;  //AImad is an int, make it 0 and local.
For(I=0;I<=Getthingcount();I=I+1) If(Getthingtemplate(I) == Troop_type) AIsetclass(I, Mad_AI);
Stop;



I have no idea how you are handling the 'removal' of the stormie outfit, but add something similar to the second array to that action.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-06-24, 10:44 AM #7
All I did was edit the Tuskan Clothing cogs to display differant text and change the template.

Thanks. [http://forums.massassi.net/html/smile.gif]

------------------
Script Warehouse
The Jedi's Saber

↑ Up to the top!