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

[GM7] Pinball Flippers


BOB_ROX

Recommended Posts

Hello, I was wondering if anyone knew how to get the pinball bumpers working like how they did in the old sonic games?, Like say Sonic 2 casino zone with the triagular bumpers? and the hitters (I dont know there proper names) That stop the player from falling down or the ball from going into the gutter of the bottom of the pinball table, Basically, I was wondering about the bumpers and the hitter things. Because Id like to implement it into my game. I think its the sonic genesis engine or one of dami's old school sonic examples. I keep forgetting which one its called as I havent been doing much of my game coz of school and homework.

Basically, I want it to be like this but also keep the sonic 2d movement into it, So the player can act as a ball in a pinball machine.

Sonic Spinball gameplay:

Link to comment
Share on other sites

You should have a 'pinball' flag/counter/variable that you can use to disable certain things in the normal Sonic engine (IE: When Pinball == 0, & Down Key is held; -> Sonic animation = 'crouch'. *That's disabled when Pinball == 1*)

Other than that, the bumpers (the two you control at the bottom) work like springs. The bouncers just negate your direction so you bounce a bit in the opposite of where you came from.

Link to comment
Share on other sites

Here is how I would do it:


[B]var[/B] Collision;

Collision = player_collision_bottom_object(x, y, angle, maskBig, objFlipper);

if (Collision != noone && ground == true)
{

action = action_rolling;
x_speed = 1;

if (key_action_pressed)
{
x_speed = ((objPlayer.x)-(objFlipper.x))*0.125;
y_speed = -10;
ground = false;
}

}

[/CODE]

You'd probably have to tweak some of it to fit into the engine you're using but that's the basic idea.

Link to comment
Share on other sites

Thanks, But I was wondering, I got a 2 part animation for it. Showing that its up and down, It works with making it flip sonic up when hes in the ball, Just Id like to ask that how do I get it to play the right animations?. Also Im gonna try and get it to be changed into a proper button for each one, so it flips him up on a certain key being pressed, Im still using your code, so Id like to say thanks. But I was wondering how to get it to point up when the key is held in and it stops sonic from rolling down?. I got the physics in it, Just Id like to know how to make it stop at a frame when its held in?

Wait, Nevermind. I got it. Anyhow. Thanks for the help!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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