YesNoOk
avatar

Character-Specific Pause Menu won't work (Read 4491 times)

Started by SonicSkills, March 02, 2024, 08:00:05 pm
Share this topic:
Character-Specific Pause Menu won't work
#1  March 02, 2024, 08:00:05 pm
  • *
  • Sonic Brawler
  • Your friendly neighborhood Sonic fan
    • USA
    • https://sonicskills.wixsite.com/sonic-fighting-heroe
I've been trying for quite a while now to make pause menu for all the characters in my full game, & it seems like every time I get something right, another goes wrong. The current issue I'm dealing with is being able to properly exit the Pause Menu, returning to what was going on before. At first, I had it set to revert to stance, but then they stand in the air. I tried making a dedicated pause menu for air, stand, & crouch, but they kept reverting to stand. Not to mention. they couldn't move either, which is odd, because their stance animation still played, they just couldn't be controlled unless you hit them. If ANYONE can show me what I'm doing wrong, or how to properly end a pause, I'd greatly appreciate it, & I'll credit you in my full game.

Here's my code as of now:
Spoiler, click to toggle visibilty

Here's a video of what it looks like in-game:
https://streamable.com/jh0nhc
I play everyone rushdown
Last Edit: March 10, 2024, 10:32:23 pm by SonicSkills
Re: Character-Specific Pause Menu won't work
#2  March 06, 2024, 03:03:57 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
To begin with, it seems you are using a helper for the pause method, but the command detection is not redirected to the root (as in root, command="blahblah")
then in state 391 you have a destroyself which kills the helper followed by a changestate that never happens because the helper is already removed.
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Character-Specific Pause Menu won't work
#3  March 07, 2024, 06:35:01 pm
  • *****
  • Shame on you!
    • USA
You can't use
type = U
?
vVv Ryuko718 Updated 10/31/22 vVv
Re: Character-Specific Pause Menu won't work
#4  March 08, 2024, 05:52:10 am
  • *
  • Sonic Brawler
  • Your friendly neighborhood Sonic fan
    • USA
    • https://sonicskills.wixsite.com/sonic-fighting-heroe
To begin with, it seems you are using a helper for the pause method, but the command detection is not redirected to the root (as in root, command="blahblah")
then in state 391 you have a destroyself which kills the helper followed by a changestate that never happens because the helper is already removed.
Changed the commands to: root, command = "Provocate", & now when I press start, the helper leaves, the pause ends, but the character goes with it. The DestroySelf is removing the character as well I'm assuming? Also, p2 is able to move during the pause.

Here's what my code looks like now:
Code:
;---------------------------------------------------------------------------
; PAUSE (INITIATION)
[Statedef 289]
type = S
anim = 7575757
ctrl = 0

[State 0, Helper]
type = Helper
trigger1 = time = 0
helpertype = Normal ;Player
name = "Pause Menu"
ID = 390
stateno = 390
pos = 0,0
postype = P1    ;P2, Front, Back, Left, Right
facing = 1
keyctrl = 0
ownpal = 0

;[State 0, ChangeState]
;type = ChangeState
;trigger1 = command = "Provocate" && time >2
;value = 391
;ctrl = 0

;[State 0, ChangeState]
;type = ChangeState
;trigger1 = command = "Provocate" && time >2
;value = 391
;ctrl = 0

;---------------------------------------------------------------------------
; PAUSE
[Statedef 390]
type = S
;anim = 7575757
ctrl = 0

[State 0, Pause]
type = Pause
trigger1 = 1
time = 10
movetime = 999999
ignorehitpause =
persistent =

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S58424,2
volume = 100
channel = -1
freqmul = 1.0
loop = 1
pan = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S58424,2
volume = 1000
channel = -1
freqmul = 1.0
loop = 1
pan = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S58424,2
volume = 100
channel = -1
freqmul = 1.0
loop = 1
pan = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S58424,2
volume = 100
channel = -1
freqmul = 1.0
loop = 1
pan = 0

[State 390, MENU]
type = Explod
trigger1 = AnimElem = 1
anim = 391
id = 58424
pos = 0,0
facing = 1
postype = Left
sprpriority = 10
ownpal = 1
removetime = -1
bindtime = -1
scale = 0.5,0.41

[State 390, BLACK BG]
type = Explod
trigger1 = AnimElem = 1
anim = 392
id = 58424
pos = 0,0
facing =  1
postype = Left
sprpriority = 10
ownpal = 1
removetime = -1
bindtime = -1
scale = 0.5,0.41

[State 390, AssertSpecial]
type = AssertSpecial
trigger1 = time >0
flag = NoBarDisplay

[State 390, AssertSpecial]
type = AssertSpecial
trigger1 = time >0
flag = NoBG

[State 390, AssertSpecial]
type = AssertSpecial
trigger1 = time >0
flag = NoFG

[State 390, AssertSpecial]
type = AssertSpecial
trigger1 = time >0
flag = NoMusic

[State 390, AssertSpecial]
type = AssertSpecial
trigger1 = time >0
flag = TimerFreeze

[State 390, RemoveExplod]
type = RemoveExplod
trigger1 = root,command = "Provocate" && time >2
id = 58424
ignorehitpause = 1

[State 0, StopSnd]
type = StopSnd
trigger1 = root,command = "Provocate" && time >2
channel = -1
ignorehitpause = 1

[State 390, End]
type = ChangeState
trigger1 = root,command = "Provocate" && time >2
value = 391
ctrl = 1

;---------------------------------------------------------------------------
; PAUSE
[Statedef 391]
type = S
anim = 7575757
ctrl = 0

[State 40505, DestroySelf]
type = DestroySelf
trigger1 = 1
ignorehitpause = 1

You can't use
type = U
?
??? type = U??
Where is this?
If it's there, then it's a typo & I'll fix it, but I'm not seeing "type = U" anywhere in my code.
I play everyone rushdown
Re: Character-Specific Pause Menu won't work
#5  March 08, 2024, 01:32:06 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
Main character goes to state 289, then spawns the helper. Then what? Character is still frozen in state 289 because you didn't add any changestate to the root after the helper is destroyed
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Character-Specific Pause Menu won't work
#6  March 10, 2024, 05:45:03 pm
  • *
  • Sonic Brawler
  • Your friendly neighborhood Sonic fan
    • USA
    • https://sonicskills.wixsite.com/sonic-fighting-heroe
Main character goes to state 289, then spawns the helper. Then what? Character is still frozen in state 289 because you didn't add any changestate to the root after the helper is destroyed

Everything's pausing & removing properly now, however, P1 can't move. I tried using variables, but they don't seem to be doing anything, although this is my first time using them to it may be a fault in coding.

Code:
Code:
;---------------------------------------------------------------------------
; PAUSE (INITIATION)
[Statedef 289]
type = S
anim = 7575757
ctrl = 0
 
[State 0, Helper]
type = Helper
trigger1 = time = 0
helpertype = Normal ;Player
name = "Pause Menu"
ID = 390
stateno = 390
pos = 0,0
postype = P1    ;P2, Front, Back, Left, Right
facing = 1
keyctrl = 0
ownpal = 0

[State 289, VarSet]
type = VarSet
trigger1 = NumHelper(390) != 1
v = 10    ;fv = 10
value = 23
;ignorehitpause =
;persistent =

[State 289, VarSet]
type = VarSet
trigger1 = NumHelper(390) = 1
v = 10    ;fv = 10
value = 24
;ignorehitpause =
;persistent =

[State 289, ChangeState]
type = ChangeState
trigger1 = var(10) = 23
value = root,prevstateno
ctrl = 1
 
;---------------------------------------------------------------------------
; PAUSE
[Statedef 390]
type = S
;anim = 7575757
ctrl = 0
 
[State 0, Pause]
type = Pause
trigger1 = time = 0
time = 99999999
movetime = 99999999
ignorehitpause = 1
persistent =
 
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S58424,2
volume = 100
channel = -1
freqmul = 1.0
loop = 1
pan = 0
 
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S58424,2
volume = 1000
channel = -1
freqmul = 1.0
loop = 1
pan = 0
 
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S58424,2
volume = 100
channel = -1
freqmul = 1.0
loop = 1
pan = 0
 
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S58424,2
volume = 100
channel = -1
freqmul = 1.0
loop = 1
pan = 0
 
[State 390, MENU]
type = Explod
trigger1 = time = 0
anim = 391
id = 58424
pos = 0,0
facing = 1
postype = Left
sprpriority = 10
ownpal = 1
removetime = -1
bindtime = -1
scale = 0.5,0.41
 
[State 390, BLACK BG]
type = Explod
trigger1 = time = 0
anim = 392
id = 58424
pos = 0,0
facing =  1
postype = Left
sprpriority = 10
ownpal = 1
removetime = -1
bindtime = -1
scale = 0.5,0.41
 
[State 390, AssertSpecial]
type = AssertSpecial
trigger1 = time >0
flag = NoBarDisplay
 
[State 390, AssertSpecial]
type = AssertSpecial
trigger1 = time >0
flag = NoBG
 
[State 390, AssertSpecial]
type = AssertSpecial
trigger1 = time >0
flag = NoFG
 
[State 390, AssertSpecial]
type = AssertSpecial
trigger1 = time >0
flag = NoMusic
 
[State 390, AssertSpecial]
type = AssertSpecial
trigger1 = time >0
flag = TimerFreeze

[State 390, RemoveExplod]
type = RemoveExplod
trigger1 = command = "Provocate" && time >2
trigger2 = root,command = "Provocate" && time >2
trigger3 = parent,command = "Provocate" && time >2
id = 58424
ignorehitpause = 1
 
[State 0, StopSnd]
type = StopSnd
trigger1 = command = "Provocate" && time >2
trigger2 = root,command = "Provocate" && time >2
trigger3 = parent,command = "Provocate" && time >2
channel = -1
ignorehitpause = 1
 
[State 0, Pause]
type = Pause
trigger1 = command = "Provocate" && time >2
trigger2 = root,command = "Provocate" && time >2
trigger3 = parent,command = "Provocate" && time >2
time = 0
movetime = 1
ignorehitpause = 1

[State 390, End]
type = ChangeState
trigger1 = command = "Provocate" && time >2
trigger2 = root,command = "Provocate" && time >2
trigger3 = parent,command = "Provocate" && time >2
value = 391
ctrl = 1

;---------------------------------------------------------------------------
; PAUSE (DestroySelf)
[Statedef 391]
type = S
;anim = 7575757
ctrl = 0
 
[State 40505, DestroySelf]
type = DestroySelf
trigger1 = time = 0
ignorehitpause = 1
I play everyone rushdown
Re: Character-Specific Pause Menu won't work
#7  March 10, 2024, 07:19:22 pm
  • **
  • Don't copy code if you don't understand it.
    • USA
    • a13rown@hotmail.com
P1 might be frozen because of this:

[State 289, ChangeState]
type = ChangeState
trigger1 = var(10) = 23
value = root,prevstateno
ctrl = 1

You have root in front of PrevStateNo.  Since P1 is not a helper he may still be stuck in that state. 
Re: Character-Specific Pause Menu won't work
#8  March 10, 2024, 08:07:42 pm
  • *
  • Sonic Brawler
  • Your friendly neighborhood Sonic fan
    • USA
    • https://sonicskills.wixsite.com/sonic-fighting-heroe
P1 might be frozen because of this:

[State 289, ChangeState]
type = ChangeState
trigger1 = var(10) = 23
value = root,prevstateno
ctrl = 1

You have root in front of PrevStateNo.  Since P1 is not a helper he may still be stuck in that state. 

Just tested it out. P1 is still frozen. What's weird is that I tried changing it to value = 200 just to see if it's even processing the ChangeState, & P1 just returns to his stance animation, but no movement.

Is there a reason why it wouldn't be processing the ChangeState? Is something cancelling it out?
I play everyone rushdown
Re: Character-Specific Pause Menu won't work
#9  March 10, 2024, 10:31:55 pm
  • *
  • Sonic Brawler
  • Your friendly neighborhood Sonic fan
    • USA
    • https://sonicskills.wixsite.com/sonic-fighting-heroe
Update:

Problem Solved! Both The Jaquio & XGargoyle will be credited.

Thanks!
I play everyone rushdown