pinball

Non-platform specific questions.

pinball

Postby j2graves » Sat Nov 03, 2007 11:37 am

does anybody know how to do flippers in a pinball game?
you know like,
-ball just rolls over flipper unless you press the key
-ball flies at a different angle depending on which part of the flipper it was on when the key is pressed

also, i need to know how to make the ball roll as in when it hits a slanted surface, it shouldn't move very slowly.
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: pinball

Postby j2graves » Sat Nov 03, 2007 12:07 pm

I need this people! please help! +2 for anyone who gives me the answer!
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: pinball

Postby Azou » Sat Nov 03, 2007 12:54 pm

Hahaha!!! You're playing the teacher!! Sorry i don't know,but try to ask to Kalladdolf,or Bee-ant.Maybe they have the solution! :D
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: pinball

Postby j2graves » Sat Nov 03, 2007 1:10 pm

:roll:
okay. I hope they get on soon.
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: pinball

Postby Rux » Sun Nov 04, 2007 1:21 am

I bet you just add gravity to the ball
Code: Select all
yvelocity = yvelocity + .5;

And add a physical Response to the game board on the ball. :)
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Re: pinball

Postby j2graves » Sun Nov 04, 2007 3:42 pm

I know how to do gravity, but I need to know how to make the ball fly upward when I press the key.
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: pinball

Postby Kalladdolf » Sun Nov 04, 2007 5:09 pm

I'm sure you know how to add a variable.
Call it fly_up

For the flipper goes:
Key down -> right -> script editor->
Code: Select all
fly_up = 1;

Key up -> right -> script editor->
Code: Select all
fly_up = 0;


For the ball goes:
Collision -> top side of flipper -> script editor ->
Code: Select all
if (fly_up == 1)
{yvelocity = -20;}


This will make the ball go up when it touches the flipper and the key is pressed.
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: pinball

Postby j2graves » Sun Nov 04, 2007 6:49 pm

THANKS! +2
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: pinball

Postby Fuzzy » Mon Nov 05, 2007 1:54 am

Lets eliminate the if all together.

make a variable called direction. set it to -1;

For the flipper goes:
Key down -> right -> script editor->
Code: Select all
direction = direction * -1; // I think you could also go direction =*;

Key up -> right -> script editor->
Code: Select all
direction = direction * -1;


For the ball goes:
Collision -> top side of flipper -> script editor ->
Code: Select all
yvelocity = yvelocity*direction; // you might want to bleed a little speed off this to account for frictional forces.


When it collides with something else, you will have to set the xvelocity and yvelocity again, perhaps using the same system as this.

This will make the ball go up when it touches the flipper and the key is pressed.[/quote]
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: pinball

Postby j2graves » Tue Nov 06, 2007 5:58 pm

well uh, thanks. that was a little harder to follow, fuzzy :(
but I'll try it out. I'll give u 2 points for helping. feel lucky! :D
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: pinball

Postby Troodon » Wed Nov 07, 2007 4:34 pm

Wait, that can be made with physical response too! Seriously, slowly enough moving frames affect physically correctly. I mean, there is a Makslanes demo somewhere... I don't find it. You can try Metal_pt:s game:
http://game-editor.com/forum/download.php?id=698
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: pinball

Postby Bee-Ant » Thu Nov 08, 2007 9:35 am

==Kalladdolf== wrote:I'm sure you know how to add a variable.
Call it fly_up

also rand_up (actor variable)
CollisionEvent>top side of Fipper>ScriptEditor>
Code: Select all
if(fly_up==1)
{
    rand_up=rand[10];
    if(rand_up<2)
    {
        xvelocity-=20;
    }
    if(rand_up>2&&rand_up<4)
    {
        xvelocity-=10;
    }
    if(rand_up>4&&rand_up<6)
    {
        xvelocity-=0;
    }
    if(rand_up>6&&rand_up<8)
    {
        xvelocity+=10;
    }
    if(rand_up>8)
    {
        xvelocity+=20;
    }
    yvelocity-=20;
}

This code could make the random flies...hope help :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: pinball

Postby Bee-Ant » Thu Nov 08, 2007 9:40 am

Azou wrote:Try to ask to Kalladdolf,or Bee-ant.Maybe they have the solution! :D

Me and Kalladdolf are just active users..
Here are too much of members who have solutions more than us...but they aren't active :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: pinball

Postby j2graves » Sat Nov 17, 2007 1:17 pm

active alright!
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: pinball

Postby DST » Sun Dec 02, 2007 12:30 am

--
Last edited by DST on Sun Jul 27, 2008 11:39 pm, edited 1 time in total.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Next

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron