Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Forcing sonic to roll without pressing down


Recommended Posts

I can't seem to figure this one out, I created a box that when sonic touches makes him roll into a ball automaticly, like when you go into pipes in GHZ.

I've tried setting the keydownpressed and keydown values of the player-input to 1 but it doesn't work like pressing down on the keyboard does. i've had a good look over the events too but can't figure it out. I know the collision works since I told it to play a sample and it does so.

Link to comment
Share on other sites

You're going about it the wrong way. Make an active object for the tube/pipe, and set it to a specific group. Here are the events:

If Bottom Sensor is overlapping the group

If Roll value = 0

If On the Floor value = 1

  • Play rolling sample
  • Set Roll value to 1

^ This event tells Sonic to go into rolling mode if he's inside the tube.

---

Only one action when event loops

If Bottom Sensor is overlapping the group

If on the Floor value = 0

If Actual Speed value = 0

  • Play rolling sample
  • Set Actual Speed value to Sin( Angle( ".Values" ) ) * -20
  • Set Roll value to 1

Only one action when event loops

If Bottom Sensor is overlapping the group

If on the Floor value = 0

If Actual Speed value = 0

Player presses left

  • Play rolling sample
  • Set Actual Speed value to Sin( Angle( ".Values" ) ) * -20
  • Set roll value to 1

Only one action when event loops

If Bottom Sensor is overlapping the group

If on the Floor value = 0

If Actual Speed value = 0

Player presses left

  • Play rolling sample
  • Set Actual Speed value to Sin( Angle( ".Values" ) ) * -20
  • Set roll value to 1

^ This three events make Sonic roll faster/slower depending on the angle. They also keep Sonic from getting stuck

---

Keep in mind that I programmed this in Dami's old 360º engine for MMF1.5. It should be the same concept, though.

Link to comment
Share on other sites

Just so you know, there is no "roll" value like I thought there was. It's the "Action" value. If Action = 6, Sonic is rolling. If Action = 5, Sonic is spindashing. If Action = 1, Sonic is jumping. Don't know what the other values do, I haven't looked into it too much.

Right now I'm adding tubes to Worlds myself. I'll upload it when I'm done.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...