Problem with hyper attack

Started by Synck, November 29, 2015, 11:39:47 PM

Previous topic - Next topic

Synck

Alright, so I have a problem  to make this character to appear from back side of the screen after its hyper attack which is actually like m.bison's psycho crusher.

Here's the image:



I have a changestate which it works great,but what I'm supposed to type in the next (last) state?

Noctis

You don't know how to put her at the edge of the screen?

x = backedgedist + 30
or
x = backedgedist - 30

I can't remember which one puts her past it and in front of it, but.... is that what you were asking?

(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."

Odb718

Are you using 1.0 or 1.1?
http://mugenguild.com/forum/topics/backedge-frontedge-leftedge-rightedge-topedge-bottomedge-triggers-1-1b--170109.0.html

That should get you positioning if you need it. Then you just need your vel x.
If you mean how do you get the character to go off the screen, you could use an invisible character with no hitboxes, and use an explod to animate the character going off screen.
I'm not exactly sure what you need.
vVv Gouken718 vVv SabreTooth718 vVv


Synck

Okay I'll try to explain with codes:

In state in which she attacks (as you saw in the picture) I already set screenbound (on 0 value) and changestate whose trigger is with frontedgedist which it makes her to go off the screen a little bit longer (And I set value for that).

Now I need her in next state to appear in back edge of the screen.

state goes something like this:

;Coming from left (back) egde of screen after hyper attack
[statedef 3022]
type = A
movetype = A
physics = N
sprpriority = 2
anim = 45
ctrl = 0

[state 1000,0]
type = veladd
trigger1 = 1
y = .42

[state 1000,1]
type = velset
trigger1 = time = 0
x = 2.5

;So this is where I have a problem
[state 1000,2]
type = posset
trigger1 =time = 0
x = ; what would go here?
y = ; what would go here?

[state 1000,3]
type = screenbound
trigger1 = 1
value = 0

..............

altoiddealer

x is what Noctis said!
y is whatever you choose

If you triggered the ChangeState at the same distance offscreen that you want to appear on the other side, you could also use

x = -(Pos X)

Since the value of Pos X is relative to the middle of the screen


Noctis

#5
So you want her to appear as if flying off screen, going round the world, and appearing from the other side.

Then posset, x = backedgedist - 30

I'm personally having some SERIOUS trouble getting this and a frontedgebodydist trigger to work, but if it's working for you then...hoorah.

Edit:
Use x = -pos x. It'll work and if the position isn't what you want then try a x = -pos x + 10 or x = -pos x - 10 or whatever.
For some reason backedgedist and backedgebodydist, no matter the value, makes my p1 character disappear forever and puts my p2 in the exact same position every time. Maybe it's just me...O_O
Never actually had this problem before so maybe it's just been awhile.

(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."

altoiddealer

My suggestion to eliminate frontedge/backedge triggers...

type = ChangeState
trigger1 = abs(Pos X) > (GameWidth/2) + 30

  • abs(Pos X) returns the distance your character is from the center of the screen.  DuckSS you probably know this, but abs(*) will make a negative value a positive one (no effect on a positive value)
  • GameWidth/2 is obviously half the width of the screen.  So if you are at the edge of the screen, this trigger and abs(Pos X) will be equal values.
  • +30 how far you want your character to go offscreen before it triggers.

type = PosSet
trigger1 = Time = 0
x = -(Pos X)

  • This will move  your character to the opposite side of the screen.  If you are 30px offscreen on the right, you will be moved 30px offscreen on the left


Synck

Code works great but that 30 is really small value for offscreen, I need at least 500 but it will take my character too long from left edge of the screen.
What I can do?

altoiddealer

I'm sure you are using the 500 just to add time.  Instead, use a lesser value to trigger when she goes offscreen... but then in the second State, use...

VelSet
trigger1 = Time = 0
x = 0

type = PosSet
trigger1 = Time = 0
x = -(Pos X)

type = VelSet
trigger1 = Time = 400
x = 2.5


Synck

I didn't mean on time,I meant on this:
type = ChangeState
trigger1 = abs(Pos X) > (GameWidth/2) + 30 <======= so I need to set 500 just because I need to see her explod pass the edge of screen correctly. But my character gets deeper in back edge of screen after hyper attack.


altoiddealer

Is she supposed to appear on the other side of the screen, WHILE the trail is still showing on the right?

If that is the case, then you will have to use a helper to create a 2nd instance of the player.


Otherwise just do...

type = ChangeState
trigger1 = abs(Pos X) > (GameWidth/2) + 500



type = PosSet
trigger1 = Time = 0
x = IfElse(Pos X > 0,-((GameWidth/2) + 30),((GameWidth/2) + 30))

type = VelSet
trigger1 = Time = 0
x = 2.5


Synck

Thanks so much dude, you helped me.
You'll be credited for giving me the help in coding this character.

I'll leave this video here that everybody and you can see how I coded the move for her:

altoiddealer