News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

[SOLVED] Player nonpushable?

Started by Noctis, May 03, 2011, 06:10:23 AM

Previous topic - Next topic

Noctis

How do I make my player nonpushable? I want to be a "wall", but I can't seem to figure it out.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Sheng Long

Nonpushable? You don't want your character to be able to be pushed by another character, yet, you want to be a 'wall'?

I don't know what you mean, so here's a statedef -2 code to make your character unpushable.

[Statedef -2]

[State -2, Do-Not-Push]
type = PlayerPush
trigger1 = 1
ignorehitpause = 1
value = 0


Of course, if you only want this to work on certain states, just add this to that particular state.

"You must defeat my flaming
dragon punch to stand a chance."

MDI

Damn, this is actually pretty useful! Awesome.
ey

Noctis

I want to stop enemies from pushing me like a wall would stop someone. I don't want them to walk through/past me (MDI...). You can't walk through walls.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Cyanide

Save your pos X in a variable once. Then posset to that variable over and over.

Alternatively, create a helper, posset yourself to the helpers position.

Both will work.


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.

Sheng Long

Oh yea, now I think I see what your getting at.  You want to make a wall type object, and not have this wall pushable by the player, and not to be able to go through it either. I think I tried doing something like this before.

Yea, it's best to try and keep positioning this wall object at the very same X offset it's originally created at. ;)

"You must defeat my flaming
dragon punch to stand a chance."

Noctis

Thanks. I think I got what I needed.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."