That should be simple to do. As an example...Lysander wrote:How do I make a melee weapon that has several different animations and attacks when I press fire? Like, say, if I had four, there would be a 25% chance each would be called, so that when I press fire, it randomly does one of several of these attacks. Anyone?
Code: Select all
Actor MultiFist : Fist
{
States
{
Fire:
PUNG A 0 A_Jump(256,"Punch1","Punch2","Punch3","Punch4") //This should give an equal chance of jumping to any of the four states below.
Punch1:
PUNG B 4
PUNG C 4 A_Punch
PUNG D 5
PUNG C 4
PUNG B 5 A_ReFire
Goto Ready
Punch2:
PUNG B 4
PUNG C 4 A_Punch
PUNG D 5
PUNG C 4
PUNG B 5 A_ReFire
Goto Ready
Punch3:
PUNG B 4
PUNG C 4 A_Punch
PUNG D 5
PUNG C 4
PUNG B 5 A_ReFire
Goto Ready
Punch4:
PUNG B 4
PUNG C 4 A_Punch
PUNG D 5
PUNG C 4
PUNG B 5 A_ReFire
Goto Ready
}
}