News:

MFG's Character of the Month: September 2026 Voting

Main Menu

Help with a helper

Started by Kenthos, November 08, 2007, 05:27:00 AM

Previous topic - Next topic

Kenthos

Hello I am in need of help with my char. :-\

He brings out a puppet and stands back and fight. you use the arrows to move the puppet like you would the guy controling him. so I thought using variables press the right arrow and it sets the variable to 1 and he would check to see what the variable was set too then move based on it. but its not working is there anyone who knows what is wrongt? here's the coding.

;---------------------------------------------------------------------------
[Statedef 216]
;makepuppet
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 683                       ;Change animation (Def: no change)
poweradd = 20                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set p1's sprite layering priority to 2 (in front)

[State 0, Helper]
type = Helper
trigger1 = Time = 3
helpertype = player
name = "kk"
ID = 11
stateno = 299
pos = 5,-3
postype = p1    ;p2,front,back,left,right
facing = 1

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 217
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 217]
;control puppet
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 684                       ;Change animation (Def: no change)
poweradd = 0                    ;Power to add (Def: 0)
sprpriority = 2

[State 0, VarSet]
type = VarSet
trigger1 = Time >= 0
v = 6
value = 0

[State 200, 7]
type = ChangeState
trigger1 = command = "holdfwd"
value = 218
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 218]
;movepuppet
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 686                       ;Change animation (Def: no change)
poweradd = 0                    ;Power to add (Def: 0)
sprpriority = 2

[State 0, VarSet]
type = VarSet
trigger1 = Time >= 0
v = 6
value = 1

[State 200, 7]
type = ChangeState
trigger1 = command = "holdfwd"
trigger1 = AnimTime = 0
value = 218
ctrl = 1

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

                 
;---------------------------------------------------------------------------
[Statedef 299]
;puppet appear
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 682                       ;Change animation (Def: no change)
poweradd = 0                    ;Power to add (Def: 0)
sprpriority = 2

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

;---------------------------------------------------------------------------
[Statedef 300]
;puppet
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 1                         ;Set ctrl (Def: no change)
anim = 685                       ;Change animation (Def: no change)
poweradd = 0                    ;Power to add (Def: 0)
sprpriority = 2

[State 200, 7]
type = ChangeState
trigger1 = VarSet(6)= 1
trigger1 = AnimTime = 0
value = 301
ctrl = 1

[State 200, 7]
type = ChangeState
trigger1 = var(6)= 0
trigger1 = AnimTime = 0
value = 300
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 301]
;puppet move
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 685                       ;Change animation (Def: no change)
poweradd = 0                    ;Power to add (Def: 0)
sprpriority = 9

[State 0, VelSet]
type = VelSet
trigger1 = Time = 0
x = 3
y = 0
;ignorehitpause =
;persistent =

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = var(6)= 1
value = 301
ctrl = 1

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = var(6)= 0
value = 300
ctrl =1

please help. ???

tetsuo9999

[Statedef 15000]
type = S
physics = S
sprpriority = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 5144 && Anim != 5144
trigger2 = Anim = 5144 && AnimTime = 5144 ;Turn anim over
value = 5144

[State 0, VelSet]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, VelSet] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, Turn]
type = Turn
trigger1 = p2bodydist x <=-20

;--|Changestates|-----------------------------------------------------------
[State 0, Walk]
type = ChangeState
trigger1 = command = "holdfwd"
value = 15020
ctrl = 1

[State 0, Walk back]
type = ChangeState
trigger1 = command = "holdback"
value = 15021
ctrl = 1
;--|!Changestates|-----------------------------------------------------------
;-----------------------------------------------------------------------
[Statedef 15020]
type    = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
trigger1 = 1
x = const(velocity.walk.fwd.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 5141

[State 0, ChangeState]
type = ChangeState
trigger1 = p2bodydist x < 40
value = 15000
ctrl = 1

;-----------------------------------------------------------------------
[Statedef 15021]
type    = S
physics = S
sprpriority = 0

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 51141

[State 20, 2]
type = VelSet
trigger1 = 1
x = const(velocity.walk.back.x)

[State 0, ChangeState]
type = ChangeState
trigger1 = time > 80
value = 15000
ctrl = 1

Maybe something like this will work? Im not sure.  :)
WOO! WOO! WOO!
PSN / XBLA - ViewtifulSuxx

Bastard Mami

do not forget settting keyctrl to 1 while creating the helper, as well as making it type = player.

Kenthos

What i mean is that the player stands still and tells the helper where to go.
I thought is that if you enter a state where you hit arrows it would set the variable right 1 left 2 stand 0 and so on.
but i think the helper has his own variable so he's not responding to the arrows entered.

wait just read the last post this may work fine thanks.