Page 1 of 1

Checking for a Disguise Kit?

Posted: Fri Nov 30, 2007 6:18 pm
by authraw
Is it possible to check to see if the player is currently using the disguise kit? For example, if I were making a campaign map, how would I:
1. Make it so that the player can only capture cp4 while he/she has the disguise kit on?
2. Could I change AI goals whenever the player uses the disguise kit (and essentially make the AI not attack when the player is using the disguise kit?)
3. Is there a way to change the player's model (without any user input) during the game without using the disguise kit?

Re: Checking for a Disguise Kit?

Posted: Fri Nov 30, 2007 6:33 pm
by Maveritchell
Actually, if you make a weapon that just acts as a trigger, you can script in all the functions you want. For example (I like to use OnCharacterDispensePowerup), when a character activates a weapon, you can use SetClassProperty (this would unfortunately change all the units of the character's type, but it sounds like you're talking about a singleplayer campaign anyway) to change the mesh of the character to one with a transparent skin or a different mesh entirely.

Additionally, you can use the same trigger to set it up in the .lua so that (again, SetClassProperty - this time you're setting the property CapturePosts = "0" or "1") the unit only has the ability to capture command posts while the disguise is turned "on."

Re: Checking for a Disguise Kit?

Posted: Fri Nov 30, 2007 9:40 pm
by Ace_Azzameen_5
Mav, have you ever changed an entity's model mid game?!?!?!

If that doesn't work, then theres a way to kill the unit, (without losing points) and spawn them as a different type of unit (same stats, different look) exactly where they died. It would look like a slight flickering...

Re: Checking for a Disguise Kit?

Posted: Fri Nov 30, 2007 11:06 pm
by Maveritchell
Ace_Azzameen_5 wrote:Mav, have you ever changed an entity's model mid game?!?!?!
I would imagine it works, since that's the principle the disguise kit is based off of. So long as the skeleton stays the same, it should be ok, right?