YesNoOk
avatar

[SOLVED] change the state of a helper in one keypress (Read 571 times)

Started by Maistral, July 31, 2011, 04:18:50 pm
Share this topic:
[SOLVED] change the state of a helper in one keypress
#1  July 31, 2011, 04:18:50 pm
  • avatar
  • **
  • Whatever.
alright, i don't even think this is possible, but it *could* be possible, seeing the good ones here.. i dunno  :???:


anyway, i have (successfully) spawned multiple puppets in midair, like this:



yeah, freaking epic, like in the anime ;D

the code used to generate that amount was this:

Code:
;Akahigi Prepare
[StateDef 9200]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 9200
poweradd = 0
sprpriority = 2

[State 0, VarRandom]
type = VarRandom
trigger1 = time%2
v = 41
range = -100,100
;ignorehitpause =
;persistent =

[State 0, VarRandom]
type = VarRandom
trigger1 = time%2
v = 46
range = -125,-225
;ignorehitpause =
;persistent =

[State 0, Helper]
type = Helper
trigger1 = animelem = 7
helpertype = normal ;player
name = "puppet 1"
ID = 30001
stateno = 9210
pos = var(41),var(46)
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
trigger1 = animelem = 9
helpertype = normal ;player
name = "puppet 2"
ID = 31001
stateno = 9220
pos = var(41),var(46)
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
trigger1 = animelem = 11
helpertype = normal ;player
name = "puppet 3"
ID = 32001
stateno = 9230
pos = var(41),var(46)
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 50
anim = S2850
sound = S9,2
pos = 0,-30
move = 0
darken = 1
p2defmul = 0
poweradd = -2000
unhittable = 1

[State 9200, end]
type = ChangeState
trigger1 = Time = 400
value = 0
ctrl = 1

note that my anim is looping from animation frame 7 to 11, thus the number of the puppets.

however, i wanted it such that if i, for example, press button "c", only ONE of the puppets would fly towards the enemy (ie. if i press C, one of those puppets, either the one with the sword, the scythe, or the arm blades, would fly towards the enemy).

if i press C again, another random puppet would fly towards the enemy;

if i press C continuously, then a continuous stream of puppets would fly. (ie, pressing C seven times, would send 7 random puppets flying)

i don't know how to start this at all. any ideas?  :???:






side note: any spriter there? was hoping for one, someone that would change the color of the puppet's coats to red..


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Last Edit: August 02, 2011, 08:57:03 am by temaridaikamaitachi
Re: change the state of a helper in one keypress
#2  August 01, 2011, 01:11:23 am
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
Well, conceptually it would happen like this: You would an array of helpers, each helper would be assigned a unique ID that you could keep track of. Each instance of the Helper is going to be accepting commands from their roots. Every time you press C, a var is set choosing one of the random IDs from the array. Each helper reads that you are pressing C and will ChangeState if that helper's ID is equivalent to the one that was chosen randomly. Simple right?

-[Все слова это только слова.]-
Re: change the state of a helper in one keypress
#3  August 01, 2011, 08:32:45 am
  • avatar
  • **
  • Whatever.
uh, i'm not sure about two things.


1) how would i assign them "unique" helper id's? unless i flood my code with zomg long list of repeated helper summonings.. >.< (i mean, is there a more effective way of spamming puppets with different IDs, WITHOUT doing it the long way)

2) what if, say for example,

ID range would be: from 300 to 400

i press C, it chooses ID number 345. puppet number 345 then attacks, and is obviously destroyed afterwards. what if i press C and AI chooses 345 again? won't that fail?


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: change the state of a helper in one keypress
#4  August 01, 2011, 09:04:52 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
well, you could do

ID = 300+numhelper

Which would make it 300+the number of helpers you have out. Or simply institute a variable counter, which might be better

varadd
trigger1 = animelem = 7
trigger2 = animelem = 9
trigger3 = animelem = 11

ID = 300+var(specified above)

which would count them up. This isn't how i'd do it though. I'd make one helper and a flock of explods. The helper just throws out additional helpers when pressed and removes an explod (you're still using the ID thing to remove) but well, it's less intensive, easier to manage and the whole "picking a random helper" is no longer needed. You have lots of them, who cares where it appears to come from.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: change the state of a helper in one keypress
#5  August 01, 2011, 10:48:09 am
  • avatar
  • **
  • Whatever.
hmm, that appears to be a nice idea..

i'll try to work on it. XD thanks sir


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: change the state of a helper in one keypress
#6  August 01, 2011, 11:15:31 am
  • avatar
  • **
  • Whatever.
oh. yeah.

guess the explod technique won't work with my ideas..

i wanted the puppets to be able to get "hit" while idle  :'(


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: change the state of a helper in one keypress
#7  August 01, 2011, 02:50:53 pm
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
Quote
i wanted the puppets to be able to get "hit" while idle 
lol don't cry, it's more than possible. If you want your puppets to be able to attack, you're going to have to use helpers for them anyways, so just put some CLSN 1 and 2 on them and a HitOverride so they won't turn into clones of your main character on hit.

Quote
1) how would i assign them "unique" helper id's? unless i flood my code with zomg long list of repeated helper summonings.. >.< (i mean, is there a more effective way of spamming puppets with different IDs, WITHOUT doing it the long way)
A long list of helper summons? Ew, I wouldn't ever do that lol. You'd have one helper call that would trigger for as many puppets you need. One helper per puppet, it's still one helper sctrl though. As Cyanide stated, the unique ID is going to be the ID you assign to it. Also, to make sure that a random helper exists, use NumHelper(randomly_generated_ID).

-[Все слова это только слова.]-
Re: change the state of a helper in one keypress
#8  August 01, 2011, 03:58:45 pm
  • avatar
  • **
  • Whatever.
okay, so i set this up. note that i have three differently-looking puppets.

Code:
;Akahigi Prepare
[StateDef 9200]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 9200
poweradd = 0
sprpriority = 2

[State 9200, VarSet]
type = VarSet
trigger1 = 1
v = 9    ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State 9200, VarAdd]
type = VarAdd
trigger1 = animelem = 7
trigger2 = animelem = 9
trigger3 = animelem = 11
v = 9    ;fv =
value = 1
;ignorehitpause =
;persistent =

[State 0, VarRandom]
type = VarRandom
trigger1 = time%2
v = 41
range = -100,100
;ignorehitpause =
;persistent =

[State 0, VarRandom]
type = VarRandom
trigger1 = time%2
v = 46
range = -110,-210
;ignorehitpause =
;persistent =

[State 0, Helper]
type = Helper
trigger1 = animelem = 7
helpertype = normal ;player
name = "puppet 1"
ID = 300+var(9)
stateno = 9210
pos = var(41),var(46)
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
trigger1 = animelem = 9
helpertype = normal ;player
name = "puppet 2"
ID = 300+var(9)
stateno = 9220
pos = var(41),var(46)
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
trigger1 = animelem = 11
helpertype = normal ;player
name = "puppet 3"
ID = 300+var(9)
stateno = 9230
pos = var(41),var(46)
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 50
anim = S2850
sound = S9,2
pos = 0,-30
move = 0
darken = 1
p2defmul = 0
poweradd = -2000
unhittable = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S9,21
volume = 1500
channel = -1
;abspan =
;ignorehitpause =
;persistent =

[State 9200, end]
type = ChangeState
trigger1 = Time = 200
value = 0
ctrl = 1

i just can't get this line of sir kenshin to my head:

"Every time you press C, a var is set choosing one of the random IDs from the array. Each helper reads that you are pressing C and will ChangeState if that helper's ID is equivalent to the one that was chosen randomly. "

i cannot understand this at all! my brain is starting to bleed





update: uh, i did this, apparently i got confused with "a var is set choosing one of the random IDs" forcing me to use varset. lol

anyway, i placed this on statedef -2 (i chose start button instead of C this time);

[State -2, VarRandom]
type = VarRandom
trigger1 = parent,command = "s"
v = 7
range = 300,350
;ignorehitpause =
;persistent =

have no idea what to do next. how do you say in a trigger
parent,command = "s" && "if helper ID is equal to var(7)"?

i tried: "helper(300+var(9)) = var(7)" and it doesn't work -.-!


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Last Edit: August 01, 2011, 04:21:09 pm by temaridaikamaitachi
Re: change the state of a helper in one keypress
#9  August 01, 2011, 04:37:05 pm
  • avatar
  • **
  • Whatever.
alright, posting my entire code here.

i was able to spam puppets, and send them down to the opponent by pressing "s" key.

the problem is, they ALL come down at the same time.

Code:
;---------------------------------------------------------------------------
;OUGI 2: AKAHIGI - HYAKKI NO SOUEN
;Puppet spam!  ;TBF
;---------------------------------------------------------------------------
;Akahigi Prepare
[StateDef 9200]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 9200
poweradd = 0
sprpriority = 2

[State 9200, VarSet]
type = VarSet
trigger1 = 1
v = 9    ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State 9200, VarAdd]
type = VarAdd
trigger1 = animelem = 7
trigger2 = animelem = 9
trigger3 = animelem = 11
v = 9    ;fv =
value = 1
;ignorehitpause =
;persistent =

[State 0, VarRandom]
type = VarRandom
trigger1 = time%2
v = 41
range = -100,100
;ignorehitpause =
;persistent =

[State 0, VarRandom]
type = VarRandom
trigger1 = time%2
v = 46
range = -110,-210
;ignorehitpause =
;persistent =

[State 0, Helper]
type = Helper
trigger1 = animelem = 7
helpertype = normal ;player
name = "puppet 1"
ID = 300+var(9)
stateno = 9210
pos = var(41),var(46)
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
trigger1 = animelem = 9
helpertype = normal ;player
name = "puppet 2"
ID = 300+var(9)
stateno = 9220
pos = var(41),var(46)
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
trigger1 = animelem = 11
helpertype = normal ;player
name = "puppet 3"
ID = 300+var(9)
stateno = 9230
pos = var(41),var(46)
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 50
anim = S2850
sound = S9,2
pos = 0,-30
move = 0
darken = 1
p2defmul = 0
poweradd = -2000
unhittable = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S9,21
volume = 1500
channel = -1
;abspan =
;ignorehitpause =
;persistent =

[State 9200, end]
type = ChangeState
trigger1 = Time = 200
value = 0
ctrl = 1

;Puppet 1-------------------------------------------------------------
[StateDef 9210]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 30001
poweradd = 0
sprpriority = 2

[State 9210, end]
type = ChangeState
trigger1 = parent,command = "s" && numhelper(300+var(9)) = var(7);parent,stateno != 9200 ;time = 60
value = 9211
ctrl = 1

;Puppet 1 Attack
[StateDef 9211]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 30020
poweradd = 0
sprpriority = 2

[State 9211, Null]
type = Null
triggerall = !time
trigger1 = (FVar(3) := (P2Dist X * 15) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)+ 1))))
trigger1 = (FVar(4) := (P2Dist Y * 14) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)+ 1))))

[State 9211, VelSet]
type = VelSet
trigger1 = 1
x = FVar(3)
y = FVar(4)

[State 9211, DestroySelf]
type = DestroySelf
trigger1 = pos y < 1 && vel x = 0 || pos y < 1 && vel y = 0 || time = 300
;ignorehitpause =
;persistent =

[State 9211, blah]
type = AngleSet
trigger1 = vel X != 0 || vel Y != 0;time = 0
value = (atan(Vel Y/Vel X) + (3*pi/2)) *(-180/Pi)

[State 9211, blah]
type = AngleDraw
trigger1 = 1

[State 9211, 1]
type = HitDef
trigger1 = time = 0
attr = S, NP
damage = 20,13
getpower = 0,0
givepower = 0,0
animtype = medium
guardflag = MA
hitflag = MAFDP
priority = 3, Hit
pausetime = 0, 0
sparkno = 1
sparkxy = 0, 0
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -0.8
airguard.velocity = -0.3,-1
air.type = High
air.velocity = -0.8,-1
air.hittime = 12
envshake.time = 10
envshake.freq = 90
envshake.ampl = -4
envshake.phase = 90

[State 9211, end]
type = ChangeState
trigger1 = pos y > 1
value = 9212
ctrl = 1

;Puppet 2-------------------------------------------------------------
[StateDef 9220]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 31001
poweradd = 0
sprpriority = 2

[State 9220, end]
type = ChangeState
trigger1 = parent,command = "s" && numhelper(300+var(9)) = var(7) ;time = 60
value = 9221
ctrl = 1

;Puppet 2 Attack
[StateDef 9221]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 31020
poweradd = 0
sprpriority = 2

[State 9210, Null]
type = Null
triggerall = !time
trigger1 = (FVar(3) := (P2Dist X * 15) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)+ 1))))
trigger1 = (FVar(4) := (P2Dist Y * 14) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)+ 1))))

[State 9221, VelSet]
type = VelSet
trigger1 = 1
x = FVar(3)
y = FVar(4)

[State 9221, DestroySelf]
type = DestroySelf
trigger1 = pos y < 1 && vel x = 0 || pos y < 1 && vel y = 0 || time = 300
;ignorehitpause =
;persistent =

[State 9221, blah]
type = AngleSet
trigger1 = vel X != 0 || vel Y != 0;time = 0
value = (atan(Vel Y/Vel X) + (3*pi/2)) *(-180/Pi)

[State 9222, blah]
type = AngleDraw
trigger1 = 1

[State 9221, 1]
type = HitDef
trigger1 = time = 0
attr = S, NP
damage = 20,13
getpower = 0,0
givepower = 0,0
animtype = medium
guardflag = MA
hitflag = MAFDP
priority = 3, Hit
pausetime = 0, 0
sparkno = 1
sparkxy = 0, 0
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -0.8
airguard.velocity = -0.3,-1
air.type = High
air.velocity = -0.8,-1
air.hittime = 12
envshake.time = 10
envshake.freq = 90
envshake.ampl = -4
envshake.phase = 90

[State 9221, end]
type = ChangeState
trigger1 = pos y > 1
value = 9212
ctrl = 1

;Puppet 3-------------------------------------------------------------
[StateDef 9230]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 32001
poweradd = 0
sprpriority = 2

[State 9230, end]
type = ChangeState
trigger1 = parent,command = "s" && numhelper(300+var(9)) = var(7) ;time = 60
value = 9211
ctrl = 1

;Puppet 3 Attack
[StateDef 9231]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 32020
poweradd = 0
sprpriority = 2

[State 9231, Null]
type = Null
triggerall = !time
trigger1 = (FVar(3) := (P2Dist X * 15) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)+ 1))))
trigger1 = (FVar(4) := (P2Dist Y * 14) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)+ 1))))

[State 9231, VelSet]
type = VelSet
trigger1 = 1
x = FVar(3)
y = FVar(4)

[State 9231, DestroySelf]
type = DestroySelf
trigger1 = pos y < 1 && vel x = 0 || pos y < 1 && vel y = 0 || time = 300
;ignorehitpause =
;persistent =

[State 9231, blah]
type = AngleSet
trigger1 = vel X != 0 || vel Y != 0;time = 0
value = (atan(Vel Y/Vel X) + (3*pi/2)) *(-180/Pi)

[State 9231, blah]
type = AngleDraw
trigger1 = 1

[State 9231, 1]
type = HitDef
trigger1 = time = 0
attr = S, NP
damage = 20,13
getpower = 0,0
givepower = 0,0
animtype = medium
guardflag = MA
hitflag = MAFDP
priority = 3, Hit
pausetime = 0, 0
sparkno = 1
sparkxy = 0, 0
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -0.8
airguard.velocity = -0.3,-1
air.type = High
air.velocity = -0.8,-1
air.hittime = 12
envshake.time = 10
envshake.freq = 90
envshake.ampl = -4
envshake.phase = 90

[State 9231, end]
type = ChangeState
trigger1 = pos y > 1
value = 9212
ctrl = 1


;Smoke crash if puppets land at ground
[StateDef 9212]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 7051
poweradd = 0
sprpriority = 2

[State 9212, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause =
;persistent =




[Statedef -2]
[State -2, VarRandom]
type = VarRandom
trigger1 = command = "s"
v = 7
range = 300,350
;ignorehitpause =
;persistent =

any idea what's wrong?


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: change the state of a helper in one keypress
#10  August 01, 2011, 04:44:46 pm
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
Quote
"Every time you press C, a var is set choosing one of the random IDs from the array. Each helper reads that you are pressing C and will ChangeState if that helper's ID is equivalent to the one that was chosen randomly. "
Sorry, this is using generic programming concepts. I'm glad you understand it though.

Quote
i tried: "helper(300+var(9)) = var(7)" and it doesn't work -.-!
helper(ID)'s value is never going to be a number. It's used for trigger redirection. Example: helper(2),var(2). Returns the value of var(2) in helper with ID 2. Understand?

Quote
parent,command = "s" && "if helper ID is equal to var(7)"?
This would only work if you assigned each helper an ID at time=0 via a VarSet in the helper state. Since this is not the way you went about it, it wouldn't work.

In the helper state you could do:
trigger1 = root,command="s" && IsHelper(root,var(7))
that would go in the changestate sctrl of your helper state.

What that trigger means is this:
Trigger if the "s" command was entered by the root and if this Helper is one with an ID equivalent to the value of the root's var(7).

-[Все слова это только слова.]-
Re: change the state of a helper in one keypress
#11  August 01, 2011, 05:45:22 pm
  • avatar
  • **
  • Whatever.
i replaced the trigger to attack mode, and now it ends up attacking "randomly", in a way that if i press S, no one would attack, i still continuously press S, and by sheer luck the trigger activates, and ALL (yes, all) the puppets go down to the enemy.

i seriously thought it was simple. i didn't know it's this difficult..


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: change the state of a helper in one keypress
#12  August 01, 2011, 05:58:01 pm
  • avatar
  • **
  • Whatever.
oh. i think i figured out what's wrong, my varset, since the trigger is just 1, it overrides the varadd.

it's working almost fine now, got the desired effect.

it's just that it's not "perfect", in a way that there are some left-over puppets still in midair, and they won't go down to attack however i press "S" key (usually two or three).

i think the problem is, the varrandom still takes the values where the puppets are already gone (ie. varrandom uses 312, while puppet 312 is a long time gone).

what should direction should i take from here? :???:


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Last Edit: August 01, 2011, 06:30:31 pm by temaridaikamaitachi
Re: change the state of a helper in one keypress
#13  August 01, 2011, 06:30:30 pm
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
well, what if, instead of a random puppet, you chose one in sequence? That would still create the effect you want, but it'd be less random more procedural. One good thing about this though, is that you'll never have any just sitting there, because on each press of "s" var(7) will be incremented by one. So basically start var(7) out at 300 and each time you press "s" increment it by one using VarAdd. Simple enough?

-[Все слова это только слова.]-
Re: change the state of a helper in one keypress
#14  August 01, 2011, 06:32:15 pm
  • avatar
  • **
  • Whatever.
hmm... sounds nice. i spam them in a random manner anyway XD

lemme give it a shot sir XD


edit: what should i place in the varset trigger though? i placed it in -2...

edit again: nvm, figured it out sir. XD


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Last Edit: August 01, 2011, 06:43:32 pm by temaridaikamaitachi
Re: change the state of a helper in one keypress
#15  August 01, 2011, 06:50:19 pm
  • avatar
  • **
  • Whatever.
i guess the only remaining problem now would be what if the enemy manages to hit the puppets. obviously they'd be destroyed, and of course, the routine would be ruined...


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: change the state of a helper in one keypress
#16  August 01, 2011, 07:19:46 pm
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
Ok, first thing first: STOP DOUBLE POSTING. Thank you. :P

Second, didn't you want them to be able to get hit? Why would they all be destroyed if one of the is hit? If one is hit, that one should be destroyed, not all. Maybe I'm not understanding you right here.

-[Все слова это только слова.]-
Re: change the state of a helper in one keypress
#17  August 01, 2011, 07:23:23 pm
  • avatar
  • **
  • Whatever.
i mean, for example, the enemy manages to hit two.

so the routine gets two less puppets. something like that..

since the routine is preprogrammed (they attack in an preordered manner), i guess there's no workaround for this one..


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: change the state of a helper in one keypress
#18  August 01, 2011, 07:36:29 pm
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
Hmm, you could not have them be not hit at all using NotHitBy or just removing the CLSN2. If you were going by Cyanide's suggestion, then they wouldn't be hit-able while floating there anyways, since they'd be explods. So pick your poison. You could have them unhittable and alleviate your issues, or make them hit-able and possibly deal with the order getting messed up. That could be possibly a counter action for the enemy to mess up your attack if you're not fast enough with mashing "c". :P

-[Все слова это только слова.]-
Re: change the state of a helper in one keypress
#19  August 01, 2011, 07:41:47 pm
  • avatar
  • **
  • Whatever.
oh well. go mash C, i suppose  :sugoi:


thanks sir, problem closed  ;D


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks

Re: [SOLVED] change the state of a helper in one keypress
#20  August 01, 2011, 10:37:06 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
More thought on what i gave you would have also solved this. You have a specific area they are spawned in. The initial helper which simply creates explods has a clsn 2 box covering that area. Each time that box is hit, he removes an explod. Each time you press C one explod is removed and swapped for a helper which swoops out.

When the helper owns no more explods (manage this via a variable) it destroys itself. Both the state that creates them, and the hitstate need a varadd. One to take a helper off. One to add a helper.

The only thing it doesn't do is provide "point of contact" helper destruction when they're in a big flock. But it cuts down immensely on the number of helpers you use as well as how awkward the whole sequential addition removal process is.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: [SOLVED] change the state of a helper in one keypress
#21  August 02, 2011, 08:58:17 am
  • avatar
  • **
  • Whatever.
i decided to abort the whole controllable puppet spam thing. it's too impractical for use, and i had a new idea about this attack. thanks anyway, sir. :D


MUGEN CHARACTERS
Sabaku no Temari [100%] = RELEASED!
Akasuna no Sasori [100%] = RELEASED!
Namikaze Minato [5%] = ON HOLD
Uzumaki Naruto [5%] = Coding basic attacks