hit only 1 oppponent

Started by hamza, May 31, 2012, 02:47:11 PM

Previous topic - Next topic

hamza

how do i make a move  that can hit only one player in teammode?

my webpage
www.csmugen.ucoz.com

Ricepigeon

Quote from: hamza on May 31, 2012, 02:47:11 PM
how do i make a move  that can hit only one player in teammode?

Hitonce

hamza

#2
but after it hits one opponent it will hit the other too i want to hit only one

my webpage
www.csmugen.ucoz.com

Cyanide

It deals 2 hits? Hitonce means if there are 2 characters in range of the hit, only one will be affected.


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.

hamza

i have a helper with a red clsn box that goes on p2 and stay for some time and if p4 goes over p2 it hits p4 too i want it to hit only p2

my webpage
www.csmugen.ucoz.com

Cyanide

I don't understand the logic behind that, aren't both players your opponent? Why only one?


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.

hamza

Quote from: Cyanide on June 03, 2012, 09:52:17 AM
I don't understand the logic behind that, aren't both players your opponent? Why only one?
yeah i know it's strange well i have a move the put a helper on p2 to control him but i want to control only p2 and use it against p4

my webpage
www.csmugen.ucoz.com

Cyanide

type = hitdef
trigger1 = teammode = simul
trigger1 = enemynear(0), ID < enemynear(1), ID
And any other triggers you need.

Basically the hitdef should only activate if the lowest ID is also the closest. Pretty sure hitonce will take effect on the nearest opponent although it's not something i've ever tested.


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.

2OS

use numenemy=2 instead of teammode=simul.

teammode=simul is technically wrong anyway.

Cyanide

enemy, teammode = simul

Numenemy would probably work better though. I keep thinking of old mugen where simul was ALWAYS 2v2 rather than the 1v2 it can do now.


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.

2OS

ultimately it has the same effect but numenemy=2 for debug prevention.

really you'll only see an error for not having numenemy if you put enemy/enemynear redirects in negative states but it's better to just put it on everything that uses them just like numhelper and numtarget.

sgn15

just a question about this topic, won't simply using hitcount < 1 do the trick ?

Cyanide

nope, he wants it to hit P2 only, not p4 at all. Hitcount < 1 will allow it to hit either in a 1 opponent situation.


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.

hamza

it didn't work

i made a helper with  stateno = ifelse(numenemy = 2,2004,2003)

and in state 2004 i put

[State 0,HitDef]
type = HitDef
triggerall = enemynear(0),ID < enemynear(1),ID
trigger1 = root,command!= "holdfwd"
trigger1 = root,command!= "holdback"
trigger1 = root,command!= "holddown"
trigger1 = root,command!= "fwd"
trigger1 = root,command!= "back"
trigger1 = root,command!= "down"
trigger1 = root,command!= "up"
trigger1 = root,command!= "a"
trigger1 = root,command!= "b"
trigger1 = p2stateno!=2011
trigger1 = p2stateno!=2012
trigger1 = p2stateno!=2040
trigger1 = p2stateno!=2050
trigger1 = p2stateno!=2100
trigger1 = p2stateno!=2105
trigger1 = p2stateno!=2200
trigger1 = p2stateno!=2210
trigger1 = p2stateno!=2400
trigger1 = p2stateno!=2410
trigger1 = p2stateno!=2600
trigger1 = p2stateno!=2610
attr = S, NA
damage = 0,0
animtype = light         
air.animtype = light
priority = 4,Hit
sparkno = S-1
guard.sparkno = S-1
ground.type = High
hitonce = 1
ground.velocity = 0
air.velocity = 0,0
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
p2stateno = 2005


but p4 still get hit and now p2 get hit but he can control himself

my webpage
www.csmugen.ucoz.com

sgn15

hmmm, what do you mean "1 opponent" situation ? like 1 on 1 or 2 on 1 ( i mean as long as the opponent is only 1) ? i have not tried if a long thin red clsn will affect both p2 and p4. from what i can understand, it is a "hit and then custom state mode already for p2" kind of thing. p1 would have a control mode as well. continuous state i mean. at least that is how i thought i would code it.

ID should be a number if i understood that correctly. also, multiple trigger1 means all of them should trigger.

hamza

well the goal of the move is to control the enemy i have to different ways :one for vs 1 and another for vs 2
i already made all the custom states and the vs 1 works
now i work on vs 2 and i want to control 1 opponent and use it against the other so i use a red clsn box to put p2 in the custom state, but when p4 goes over p2's body the helper with the red box leaves p2 and goes on p4 and i want  the box to remain on p2

my webpage
www.csmugen.ucoz.com

Ricepigeon

Perhaps the most important question is; is it hitting one or both at the same time?

If you're using this helper to control p2's movements through custom states, it sounds alot like you're trying to accomplish something that can be utilized through a bug in reversaldef. Check here for how it's done

Additionally, once it hits once you wont ever have to hit p2 again to call the effects of changestate, so long as the helper still exists, so you don't ever have to worry about hitting p4.

2OS

reversaldefs cause more bugs than you think.

jussayin.

Ricepigeon

Was saying it because it sounded like he wanted to specifically target a single opponent and control it at will, but that p4 being too close would cause it to retarget.

A video demonstration of what he's trying to accomplish and whats occuring would help greatly, since his description is difficult to understand.

hamza

seems like it difficult to hit only p2
and it's possible to make a move so thay if the move hits p2 then it can't hit p4 ,if it hits p4 it can't hit p2 ?
no hitonce

my webpage
www.csmugen.ucoz.com