Appear on P2

Started by ultimatedude, October 27, 2007, 12:46:14 PM

Previous topic - Next topic

ultimatedude

Yeah, I have this move that teleport onto the enemy to attack

I tried adding this but it just goes in the middle of the stage

[State 500, PosSet]
type = PosSet
trigger1 = Animelem = 7
x p2Dist = 0

No Borders, No Nations

Byakko

[State 500, PosSet]
type = PosAdd
trigger1 = Animelem = 7
x = p2Dist x

or

[State 500, PosSet]
type = PosSet
trigger1 = Animelem = 7
x = enemynear,pos x

posset sets the position, and x = 0 is the center of the stage.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

ultimatedude

Oh thanks, I knew x = 0 was the center but I thought adding P2Dist would make P2's axis the center XD

No Borders, No Nations

Cyanide

floor(p2dist X) if you want to prevent debug spam.


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.

ultimatedude

Oh, lol

I dunno cuz i never use debug mode XD

No Borders, No Nations

Anjel

Quote from: Cyanide on October 28, 2007, 12:46:56 AM
floor(p2dist X) if you want to prevent debug spam.

How the hell can it cause debug spam?
Pos's are floats.

Ultimatedude, use Posadd instead, then the X = p2dist X
My shitty mugen stuff:

Cyanide

p2 pos = float, using posadd/set = integer. Debug spam.


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.

Byakko

Quote from: Anjel on October 29, 2007, 07:10:01 PM
use Posadd instead
Use posadd instead of posadd ?
Quote from: Baiken on October 27, 2007, 12:57:29 PM
[State 500, PosSet]
type = PosAdd
trigger1 = Animelem = 7
x = p2Dist x

or

[State 500, PosSet]
type = PosSet
trigger1 = Animelem = 7
x = enemynear,pos x

posset sets the position, and x = 0 is the center of the stage.



And forgot about the rounding, yes.
Quote from: ultimatedude on October 29, 2007, 06:41:17 PMI dunno cuz i never use debug mode XD
You should. No, really, you should. Well, if you want to code something properly and/or save yourself hours of trying to find the cause of a problem when it's clearly told in the debug mode, that is. It's, like, an unwritten rule to use it if you want to make something clean.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.