SetWeaponState

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: SetWeaponState

Re: SetWeaponState

by Graf Zahl » Sun Jun 10, 2012 11:41 am

Sorry. but this can so easily screw up the player state that I wouldn't bother.

Re: SetWeaponState

by Ral22 » Sun Jun 10, 2012 10:15 am

ChronoSeth wrote:What would happen if the weapon is in the middle of a state sequence? Might be a good idea to add an argument which decides whether or not to interrupt the current sequence.
Good idea, Chrono Seth. Added.

Re: SetWeaponState

by ChronoSeth » Sun Jun 10, 2012 10:12 am

What would happen if the weapon is in the middle of a state sequence? Might be a good idea to add an argument which decides whether or not to interrupt the current sequence.

SetWeaponState

by Ral22 » 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.

Top