Helpers...Friction...? Possible?!

Started by dsm33606, November 25, 2010, 10:37:37 AM

Previous topic - Next topic

dsm33606

I was wondering how do I make my player Im using recognize if the helper Im throwing makes contact so I'll be able to change the current state of the player - for instance much lke K' sunglass throw attack from KoF.. how he tosses them and if they make contact with the enemy he changes states and dashes to them for a combo.

2OS

Give your helper an ID and make a changestate that redirects to that helper hitting something


[State 2OS]
type=helper
trigger1=!numhelper(2)
ID=2
.  .  .

[State 2OS]
type=changestate
trigger1=helper(2),movehit
.  .  .


If you want your char to change state even if the enemy blocks it, use movecontact instead of movehit

dsm33606

#2
Still not working correctly... here is the code for the helper that is being thrown.

;--------------Hyper Toss------------------
[Statedef 197]
type = S
movetype = A
physics = S
ctrl = 0
anim = 196
velset = 0,0
sprpriority = 0

[State 0, VelSet]
type = VelSet
trigger1 = time <= 20
x = 2
y = -4
;ignorehitpause =
;persistent =


[State 0, VelSet]
type = VelSet
trigger1 = time = [21,31]
x = 1.5
y = 0
;ignorehitpause =
;persistent =


[State 0, VelSet]
type = VelSet
trigger1 = time > 32
x = 2
y = 5
;ignorehitpause =
;persistent =

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 100
add = 255,215,0
mul = 256,256,256
;sinadd = 0,0,0,10
invertall = 1
color = 0
ignorehitpause = 1
;persistent =


[State 200, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NP
damage = 1,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 9, Hit
pausetime = 4,11
sparkno = s7770
sparkxy = -10, -60
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 90
ground.velocity = -1
air.type = Low
air.hittime = 90
air.velocity = -1,-1
envshake.time = 1
envshake.ampl = 1


[State 197, ChangeState]
type = ChangeState
trigger1 = helper(5), movecontact
value = 3001
ctrl = 0

[State 197, DestroySelf]
type = DestroySelf
trigger1 = time = 70
ignorehitpause = 1
;persistent =

2OS

[State 197, ChangeState]
type = ChangeState
trigger1 = helper(5), movecontact
value = 3001
ctrl = 0

^ Put that in the ROOT state, not the helper state

dsm33606

Thanks! its work great :D umm offtopic... know a good site where I can get sprites of huge sub weapons?


dsm33606

Last topic - Solved and thanks :)


Is there a way to change the palfx of a projectile alone without affecting the character shooting it?  ..and also without making the projectile into a helper.

2OS


dsm33606

Ok Thanks, was just curious.. my next question is um how would I go about making an object tank damage for a certain amount of hits, like a wall.

This is what I thought of so far, and Im failing hardcore with it lol

This is the helper itself

[Statedef 3334]
type    = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
anim = 3334
poweradd = 0
sprpriority = 9




[State 3334, DestroySelf]
type = DestroySelf
trigger1 = helper(1666),gethitvar(hitcount) >= 10
trigger2 = helper(1666),gethitvar(damage) >= 300
ignorehitpause = 1
;persistent =

Riptide

you could just make it vanish after some point in time. I'm not sure if you can determine how much damage it took or how many hits it took.

Cyanide

Movetype = A, you won't be able to do gethitvar anything. Try movetype = H instead, although that's not personally how i'd do that attack it ought to function.


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.

Riptide

hum...really using hit state, that's good to know.

How would you have done things?

Cyanide

type = hitoverride
trigger1 = 1
stateno = 3334
value = SCA

type = varadd
trigger1 = time = 0
v = blah
value = 1

destroyself
trigger1= var(blah) = 10


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.

Riptide

But I think he wants to wall to take only so much damage. A timer can't do that, but it may be less buggy I guess.

Cyanide



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.

dsm33606

Hmm it still defaults to my characters sprites instead of its own when it gets hit

[Statedef 3334]
type    = S
movetype= H
physics = S
juggle  = 0
ctrl = 0
anim = 3334
poweradd = 0
sprpriority = 9

type = hitoverride
trigger1 = 1
stateno = 3334
value = SCA

type = varadd
trigger1 = time = 0
v = 27
value = 1

[State 3334]
type = destroyself
trigger1= var(27) = 10

Cyanide

lkasjdhgfio834579087y98^*(&#(*%&ualskdfhgoa8uy4903875908345t7u9o8f

At what point did i say "copy paste this"? Edit it so it fits. You just shoved it in and changed a couple of bits. Do the whole flaming lot.

I NEVER give copy paste code. Ever. People should learn on their own not paste in someone elses work and have to ask next time.


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.

dsm33606

Lolol thanks I got it working :D and your code was kinda copy and paste just was too noob to check the attr... >.<!

dsm33606

I was wonderig is it possible to add friction to helpers, so that P2 can not pass them or P1 for that matter without jumping over them. Or is there another way I can make the helpers presence known?

Cyanide



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.