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?
Checking for a Disguise Kit?
Moderator: Moderators
- authraw
- 1st Lieutenant

- Posts: 445
- Joined: Mon Jun 26, 2006 3:45 pm
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Checking for a Disguise Kit?
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."
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."
-
Ace_Azzameen_5
- Jedi

- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Checking for a Disguise Kit?
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...
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...
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Checking for a Disguise Kit?
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?Ace_Azzameen_5 wrote:Mav, have you ever changed an entity's model mid game?!?!?!
