State jump confusion.

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

State jump confusion.

Post by XutaWoo »

Just look at the code below:

Code: Select all

  Ready:
   RLGG IJKL 5
   RLGG A 1 A_JumpIfInventory (RockCharge, 33, 4)
   RLGG A 1 A_JumpIfInventory (RockCharge, 22, 4)
   RLGG A 1 A_JumpIfInventory (RockCharge, 11, 4)
   RLGG A 1 A_WeaponReady
   goto Ready+4
   RLGG D 1 A_WeaponReady
   goto Ready+4
   RLGG C 1 A_WeaponReady
   goto Ready+4
   RLGG B 1 A_WeaponReady
   goto Ready+4
  Fire:
   RLGG A 1 A_ReFire
   goto Ready
  Hold:
   RLGG A 1 A_JumpIfInventory (Cell, 0, 8)
   RLGG A 1 A_JumpIfInventory (RockCharge, 33, 7)
   RLGG A 1 A_JumpIfInventory (RockCharge, 22, 7)
   RLGG A 1 A_JumpIfInventory (RockCharge, 11, 10)
   RLGG A 1 A_TakeInventory (Cell, 1)
   RLGG A 1 A_GiveInventory (RockCharge, 1)
   RLGG A 1 A_CheckReload
   RLGG A 1 A_ReFire
   RLGG A 0
   goto Ready
   RLGG C 1 A_TakeInventory (Cell, 1)
   RLGG C 1 A_GiveInventory (RockCharge, 1)
   RLGG C 1 A_CheckReload
   RLGG C 1 A_ReFire
   goto Ready
   RLGG B 1 A_TakeInventory (Cell, 1)
   RLGG B 1 A_GiveInventory (RockCharge, 1)
   RLGG B 1 A_CheckReload
   RLGG B 1 A_ReFire
   goto Ready

actor RockCharge : CustomInventory
{
  inventory.maxamount 33
}
I honestly don't have any idea what I'm supposed to do. This is supposed to be a charging weapons that shows you the the level of charge by what sprite it uses. With this code, though, it just stays at the normal sprite. (Ignore the Unchange ready jumps, I'll fix them afterwards.)
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: State jump confusion.

Post by Matt »

I don't see anything wrong with the jump logic (though state labels would make things a lot clearer than offset numbers)... maybe the function doesn't support unquoted strings anymore (if it ever did)?
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: State jump confusion.

Post by XutaWoo »

Vaecrius wrote:I don't see anything wrong with the jump logic (though state labels would make things a lot clearer than offset numbers)... maybe the function doesn't support unquoted strings anymore (if it ever did)?
This is supposed to be Skulltag compatable, so no state labels.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: State jump confusion.

Post by Graf Zahl »

The next Skulltag will have state labels.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: State jump confusion.

Post by HotWax »

Vaecrius wrote:I don't see anything wrong with the jump logic (though state labels would make things a lot clearer than offset numbers)... maybe the function doesn't support unquoted strings anymore (if it ever did)?
ALL string parameters in Decorate should be quoted!
Locked

Return to “Editing (Archive)”