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.
Give your helper an ID and make a changestate that redirects to that helper hitting something[State 2OS]type=helpertrigger1=!numhelper(2)ID=2. . .[State 2OS]type=changestatetrigger1=helper(2),movehit. . .If you want your char to change state even if the enemy blocks it, use movecontact instead of movehit
Still not working correctly... here is the code for the helper that is being thrown.;--------------Hyper Toss------------------[Statedef 197]type = Smovetype = Aphysics = Sctrl = 0anim = 196velset = 0,0sprpriority = 0[State 0, VelSet]type = VelSettrigger1 = time <= 20x = 2y = -4;ignorehitpause =;persistent =[State 0, VelSet]type = VelSettrigger1 = time = [21,31]x = 1.5y = 0;ignorehitpause =;persistent =[State 0, VelSet]type = VelSettrigger1 = time > 32x = 2y = 5;ignorehitpause =;persistent =[State 0, PalFX]type = PalFXtrigger1 = 1time = 100add = 255,215,0mul = 256,256,256;sinadd = 0,0,0,10invertall = 1color = 0ignorehitpause = 1;persistent =[State 200, HitDef]type = HitDeftrigger1 = time = 0attr = S,NPdamage = 1,0animtype = Heavyguardflag = MAhitflag = MAFpriority = 9, Hitpausetime = 4,11sparkno = s7770sparkxy = -10, -60guard.sparkno = s6767hitsound = 5,0guardsound = 6,0ground.type = Highground.slidetime = 1ground.hittime = 90ground.velocity = -1air.type = Lowair.hittime = 90air.velocity = -1,-1envshake.time = 1envshake.ampl = 1[State 197, ChangeState]type = ChangeStatetrigger1 = helper(5), movecontactvalue = 3001ctrl = 0[State 197, DestroySelf]type = DestroySelftrigger1 = time = 70ignorehitpause = 1;persistent =
[State 197, ChangeState]type = ChangeStatetrigger1 = helper(5), movecontactvalue = 3001ctrl = 0^ Put that in the ROOT state, not the helper state
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.
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 lolThis is the helper itself[Statedef 3334]type = Smovetype= Aphysics = Sjuggle = 0ctrl = 0anim = 3334poweradd = 0sprpriority = 9[State 3334, DestroySelf]type = DestroySelftrigger1 = helper(1666),gethitvar(hitcount) >= 10trigger2 = helper(1666),gethitvar(damage) >= 300ignorehitpause = 1;persistent =
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.
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.
type = hitoverridetrigger1 = 1stateno = 3334value = SCAtype = varaddtrigger1 = time = 0v = blahvalue = 1destroyselftrigger1= var(blah) = 10
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.
Hmm it still defaults to my characters sprites instead of its own when it gets hit[Statedef 3334]type = Smovetype= Hphysics = Sjuggle = 0ctrl = 0anim = 3334poweradd = 0sprpriority = 9type = hitoverridetrigger1 = 1stateno = 3334value = SCAtype = varaddtrigger1 = time = 0v = 27value = 1[State 3334]type = destroyselftrigger1= var(27) = 10
lkasjdhgfio834579087y98^*(&#(*%&ualskdfhgoa8uy4903875908345t7u9o8fAt 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.
Lolol thanks I got it working and your code was kinda copy and paste just was too noob to check the attr... >.<!
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?
Forgot about that, wasn't even SLIGHTLY thinking of the fact someone might have a helper that hangs round and does stuff but cannot be hit.
Thanks alot for all your help, I have it nearly perfected - just having one prob... the player can still move the object itself by walking forward, I want it to be in a set position, tried posfreeze but think that only works for players...Already had the boxes added from the start knew it had to get hit but didnt know how to make it get hit and stay in its current state but you and Cyanide got that worked out for me, thanks again
Use posset instead. Memorise your current position with 2 variables and then use a posset to those 2 variables Should hold you in place relatively well.