News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Super-Pause issues

Started by Ray_RM, February 19, 2017, 08:49:15 PM

Previous topic - Next topic

Ray_RM

Hey guys I'm having problem with something that I'm trying to do: A state that pause the game and show pictures and when I press the button first  it pauses and if I press again It let the match free again. But I'm not getting make this Works.
The big problem here is how can I disable the [state] pressing again the same button? because once we press the button and we get in this state all the game freeze and don't unfreeze again! I'm gonna show you the state bellow:


;COMBO LIST
[Statedef 6000]
movetype= I             
juggle  = 1         
velset = 0,0                   
ctrl = 0           
anim = 911                 
poweradd = 0       
sprpriority = 0               

;[State 0, VarAdd]
;type = VarAdd
;trigger1 = time = 0
;v = 11   
;value = 1


[State 0, SuperPause] ; this is the SUUPER PAUSE that pause all the game
type = SuperPause
trigger1 = time = 0
time = 999999999999999999999999999999999999999999999999
anim = 999
movetime = 0
supermove = 9999999999999999999999999999999999999999999
darken = 1
unhittable = 1


[State 0, Explod]; this is the image that I want to show at the screen
type = Explod
trigger1 = command = "c"
anim = 6000
ID = 6000
Space = Screen
pos = 0,0
facing = 1
removetime = 50
scale = 0.5,0.5
sprpriority = 1
ontop = 1
ownpal = 1
removeongethit = 0
persistent = 1
supermovetime = 60
pausemovetime = 60




[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


My doubt is how to disable it using the same command="c". I have already tried to do it using VAR and Helpers but it isn't worked.

Odb718

I'm not 100% sure but I think you could use 
[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = command = "c" && numexplod(6000) && time >= 5   ;edit the time >= 5 longer if you need it. 
value = 0
ctrl = 1


because it may take more than 5 tics for some people to release the C button, you may want to increase the time so it doesn't automatically exit on them.
vVv Gouken718 vVv SabreTooth718 vVv


Niitris


[State 0, SuperPause] ; this is the SUUPER PAUSE that pause all the game
type = SuperPause
trigger1 = time = 0
time = 999999999999999999999999999999999999999999999999
anim = 999
movetime = 0
supermove = 9999999999999999999999999999999999999999999
darken = 1
unhittable = 1


Change time and supermove to 1.
delete time=0 from the trigger and replace that with 1

Pause will activate at every tick, instead of doing it once and freezing the game. Then when you use the DestroySelf, the pause won't trigger anymore.

Ray_RM



Quote from: Odb718 on February 20, 2017, 11:48:33 AM
I'm not 100% sure but I think you could use 
[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = command = "c" && numexplod(6000) && time >= 5   ;edit the time >= 5 longer if you need it. 
value = 0
ctrl = 1


because it may take more than 5 tics for some people to release the C button, you may want to increase the time so it doesn't automatically exit on them.

I tried it but doesn't work. it's getting impossible to disable the super pause.

Quote from: Niitris on February 20, 2017, 01:59:19 PM

[State 0, SuperPause] ; this is the SUUPER PAUSE that pause all the game
type = SuperPause
trigger1 = time = 0
time = 999999999999999999999999999999999999999999999999
anim = 999
movetime = 0
supermove = 9999999999999999999999999999999999999999999
darken = 1
unhittable = 1


Change time and supermove to 1.
delete time=0 from the trigger and replace that with 1

Pause will activate at every tick, instead of doing it once and freezing the game. Then when you use the DestroySelf, the pause won't trigger anymore.

did you mean to put the superpause in a Helper?

2OS

if i'm remembering this right the "supermove" line is obsolete. don't ever use it.

put a pause in the root and have a helper with pausemovetime cancel it when command=c.


[Statedef -2]

[State ]
type=pause
trigger1=stateno=6000&&time=1
time=2147483647
movetime=0

[State ]
type=helper
trigger1=!numhelper(6000)
id=6000
stateno=6010
pausemovetime=2147483647
supermovetime=2147483647

[Statedef 6010]

[State ]
type=pause
trigger1=ishelper(6000)
trigger1=root,command="c"
time=0
movetime=0

[State ]
type=destroyself
trigger1=ishelper(6000)
trigger1=root,command="c"