News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

[SOLVED]Bind to wall

Started by O Ilusionista, August 14, 2011, 04:35:10 PM

Previous topic - Next topic

O Ilusionista

I have a problem with binding, take a look:



the snake should be bind to the wall (hey eleycbyte, its time to make new triggers). The code works, but since every stage creator modify the bound of the stage as they will, the code doesn't works for all stages.

Quote[State 0, PosAdd]
type = PosAdd
trigger1 = 1
x = FrontEdgeDist +10

There is any way the helper ignore the stage bound and be bound exactly at the edge of the screen?

Алексей

Use On the helper/explod, set postype = right, and position them that way. You'll have to adjust x and y accordingly, but you should only have to adjust y.

-[Все слова это только слова.]-

O Ilusionista

no, that doesn't works, because if the screen moves, it will be bind on the air.

I'm almost there:

Quote[State 0, PosAdd]
type = PosAdd
trigger1 = 1
x = GameWidth-ScreenPos X

but when it facing the other direction, it doesn't work.
I've tried a *facing but no good.

O Ilusionista

Got it:

Quote[State 0, PosAdd]
type = PosAdd
trigger1 = facing = 1
x =GameWidth-ScreenPos X

[State 0, PosAdd]
type = PosSet
trigger1 = facing = -1
x =-GameWidth/2

You may ask why not PosSet on the first part. Because Mugen can't handle it right and the sprite start to flicker.

Алексей

Interesting, you could always re-position the explod using ModifyExplod and the same position parameters. I'm glad you got it working though :)

-[Все слова это только слова.]-

O Ilusionista

That is the problem: its not an explod, its an helper which can hit p2 while it is on the wall

Алексей

Ah, I see. That makes a lot more sense then :P

-[Все слова это только слова.]-

Cyanide

I believe i've used a posset to a constant position (160,-160) for this sort of thing previously. Won't work so well with screenzoom though i believe.


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

Quote from: _K.o.W_ on August 14, 2011, 04:35:10 PM
There is any way the helper ignore the stage bound and be bound exactly at the edge of the screen?

type=screenbound
trigger1=ishelper(#)
value=1
movecamera=0,0
ignorehitpause=1
persistent=1

type=posset
trigger1=ishelper(#)
x=9999999*facing
ignorehitpause=1
persistent=1