i'm trying to make a weapon that you need to charge to fire,
this is my plan in this pseudo-decorate:
Code: Select all
States
{
Fire:
// Weapon loading sequence
// if the fire button is not pressed, it passes to a specific ending state
Goto Ready
Hold:
// the weapon is ready to fire and launches a custom missile when it's not pressed
Goto Ready
Ending State:
// normal weapon end sequence
Goto Ready
}
But if it isn't, the bar goes back to the original state (like this)
[>>>>>>>_____]
(fire button released)
[<<<<<<______]
Actually have this
Code: Select all
States
{
Ready:
XXXX A 1 A_WeaponReady
Loop
Deselect:
XXXX A 1 A_Lower
Loop
Select:
TNT1 A 0 A_TakeInventory("Abort",999)
XXXX A 1 A_Raise
Loop
Fire:
TNT1 A 0 A_JumpIfInventory("Abort",1,11)
NULL A 0 A_GiveInventory("Abort",1)
YYYY A 4
YYYY B 4 A_JumpIfInventory("Abort",11,"D1")
YYYY C 4 A_JumpIfInventory("Abort",10,"D2")
YYYY D 4 A_JumpIfInventory("Abort",9,"D3")
...
YYYY N 4 A_JumpIfInventory("Abort",X,"Dn")
// TNT1 A 0 A_ReFire
TNT1 A 0 A_TakeInventory("Abort",999)
ZZZZ ABCDEFGHIJKL 4
Goto Ready
Hold:
LLLL AB 2
LLLL B 2 A_Refire
LLLL CDCDCDCDCD 2
XXXX A 1 A_FireCustomMissile("Missile",0,20,12,5)
XXXX BCD 1
XXXX EDCBA 2
EEEE ABABABABABABABABABABABABABABABAB 4
ZZZZ ABCD...N 4
Goto Ready
D1:
TNT1 A 0 A_GiveInventory("Abort",11)
ZZZZ A 4
TNT1 A 0 A_TakeInventory("Abort",999)
Goto Ready
D2:
TNT1 A 0 A_GiveInventory("Abort",10)
ZZZZ AB 4
TNT1 A 0 A_TakeInventory("Abort",999)
Goto Ready
D3:
TNT1 A 0 A_GiveInventory("Abort",9)
ZZZZ ABC 4
TNT1 A 0 A_TakeInventory("Abort",999)
Goto Ready
Dn:
TNT1 A 0 A_GiveInventory("Abort",X)
ZZZZ ABC...N 4
TNT1 A 0 A_TakeInventory("Abort",999)
Goto Ready
is there any good example or solution? please help