Jump to content
  • 0

How to make a helper that's a block either player can stand on?


RobotMonkeyHead

Question

I've created a helper that's a large box.  It has a default blue clsn box, and I'd like to make it so neither character can walk through it, but instead either can jump and land on top of it.  Any idea how this could be done?   

For the landing on top part, it seems like I could take care of this with a red clsn box that triggers a standing type state, and sets the y pos.  I'm still not sure about the walking through it part.  If there's a way to take care of both things in a single shot, that would of course be ideal.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

I've already asked this question and got solutions... here's how to make it so it doesn't move.

http://mugenguild.com/forum/topics/make-block-that-does-not-move-165714.0.html

here's about landing on the thing: (from that post onwards is about your move)

http://www.infinitymugenteam.com/Forum_345/index.php?topic=43889.msg519505#msg519505

 

This whole thing is kinda bullshit honestly.

Link to comment
Share on other sites

  • 0
On 8/20/2015 at 5:17 PM, -Whiplash- said:

I've already asked this question and got solutions... here's how to make it so it doesn't move.

http://mugenguild.com/forum/topics/make-block-that-does-not-move-165714.0.html

here's about landing on the thing: (from that post onwards is about your move)

http://www.infinitymugenteam.com/Forum_345/index.php?topic=43889.msg519505#msg519505

 

This whole thing is kinda bullshit honestly.

Thanks Whiplash , that's been helpful so far. 

I've made a couple adjustments to Cyanide and Алескей's suggestions that have been effective so far and might interest you, I'm not sure.

For starters, to prevent the image from jittering, instead of making two separate helpers for the hitbox and image, I just used a single helper for the hitbox and had it use an explod to produce the image, which is not bound to it's position.  Not that it matters all that much, just struck me as a tiny bit more efficient. 

Secondly to make p1 not be able to walk through the box, instead of having the helper trigger a variable , I just wrote the following code in p1's state -2, which worked just fine with no variable necessary:

80 is the boxes height and 60 is the horizontal distance between the p1s axis and the boxes axis.

[State 0, PosSet]

type = PosSet

trigger1 = numhelper(2400)

trigger1 = abs(pos x - helper(2400), pos x) < 60 && pos y > -80

x = helper(2400), pos x + 60 * (1 - 2 * (pos x < helper(2400), pos x))

I'm still plugging away at it tho, if I come up with anything else that might be of interest to you I'll be sure to post it here.

Link to comment
Share on other sites

  • 0

Another thing you might find useful is that I was able to get the players to land on and fall off the box with a single clsn and 4 hitdefs. Hope this helps:
(These hitdefs are in the block helper, obviously, and the clsn is just around its top surface)

[State 0, P1 Land On Box]

type = HitDef

trigger1 = root, vel y > 0 && root, pos y < -80 && root, pos y + root, vel y > -80

trigger1 = abs(pos x - root, pos x) < 50

attr = SCA, NA

hitflag = MAFD

affectteam = F

priority = 7, Hit

ground.type = none

p2stateno = 2415

p1sprpriority = -1

guard.dist = 0

sparkno = -1

guard.sparkno = -1

 

[State 0, P1 Fall Off Box]

type = HitDef

triggerall = root, vel y = 0 && root, pos y = -80

trigger1 = abs(pos x - root, pos x) >= 50

attr = SCA, NA

hitflag = MAFD

affectteam = F

priority = 7, Hit

ground.type = none

p2stateno = 2416

p1sprpriority = -1

guard.dist = 0

sparkno = -1

guard.sparkno = -1

 

[State 0, P2 Land On Box]

type = HitDef

trigger1 = enemynear, vel y > 0 && enemynear, pos y < -80 && enemynear, pos y + enemynear, vel y > -80

trigger1 = abs(pos x - enemynear, pos x) < 50

attr = SCA, NA

hitflag = MAFD

affectteam = E

priority = 7, Hit

ground.type = none

p2stateno = 2415

p1sprpriority = -1

guard.dist = 0

sparkno = -1

guard.sparkno = -1

 

[State 0, P2 Fall Off Box]

type = HitDef

triggerall = enemynear, vel y = 0 && enemynear, pos y = -80

trigger1 = abs(pos x - enemynear, pos x) >= 50

attr = SCA, NA

hitflag = MAFD

affectteam = E

priority = 7, Hit

ground.type = none

p2stateno = 2416

p1sprpriority = -1

guard.dist = 0

sparkno = -1

guard.sparkno = -1

;---------------------------------------------

[Statedef 2415, Box - Land on it]

physics = S

 

[State 0, PosSet]

type = PosSet

trigger1 = vel y > 0

y = -80

 

[State 0, VelSet]

type = VelSet

trigger1 = vel y > 0

y = 0

 

[State 0, SelfState]

type = SelfState

trigger1 = 1

value = -1

ctrl = 1

 

;---------------------------------------------------------------------------

[Statedef 2416, Box - Fall off it]

physics = A

 

[State 0, VelSet]

type = VelSet

trigger1 = pos y = -80

y = 1

 

[State 0, SelfState]

type = SelfState

trigger1 = 1

value = 50

ctrl = 1

 

Link to comment
Share on other sites

  • 0

Or make that 2 hit defs.

[State 0, P1 Land On or Fall Off Box]

type = HitDef

trigger1 = root, vel y > 0 && root, pos y < -80 && root, pos y + root, vel y > -80

trigger1 = abs(pos x - root, pos x) < 50 && anim != 6403

trigger2 = root, vel y = 0 && root, pos y = -80

trigger2 = abs(pos x - root, pos x) >= 50 || anim = 6403

attr = SCA, NA

hitflag = MAFD

affectteam = F

priority = 7, Hit

ground.type = none

p2stateno = 2415 + (root, vel y = 0)

p1sprpriority = -1

guard.dist = 0

sparkno = -1

guard.sparkno = -1

 

[State 0, P2 Land On or Fall Off Box]

type = HitDef

trigger1 = enemynear, vel y > 0 && enemynear, pos y < -80 && enemynear, pos y + enemynear, vel y > -80

trigger1 = abs(pos x - enemynear, pos x) < 50 && anim != 6403

trigger2 = enemynear, vel y = 0 && enemynear, pos y = -80

trigger2 = abs(pos x - enemynear, pos x) >= 50 || anim = 6403

attr = SCA, NA

hitflag = MAFD

affectteam = E

priority = 7, Hit

ground.type = none

p2stateno = 2415 + (enemynear, vel y = 0)

p1sprpriority = -1

guard.dist = 0

sparkno = -1

guard.sparkno = -1

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...