YesNoOk
avatar

pause screen coding, push start to pause latest INK update up (Read 10061 times)

Started by Memo, June 25, 2017, 07:05:06 am
Share this topic:
pause screen coding, push start to pause latest INK update up
#1  June 25, 2017, 07:05:06 am
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
this lets you push start to pause your gameplay just like ALL games do..
No more pushing ctrl+pause on the keyboard but.. also say goodbye
to taunting unless you config it to another command.

this is an old code I used a couple years ago that got revamped and remade by INK

you must have a blank animation, I use 9741 in the code
[Begin Action 9741]
-1,-1, 0,0, -1,

one var used. (var(55) used in code below)

-2
Code:
;----------------------------------------------------------
;Pause by Inktrebuchet
[State -2, Pause Helper]
Type = Helper
Triggerall = !ailevel
Trigger1 = NumHelper(444444444) = 0
Name = "Pause"
ID = 444444444
Pos = 0, 0
PosType = P1
StateNo = 444444444
KeyCtrl = 1
supermovetime = 2147483647
pausemovetime = 2147483647

;No Button Pushing During Pause
[State -2, ctrl 0]
type = CtrlSet
value = 0
triggerall = roundstate=2
trigger1 = command = "s"
trigger1 = numhelper(444444444) = 1
trigger1 = helper(444444444), var(0)=1
trigger1 = ctrl = 1
trigger1 = var(55) := 1
ignorehitpause = 1
     
[State -2, ctrl 1]
type = CtrlSet
value = 1
trigger1 = numhelper(444444444) = 1
trigger1 = helper(444444444), var(0)=0
trigger1 = var(55) = 1
ignorehitpause = 1

[State -2, Reset]
type = null
trigger1 = numhelper(444444444) = 1
trigger1 = helper(444444444), var(0)=0
trigger1 = var(55) = 1
trigger1 = var(55) := 0
ignorehitpause = 1
;----------------------------------------------------------

CNS
Code:
;----------------------------------------------------------
;Pause by Inktrebuchet
[StateDef 444444444]
Type = S
PHYSICS = N
MOVETYPE = I
Ctrl = 0
Anim = 9741 ; blank
 
[State -2, reset]
type = varset
trigger1 = 1
v = 0
value = 1

[State 444444444, start pause]
Type = changeState
triggerall = roundstate=2
trigger1 = command = "s"
Value = 444444445
ignorehitpause =1

[State 444444445, BindToRoot]
type = BindToRoot
trigger1 =1
time = 1
facing = 1
pos =0,-2
ignorehitpause =1

[StateDef 444444445]
Type = S
PHYSICS = N
MOVETYPE = I

;pause sprite goes here

[State 444444445, No]
Type = AssertSpecial
Trigger1 = 1
Flag = nobardisplay
Flag2 = nomusic
ignorehitpause =1
 
[State 444444445, Pause]
Type = Pause
Trigger1 = 1
Time = 10
MoveTime = 10
ignorehitpause =1
 
[State 444444445, Un-Pause]
Type = DestroySelf
Trigger1 = Time >= 1 
trigger1 = command = "s"
ignorehitpause =1
;----------------------------------------------------------

enjoy I hope to see more of you creators implementing pause in your chars!

check your vars, you might have to change a couple this system uses var(55)
Last Edit: July 12, 2017, 06:51:42 pm by Memo
Re: pause screen coding, push start to pause latest INK update up
#2  July 12, 2017, 07:06:26 pm
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
I had some time today to post INK's latest pause code, works perfect!