DiabloHedgehog Posted November 8, 2008 Report Share Posted November 8, 2008 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 More sharing options...
Rael0505 Posted November 8, 2008 Report Share Posted November 8, 2008 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 More sharing options...
DiabloHedgehog Posted November 8, 2008 Author Report Share Posted November 8, 2008 I understand most of that though I can find every rolling value apart from a regular roll. Link to comment Share on other sites More sharing options...
DimensionWarped Posted November 9, 2008 Report Share Posted November 9, 2008 Are you familiar with the actions state machine? If you want to make the player roll, you'll need to set the player's action to either the existing rolling action or you'll need to make your own more specialized version. Have a look at the code for common actions, it should be quite enlightening. Link to comment Share on other sites More sharing options...
DiabloHedgehog Posted November 9, 2008 Author Report Share Posted November 9, 2008 AHA! I got it, when I last looked over the events I must have missed a section about how controls get turned into actions. Phew that was quite an effort. Cheers guys. Link to comment Share on other sites More sharing options...
Rael0505 Posted November 9, 2008 Report Share Posted November 9, 2008 Alright, tell me if you have any more trouble. I might try adding it to Worlds myself now that I bothered to dig into my old engine to find it. Link to comment Share on other sites More sharing options...
Rael0505 Posted November 9, 2008 Report Share Posted November 9, 2008 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 More sharing options...
Rael0505 Posted November 9, 2008 Report Share Posted November 9, 2008 http://files.filefront.com/SWtunnelsmfa/;12297257;/fileinfo.html Link to comment Share on other sites More sharing options...
DiabloHedgehog Posted November 9, 2008 Author Report Share Posted November 9, 2008 Still playing around with it? you should be working on Emerald Ties instead so I can play the final version next sage Link to comment Share on other sites More sharing options...
Rael0505 Posted November 9, 2008 Report Share Posted November 9, 2008 I just needed something to give this thread a kick-start. Link to comment Share on other sites More sharing options...
DiabloHedgehog Posted November 9, 2008 Author Report Share Posted November 9, 2008 Last off topic post in this thread, but finishing a game > adding new gimmicks Link to comment Share on other sites More sharing options...
Damizean Posted November 9, 2008 Report Share Posted November 9, 2008 That's the philosophy SEGA's using, and you can see how it's going for them... Link to comment Share on other sites More sharing options...
Recommended Posts