YesNoOk
avatar

Player and Helper on screen at once help! (Read 444 times)

Started by Geno-sis, November 26, 2011, 04:59:09 am
Share this topic:
Player and Helper on screen at once help!
#1  November 26, 2011, 04:59:09 am
  • **
  • Always seeking perfection...
    • animeneo.deviantart.com/
Hi just need hints or real help learning how to make a helper appear while player is still on screen and moving. My helper character removes player one entirely and does it's action then returns ctrl back to player.

Player's helper start in CNS

[Statedef 3200]
type = S
movetype = A
physics = S
anim = 3210
sprpriority = 2
velset = 0,0
ctrl = 0

Helper action

[State 3210, 1]
type = Projectile
affectteam = B
trigger1 = Time = 155
trigger2 = MoveGuarded = 758
attr = SC, NA, SA, HA
damage = 800,300
projremovetime = 5
animtype = Heavy
getpower = 0
givepower = 100
guardflag = M
hitflag = MAF
p2getp1state = 758
pausetime = 4,12
sparkno = s749
guard.sparkno = s748
sparkxy = 200,-120
hitsound = s671,8
guardsound = s671,9
ground.type = High
ground.slidetime = 150
ground.hittime = 15
ground.velocity = -30,-60
air.velocity = -15,-25
Alpha = 25, 25
palfx.time = 155
palfx.add = 249,247,251
palfx.sinadd = 214,198,228
projanim = 3240
projremanim = 3240
projcancelanim = 758 ;710
velocity = 0
fall = 1
air.fall = 1
offset = 0,0
projid = 3240
projpriority = 7
projhits = 1
projmisstime = 1
yaccel = 0.45
envshake.time = 180
fall.damage = 30             ;p2 will take 70 damage on hitting the ground
fall.envshake.ampl = 100       ;Parameters for shaking the screen on
fall.envshake.freq = 160
fall.envshake.time = 8

CMD states

[State -1]
type = ChangeState
value = 3200
triggerall = command = "dd_x"
triggerall = power >= 5000
triggerall = statetype != A
triggerall = triggerall = NumHelper(3210) = 0
trigger1 = ctrl
trigger2 = hitdefattr = SC, NA, SA, HA
trigger1 = stateno != [3200, 3240)
trigger2 = movecontact

If it's got something to do with IDhelper and NumHelper I'm not sure how to set those up.

Re: Player and Helper on screen at once help!
#2  November 26, 2011, 05:27:03 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You sent the player to the helper state. Use a type = helper rather than type = changestate. You'll have to add some parameters.


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: Player and Helper on screen at once help!
#3  November 27, 2011, 12:02:20 am
  • **
  • Always seeking perfection...
    • animeneo.deviantart.com/
Player State

[Statedef 3200]
type    = A
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
poweradd = 0
sprpriority = 3
anim = 3210


[State 3200]
type = Helper
trigger1 = animelem = 1
stateno = 3210
id = 3210
pos = 10,-60
postype = p1
ownpal = 1
sprpriority = 3

[State 3200, 1]
type = ChangeState
trigger1 = animtime = 0
value = 91988
ctrl = 1

Helper State

;Lancer
[Statedef 91988]
type = S
movetype = A
physics = S
anim = 3210
sprpriority = 2
velset = 0,0
ctrl = 0
poweradd = -5000

[State 3220, 1]
type = PlaySnd
trigger1 = Time = 90
value = S442, 0

[State 3220, 1]
type = PlaySnd
trigger1 = Time = 90
value = S441, 0

[State 3240, 1]
type = PlaySnd
trigger1 = Time = 155
value = S440, 0

[State 3200, 0]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

;[State 3220, 0]
;type = SuperPause
;trigger1 = Time = 20
;anim = 3240
;pos = -30,-65
;time = 50
;movetime = 50
;sound = s100,40

[State 3240, 1]
type = AfterImage
trigger1 = Time = 0
time = 40
trans = add
length   = 10
timegap  = 5
framegap = 1
PalBright = 1 , 0 , 30
PalContrast = 70 , 70 , 220
PalAdd = 0 , 0 , 0
PalMul = .6 , .6 , .8
IgnoreHitPause = 1
Persistent = 1

[State 3210, 1]
type = AfterImage
trigger1 = Time = 1
time = 100
trans = add
length   = 16
timegap  = 5
framegap = 4
PalBright = 1 , 0 , 30
PalContrast = 70 , 70 , 220
PalAdd = 0 , 0 , 0
PalMul = .6 , .6 , .8
IgnoreHitPause = 1
Persistent = 1

[State 3220, 1]
type = AfterImage
trigger1 = Time = 1
time = 100
trans = add
length   = 16
timegap  = 5
framegap = 4
PalBright = 1 , 0 , 30
PalContrast = 70 , 70 , 220
PalAdd = 0 , 0 , 0
PalMul = .6 , .6 , .8
IgnoreHitPause = 1
Persistent = 1

[State 3240, 1]
type = AfterImage
trigger1 = Time = 40
time = 100
trans = add
length   = 16
timegap  = 5
framegap = 4
PalBright = 1 , 0 , 30
PalContrast = 70 , 70 , 220
PalAdd = 0 , 0 , 0
PalMul = .6 , .6 , .8
IgnoreHitPause = 1
Persistent = 1


;[State 3210, 1]
;type = helper
;NumHelper = 3210
;trigger1 = ctrl
;attr = SC, NA, SA, HA


[State 3210, 1]
type = Projectile
affectteam = B
trigger1 = Time = 155
trigger2 = MoveGuarded = 758
attr = SC, NA, SA, HA
damage = 800,300
projremovetime = 5
animtype = Heavy
getpower = 0
givepower = 100
guardflag = M
hitflag = MAF
p2getp1state = 758
pausetime = 4,12
sparkno = s749
guard.sparkno = s748
sparkxy = 200,-120
hitsound = s671,8
guardsound = s671,9
ground.type = High
ground.slidetime = 150
ground.hittime = 15
ground.velocity = -30,-60
air.velocity = -15,-25
Alpha = 25, 25
palfx.time = 155
palfx.add = 249,247,251
palfx.sinadd = 214,198,228
projanim = 3240
projremanim = 3240
projcancelanim = 758 ;710
velocity = 0
fall = 1
air.fall = 1
offset = 0,0
projid = 3240
projpriority = 7
projhits = 1
projmisstime = 1
yaccel = 0.45
envshake.time = 180
fall.damage = 30             ;p2 will take 70 damage on hitting the ground
fall.envshake.ampl = 100       ;Parameters for shaking the screen on
fall.envshake.freq = 160
fall.envshake.time = 8

[State 3200] ;sparkno = s749
type = Explod
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
anim = 760
pos = 0,0
sprpriority = 4
postype = p1
persistent = 0

[State 3210, 1]
type = PlaySnd
trigger1 = Time = 0
value = S671, 26


[State 3210, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

CMD

;Lancer
[State -1]
type = ChangeState
value = 3200
triggerall = command = "dd_x"
triggerall = power >= 5000
triggerall = statetype != A
triggerall = triggerall = NumHelper(3210) = 0
trigger1 = ctrl
trigger2 = hitdefattr = SC, NA, SA, HA
trigger1 = stateno != [3200, 3240)
trigger2 = movecontact


I briefly checked out the docs again and looked at other characters that call out helpers but my character just keeps getting cloned! it means the parameter somehow is not executing state number 3200. Even when I do fix this problem mugen crashes! I need some fresh ideas or a fix to this one.
Re: Player and Helper on screen at once help!
#4  November 27, 2011, 12:12:09 am
  • *****
  • Most dangerous person in Mugen
    • USA
    • caddie.smeenet.org
Ok, you see this?

[State 3200]
type = Helper
trigger1 = animelem = 1
stateno = 3210
id = 3210
pos = 10,-60
postype = p1
ownpal = 1
sprpriority = 3

You are sending your helper into state 3210.

And then:

[State 3200, 1]
type = ChangeState
trigger1 = animtime = 0
value = 91988
ctrl = 1

You're putting your PLAYER into the helper state. The player is in state 3200. You're creating a helper in state 3210(Which is probably an invalid state judging by what you're saying is happening), and then putting the player, who is in state 3200, into state 91988. Also, you may have your cmd wrong.

;Lancer
[State -1]
type = ChangeState
value = 3200
triggerall = command = "dd_x"
triggerall = power >= 5000
triggerall = statetype != A
triggerall = triggerall = NumHelper(3210) = 0
trigger1 = ctrl
trigger2 = hitdefattr = SC, NA, SA, HA
trigger1 = stateno != [3200, 3240)
trigger2 = movecontact


Triggers are grouped together by numbers, not in order. So what the triggers actually are right now are:

;Lancer
[State -1]
type = ChangeState
value = 3200
triggerall = command = "dd_x"
triggerall = power >= 5000
triggerall = statetype != A
triggerall = triggerall = NumHelper(3210) = 0
trigger1 = ctrl
trigger1 = stateno != [3200, 3240)
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = movecontact

Is this what you want?
Re: Player and Helper on screen at once help!
#5  November 27, 2011, 05:42:06 am
  • **
  • Always seeking perfection...
    • animeneo.deviantart.com/
Well I need to make a player state where it is executed by a trigger action how exactly do I do this? I really do hate the way I get clones all over the screen every time I try something else. My character uses 3200 to trigger the helper that starts at 3210 and lunches a projectile attack of it's own using state 3240.
Re: Player and Helper on screen at once help!
#6  November 27, 2011, 06:45:51 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Butbutbut... you're only using state 3200 to start the helper?

Quote
Helper State

;Lancer
[Statedef 91988]
See that? That's what your helper state is. By using type = helper you CREATE a helper in that state. So far all you've done is sent your player there and made a helper in state 3210 which doesn't even exist.

In addition your "helper" state ends on a changestate when it should end on a destroyself.


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: Player and Helper on screen at once help!
#7  November 30, 2011, 06:14:18 pm
  • **
  • Always seeking perfection...
    • animeneo.deviantart.com/
Nope, it's no good... there must be something really wrong that I've done here she still turns into state "0" when I execute the helper and turns into clones. I'm now using Fighter Factory and generating helper codes to learn how it works properly, the previous codes I had have now been removed and i've updated the .SFF file too.

I will check back for help If I run into trouble again.
Re: Player and Helper on screen at once help!
#8  November 30, 2011, 08:30:28 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Breaking it down

Quote
state player

state create helper
state helper goes to ###

changestate to standing
player has left the helper creation state

state helper ###

helper does his shit

destroyself for helper.
What you're doing

Quote
State player

state create helper
state for helper that doesn't exist, use state 0

changestate to different state
value = what you wanted your helper to be

state helper but you're using the player because you're not reading what we write

blah blah

changestate to 0 as well.


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: Player and Helper on screen at once help!
#9  December 01, 2011, 03:59:00 am
  • **
  • Always seeking perfection...
    • animeneo.deviantart.com/
Yeah I'm trying vary hard to understand what you are both saying but it comes out the other side of my head like. Actually despite the fact that you were both telling me to correct the state numbers I really didn't understand exactly... I've only just come back to coding again and I'm not really good at it  :-\

Anyway I made new codes here and I understand exactly what they do better than last time, however... this time round mugen has crashed due to an error I made most likely to do with the .CMD. It could be that I need to add additional parameters, but I'm currently working on it now and will add other types of codes to see what happens. If it's the CNS again you'll have to shoot me!

CNS

Spoiler, click to toggle visibilty

CMD

Spoiler, click to toggle visibilty
Re: Player and Helper on screen at once help!
#10  December 01, 2011, 06:28:31 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Aside from the fact 10003 and 10004 are useless cos you never get into them that's pretty much right. Your problem is this

value = valordosom

valordosom is ... not a value of any sort at all ever. Especially not when mugen expects a numeric value.


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: Player and Helper on screen at once help!
#11  December 01, 2011, 09:41:11 pm
  • **
  • Always seeking perfection...
    • animeneo.deviantart.com/
Yeah that valordosom thing... I forgot to remove that, was too hasty. State def 10003 and 10004 are used for Helper being attacked, getting up etc.
I finally got an error out of mugen after it crashed, and it seems there is a problem with the CMD after all.

;Canon Beam
[State -1, Lancer]
type = Helper
value = 8591
triggerall = command = "dd_x"
triggerall = power >= 5000
triggerall = statetype != A
triggerall = NumHelper(10000) < 2
trigger1 = ctrl
trigger2 = hitdefattr = SC, NA, SA, HA
trigger1 = stateno != 10000
trigger2 = movecontact

Something in this does not agree with the CNS... The triggerall's are conflicting with something.
Re: Player and Helper on screen at once help!
#12  December 01, 2011, 11:57:35 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
hitdefattr is taking too many parameters.

hitdefattr = SC, NA
hitdefattr = SC, SA
hitdefattr = SC, HA

would be correct format iirc. You'll need them all in seperate triggers though.

Only other thing would be if dd_x was not defined. Spelling etc is all fine, as is most of the other triggers. Your ordering makes it harder to read, but wouldn't cause a crash.

Also, normally error messages will give information, what information are you getting?


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: Player and Helper on screen at once help!
#13  December 04, 2011, 04:46:43 pm
  • **
  • Always seeking perfection...
    • animeneo.deviantart.com/
I see I thought there were too many of those hitdefattr... I will use your advice to see what happens then.

Yeah I already redefined dd_x to DD_x. So... I need to properly order them, ok.

The error message don't always appear for some reason but this time I got error in CMD cant read def.
Re: Player and Helper on screen at once help!
#14  December 04, 2011, 08:23:46 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
CMD is the one place where things are case sensitive. If you made dd_x DD_x in the changestate but not the command definition it will throw an error.


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: Player and Helper on screen at once help!
#15  December 06, 2011, 09:16:14 pm
  • **
  • Always seeking perfection...
    • animeneo.deviantart.com/
Nope I checked the CNS's and CMD over and the CNS don't contain the command script as they do in the CMD, is that a problem if it doesn't?

I'n the CMD

[Command]
name = "x_x_DDF_z"
command = ~x, x, D, DF, z
time = 20

I'n the CMD

;Canon Beam
[State -1, Lancer]
type = Helper
value = 8591
triggerall = command = "x_x_DDF_z"
triggerall = power >= 5000
triggerall = NumHelper(10000) = 0 ;< 2
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = movecontact
trigger2 = stateno != [10000, 10002)
trigger3 = hitdefattr = SC, NA
trigger3 = hitdefattr = SC, SA
trigger3 = hitdefattr = SC, HA

Not sure if I was meant to add those new hitdefattrs like that, but still can't get my character to work in winmugen. Could it be that I'm using the wrong mugen program?
Re: Player and Helper on screen at once help!
#16  December 06, 2011, 09:30:51 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Post
The
Error
Message

As i say, you SHOULD get one, it will tell you what is wrong. Tell us what it is.

If you don't get one and winmugen just crashes with a general windows fault, the issue is with your sff file.


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: Player and Helper on screen at once help!
#17  December 10, 2011, 03:37:41 am
  • **
  • Always seeking perfection...
    • animeneo.deviantart.com/
Sorry bout that and the late reply my modem keeps cutting out, probably a broken cable.

Mugen is giving me

Error message:
Error in DX.cmd
Error loading chras/DX.def
Error loading p1
Re: Player and Helper on screen at once help!
#18  December 10, 2011, 03:48:08 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Remove the changestate you THINK is breaking it. Take it out altogether. Then try again, If you still ahve the error the problem is somewhere else.


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: Player and Helper on screen at once help!
#19  December 20, 2011, 10:02:16 pm
  • **
  • Always seeking perfection...
    • animeneo.deviantart.com/
This didn't work either... and I tipple checked the old docs too, it's going to be an unsolved mystery at this rate.
Is there any other code I could use alternatively? or is it possible that anyone could test these codes I put together to see what I've done wrong?
Re: Player and Helper on screen at once help!
#20  December 20, 2011, 10:54:45 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
There is nothing wrong with what you've shown us. The problem is somewhere you haven't worked out yet.

Remove the command and changestate. Is there still a bug? If yes try and figure it out by removing changestates (you can copy paste to another file)

If you've removed them all and you still have a problem, you have a corrupt file structure (this happens, specially if you use the elecbyte template)

Lastly, if the error goes away really early on try a really simple command like "a"


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: Player and Helper on screen at once help!
#21  December 21, 2011, 10:42:43 pm
  • **
  • Always seeking perfection...
    • animeneo.deviantart.com/
Ok thanks I'll have another few goes at it before I make another character release.