SetWeaponState
Posted: Sun Jun 10, 2012 10:04 am
SetWeaponState(who, str statename[, bool exact], interrupt);
- who: Set to 1 to affect all players, 0 for just the one who activated the special.
- interrupt: Decides whether to allow interrupting. Set to 1 to always interrupt the current state, no matter what state it is in. 0 will only change states if in a Ready state.
Forces player(s) weapons to enter a specified state, as defined in Decorate. The "exact" parameter is the same as SetActorState's "exact".
Helpful for creating dynamic effects with weapons, such as; level specific weapon effects, scripted first person scenes and gestures (Seen in games like Condemned and Battlefield 3), and easier set-up for returns from hitting an enemy. Example of how it is currently done: In Brutal Doom, the player hits an enemy, the enemy goes to a special pain state and give the player an item, the weapon checks if it has the item then A_Jumps the the correct state; I.e: fatalities and stealth kills in B.D. How it could be done: The player hits an enemy, the enemy goes to a special pain state which activates the script and sets the weapon state automatically.
- who: Set to 1 to affect all players, 0 for just the one who activated the special.
- interrupt: Decides whether to allow interrupting. Set to 1 to always interrupt the current state, no matter what state it is in. 0 will only change states if in a Ready state.
Forces player(s) weapons to enter a specified state, as defined in Decorate. The "exact" parameter is the same as SetActorState's "exact".
Helpful for creating dynamic effects with weapons, such as; level specific weapon effects, scripted first person scenes and gestures (Seen in games like Condemned and Battlefield 3), and easier set-up for returns from hitting an enemy. Example of how it is currently done: In Brutal Doom, the player hits an enemy, the enemy goes to a special pain state and give the player an item, the weapon checks if it has the item then A_Jumps the the correct state; I.e: fatalities and stealth kills in B.D. How it could be done: The player hits an enemy, the enemy goes to a special pain state which activates the script and sets the weapon state automatically.