Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
How to make a game work?
Old
infowire
Guest
 
Status:
Posts: n/a
Default How to make a game work? - 12-07-2009, 03:58 AM

Hi, so i am making a game where a guy kicks a football through a goal post, my question is how can i make the football fly to different parts of the world like miss the goal post depending on when the user clicks a button, also how do i make a power meter for the kick power? I need the power meeter jump back and fourth and depending when the user clicks a button it determines the power and kicks at it and that determines the flight of the football....

I need some help to accomplish this.


Thank You
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 12-07-2009, 04:05 AM

You'd need a variable which determines how much power the kick has, and a loop which keeps making the direction of the ball and the power of the kick vary with time.

Go ahead and show me what YOU think the code would look like. I'll help you along from there.


(')>

Last edited by x2495iiii; 12-07-2009 at 03:27 PM.
   
Reply With Quote
Old
infowire
Guest
 
Status:
Posts: n/a
Default 12-07-2009, 02:46 PM

how do you make a vehicle? i just have a football object
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 12-07-2009, 03:28 PM

Vehicles are in the vehicles section of the objects gallery.

Or did you mean 'variable?'


(')>
   
Reply With Quote
Old
infowire
Guest
 
Status:
Posts: n/a
Default 12-07-2009, 04:59 PM

lol i dont know why i said vehice, i think i was reading a different post and replied to this one.


anyways, what would you suggest to do to make the football fly based on when the user presses a button.

I was thinking of making the arrows turn the kicker to get the angle and then a power meter so when the user presses a button depending on what power it is at it kicks the ball.

Not quite sure how to do that in Alice, all the help would be appreciated.

So maybe for the power of the kick i can make the guys foot bend back and forth somehow on a loop, but i' am not sure how that would generate me a number for the force of the kick.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 12-07-2009, 05:29 PM

It wouldn't. You'd need to make your own number generation which moves at the same time as the football player's leg and goes up until it hits max power, then starts decrementing until it hits zero, and repeats.


(')>
   
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.