YesNoOk
avatar

Helper problems..... (Read 462 times)

Started by Flamekyo, April 24, 2012, 12:55:41 am
Share this topic:
Helper problems.....
#1  April 24, 2012, 12:55:41 am
  • ***
  • Imagination is Everyting....
    • flamekyo.mugen-infantry.net
I coded a helper into one of my characters moves,

when i do the move, my character throws a knife towards the opponent, the knife is positioned so that when my character throws it it comes from his hand.

The problem is that it works fine when im on P1 side, but when i jump over my opponent into P2 side and i do the move, the knife is in a different position, it gets thrown from above my character rather than from his hand.......

How can i fix it so that the position stays the same if i were to jump into P2 side?

Please help.
... Pulse Lifebars Re-Make :twisted:  60%
Re: Helper problems.....
#2  April 24, 2012, 01:08:01 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
It shouldn't position above your character when you swap sides for any reason. Please post your code. I could understand X axis being off, but not Y axis.


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: Helper problems.....
#3  April 24, 2012, 02:56:02 am
  • ***
  • Imagination is Everyting....
    • flamekyo.mugen-infantry.net
It shouldn't position above your character when you swap sides for any reason. Please post your code. I could understand X axis being off, but not Y axis.

Here's my code,

Code:
[Statedef 3002]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 22
ctrl = 0
velset = 0,0
anim = 3002

[State 0, Helper]
type = Helper
trigger1 = animelem = 3
helpertype = normal ;player
name = "Lifebar 1"
ID = 3100
stateno = 3100
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove
;ignorehitpause =
;persistent =

[State 0]
type = StateTypeSet
trigger1 = Pos Y < 0
StateType = A

[State 0]
type = VelSet
trigger1 = animelem = 1
x = 0
y = -9.9

[State 0]
type = Gravity
trigger1 = Time > 5

[State 0]
type = HitDef
trigger1 = !Time
attr = A, SA
animtype = Hard
damage = 30, 0
guardflag = MA
priority = 5
pausetime = 5,5
sparkno = s3300
guard.sparkno = s6001
guard.sparkxy = -30, 2
sparkxy = -30,-47
hitsound = S4002, 0
guardsound = S6, 0
ground.type = High
envshake.time=20
envshake.freq=33
envshake.ampl=17
ground.slidetime = 12
ground.hittime = 100
ground.velocity = -.1,-6
air.velocity = -.3,-14.5
air.type = High
fall = 1
fall.recover = 0

[State 6015, Pause]
type = Pause
trigger1 = movehit
trigger2 = time = [44, 48]
time = 4
movetime = 1

[State 6015, Pause]
type = Pause
trigger1 = animelem = 2 && movehit
trigger2 = time = [44, 48]
time = 4
movetime = 1

[State 0, ScreenBound]
type = ScreenBound
trigger1 = time = 1
value = 1
movecamera = 99,-89
;ignorehitpause =
;persistent =

[State 0]
type = ChangeAnim
trigger1 = Time > 20 && Pos Y > -14
value = 231

[State 200, 5]
type = ChangeState
trigger1 = Time > 20 && Pos Y > -4
value = 3003
ctrl = 1

[State 0]
type = ChangeState
trigger1 = Time > 20 && Pos Y > -4
value = 0
ctrl = 1
;-----------------------------

[Statedef 3100]
type = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3003
poweradd = 20
sprpriority = 2

[State 0, HelperBiding]
type = Offset
trigger1 = 1 ; root,stateno = [1000,1050]
x = 82
y = 33
bindtoparent = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = anim = 3003
value = 58
scale = 1,1
;ignorehitpause =
;persistent =

[State 2211, end]
type = destroyself
trigger1 = time = 34
... Pulse Lifebars Re-Make :twisted:  60%
Re: Helper problems.....
#4  April 24, 2012, 06:58:09 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You sure that's the right state? The hitdef is on the player. The helper has no velocity (ie i don't see how it's being thrown at all) and it has no hitdef so it's not hitting anyone. You're using offset rather than bindtoparent which are totally different.

You've also called the helper "lifebar" this has no actual effect on code at all, but does make me query if you're looking at the right thing as i would expect you to have renamed it "Knife"


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: Helper problems.....
#5  April 24, 2012, 10:14:20 am
  • avatar
  • ******
    • Thailand
[State 0, HelperBiding]
type = Offset
bindtoparent = 1

No. This means nothing to Mugen. Use bindtoparent.
Re: Helper problems.....
#6  April 24, 2012, 10:56:53 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Didn't see that bit. Still don't think this is the code for the attack in question.

Guessing this is winmugen? 1.0 should throw an error if you put in something like that.


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: Helper problems.....
#7  April 24, 2012, 11:00:57 am
  • avatar
  • ******
    • Thailand
I think maybe he copy-pasted a code and didn't change the labels or something.

Nope, it doesn't throw any errors. It functions as it would normally. :P
Re: Helper problems.....
#8  April 24, 2012, 11:11:36 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Bah, stupid parser.


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: Helper problems.....
#9  April 24, 2012, 07:57:20 pm
  • ***
  • Imagination is Everyting....
    • flamekyo.mugen-infantry.net
That code is for the knife when it's being brought up before being thrown, the character pauses for a bit before throwing, the knife appears on his hand. I havent coded the timing yet, im just trying to get the knife in the right position.

I changed the Offset to Bindtoparent and it fixed the problem i was having, but i cant seem to add any x,y positions, it seems to stay in one spot and i cant move it.

In the Helper code, i tried messing with the pos, but it still didnt work.

i tried adding PosSet to the code below, but the knife seems to stay in the same spot.

Code:
[Statedef 3100]
type = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3003
poweradd = 20
sprpriority = 2

[State 0, PosSet]
type = PosSet
trigger1 = time = 1
x = 33
y = -21
;ignorehitpause =
;persistent =

[State 0, HelperBiding]
type = bindtoparent
trigger1 = 1 ; root,stateno = [1000,1050]

[State 0, AngleDraw]
type = AngleDraw
trigger1 = anim = 3003
value = 58
scale = 1,1
;ignorehitpause =
;persistent =

[State 2211, end]
type = destroyself
trigger1 = time = 34

please help.
... Pulse Lifebars Re-Make :twisted:  60%

2OS

Re: Helper problems.....
#10  April 24, 2012, 08:25:08 pm
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
bindtoparent and bindtoroot take

pos=x,y

instead of

x=x
y=y

yaa it's stupid but deal with it.


and the only real difference between winmugen and 1.0 in parsing is on 1.0 display/append toclipboard will be erroneous if you don't use lowercase letters for the %.
Re: Helper problems.....
#11  April 24, 2012, 09:09:10 pm
  • ***
  • Imagination is Everyting....
    • flamekyo.mugen-infantry.net
bindtoparent and bindtoroot take

pos=x,y

instead of

x=x
y=y

yaa it's stupid but deal with it.


and the only real difference between winmugen and 1.0 in parsing is on 1.0 display/append toclipboard will be erroneous if you don't use lowercase letters for the %.

Thanks Bro, it worked

Thanks for the help guys.
... Pulse Lifebars Re-Make :twisted:  60%