Hit self

Started by ultimatedude, October 15, 2007, 05:51:13 PM

Previous topic - Next topic

ultimatedude

Well yeah, Im coding a boomerang style attack, and I want so that if it touches you, it "destroyself"s, and if not it just carries on, Im not sure how to make something hit yourself, P1 isnt a code, only P2 XD

No Borders, No Nations

DemonicDrPhil

I don't think you can but there should be a way to check if the helper is a certain distance away from its parent and if it is have it destroyself and then you can just do lifeadd =-100 or whatever life you want off.

There has to be a way try some kind of bodydist trigger maybe?  I know there is a way because people used similar stuff to code an accurate servebot and rush
Latest Yoshi alpha ready for feedback Aug 15th check here for details...

The Aboriginal One

Never wanted to try it, but maybe if affectteam = B, it can hit everyone, but I don't know if it affects you.

Plus, you can use the projectile sctrl, give it an id number and state -1/-2 its hit detection.
Accusare nemo se debet nisi coram Veridis
DYNOMITE

Bastard Mami

wityh affect team it can hit you. though if you only want to catch the boomergan whitout hiting you parent dist triggers are better.

ultimatedude

#4
Ack, i cant get it to work, well, im kind of a noob coder so im not sure what to use but this is what I did

[State 751, DestroySelf]
type = DestroySelf
trigger1 =  ParentDist x =-20

But it doesnt do anythin

Ah, it does work, but only like 1/3

No, thats not it XD
It only works if it didnt hit P2 at all

damn, wait it was, Its going all wierd

No Borders, No Nations

#Shaun

I may be talkin out my ass here but why not try having a state that involves another helper boomerang to comeback your way, and have the boomerang's hitdef have a specified p1stateno for you to go to if the second boomerang helper attacks you? Have that other state take away a certain amount of life from you and whatever else you want it to do, plus destroying itself at the same time?

I dunno...I was gonna try to code an example but I'd rather have mugen loaded in front of me rather than go off the top of my head and give you some code that does nothing to help. SPORyu has a super that does it and Sander's Lucky Glauber has a basketball super that does it, plus dizzies....try looking at how they did it to get you some ideas.