Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Xegethra

Stuck on giving actor a third fire state.

Recommended Posts

Hello,

So I'm stuck again. I can't figure out how to make a third fire state, or use another state as that.

The weapon is a set of fists, a light punch and a heavy one which all works but I want to add in a block mechanism too, which I can half do. I have made the sprites for it, and I can call up the state using alt fire but not as I want it to be. I can place it in instead of heavy punch, which is fire2. Or I can use A_Jump and have the block and punch activate randomly in combat...which isn't ideal.

So far my code looks like this without the third intended state accessible.

Spoiler

States
{
Ready:
PUNG A 1 A_WeaponReady
Loop
Deselect:
PUNG A 1 A_Lower
Loop
Select:
PUNG A 1 A_Raise
Loop
Fire:
PUNG B 3 A_PlaySound ("PFIST/PSWNG2")
PUNG C 3
PUNG D 4 A_CustomPunch (2, 0, 0, 0, 0, 0, 0, 0, "PFIST/PLGHHIT")
PUNG C 3
PUNG B 4 A_ReFire
Goto Ready
ALTFIRE:
PUNG A 0 A_Jump (256, "Fire2")
Fire2:
PUNH B 8 A_PlaySound ("PFIST/PSWNG1")
PUNH C 8
PUNH D 10 A_CustomPunch (6, 0, 0, 0, 0, 0, 0, 0, "PFIST/PHVYHIT")
PUNH C 8
PUNH B 10 A_ReFire
Goto Ready
Melee: *The state I intend to use as the block*
BLCK A 4
BLCK A 4
BLCK B 4 A_PlaySound ("PFIST/PSWNG2")
BLCK C 50
BLCK D 4
BLCK E 4 A_ReFire
GoTo Ready

And here is my attempt to get it called upon, but it does chooses randomly the block or punch.
Spoiler

States
{
Ready:
PUNG A 1 A_WeaponReady
Loop
Deselect:
PUNG A 1 A_Lower
Loop
Select:
PUNG A 1 A_Raise
Loop
Fire:
PUNG B 3 A_PlaySound ("PFIST/PSWNG2")
PUNG C 3
PUNG D 4 A_CustomPunch (2, 0, 0, 0, 0, 0, 0, 0, "PFIST/PLGHHIT")
PUNG C 3
PUNG B 4 A_ReFire
Goto Ready
ALTFIRE:
PUNG A 0 A_Jump (256, "Fire2", "Melee")
Fire2:
PUNH B 8 A_PlaySound ("PFIST/PSWNG1")
PUNH C 8
PUNH D 10 A_CustomPunch (6, 0, 0, 0, 0, 0, 0, 0, "PFIST/PHVYHIT")
PUNH C 8
PUNH B 10 A_ReFire
Goto Ready
Melee:
BLCK A 4
BLCK A 4
BLCK B 4 A_PlaySound ("PFIST/PSWNG2")
BLCK C 50
BLCK D 4
BLCK E 4 A_ReFire
GoTo Ready

I've tried all sorts of solutions, from making the block a whole new weapon to be called and used instantly by key press, and any combination of this and that and stuff with ACS.

Any ideas would be great, I can't get my head around it.

Share this post


Link to post

Ahh yes thank you! It works, and with A_Setinvulnerable and A_Unsetinvulnerable the move actually blocks and then unlocks damage.

Thanks again!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×