Alice Community  

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

Reply
 
Thread Tools Display Modes
Motor bike wheelie issue
Old
InstigatedApprentice
Junior Member
 
Status: Offline
Posts: 3
Join Date: Mar 2018
Default Motor bike wheelie issue - 03-08-2018, 12:29 PM

Hi everyone

So I'm creating a game in which there is a motorbike that is controlled using the arrow keys. Pressing spacebar causes the motorbike to do a wheelie. I have managed the wheelie part by starting an event when the spacebar is pressed to call a turn function which causes the motobike to tilt backwards.
Unfortunately, it seems that when the motorbike is tilted backwards, pressing the forwards key causes it to zoom off in whichever way the motorbike is facing, which in this instance would be upwards at a 45 degree angle.

Does anyone have any idea on how to stop this from happening?

Many thanks,

Adam
   
Reply With Quote
Old
sometimes618
Member
 
Status: Offline
Posts: 39
Join Date: Jan 2016
Location: J Street
Default 03-08-2018, 05:40 PM

Quote:
Originally Posted by InstigatedApprentice View Post
Hi everyone

So I'm creating a game in which there is a motorbike that is controlled using the arrow keys. Pressing spacebar causes the motorbike to do a wheelie. I have managed the wheelie part by starting an event when the spacebar is pressed to call a turn function which causes the motobike to tilt backwards.
Unfortunately, it seems that when the motorbike is tilted backwards, pressing the forwards key causes it to zoom off in whichever way the motorbike is facing, which in this instance would be upwards at a 45 degree angle.

Does anyone have any idea on how to stop this from happening?

Many thanks,

Adam
In general, the "as seen by" method extension is usually helpful to me in a scenario like this.
I would make the "move" method (the method that makes the motorbike go forward) be "as seen by" an object that is always flat to the ground. If you want the motorbike to turn left or right, make the object flat to the ground turn.

EDIT: On second thought, there is an easier way.
Try making a dummy on the motorbike that has the "forward/turning" control instead of the motorbike, and set the motorbike's vehicle to the dummy. Keep it so that the motorbike, not the dummy, turns backwards for the wheelie, though.


Starring, written, directed, and produced by sometimes618.

Get Alice Fighters v0.7:
http://www.alice.org/community/showthread.php?p=57651#post57651

Last edited by sometimes618; 03-08-2018 at 05:46 PM.
   
Reply With Quote
Old
InstigatedApprentice
Junior Member
 
Status: Offline
Posts: 3
Join Date: Mar 2018
Default 03-09-2018, 03:00 PM

Quote:
Originally Posted by sometimes618 View Post
In general, the "as seen by" method extension is usually helpful to me in a scenario like this.
I would make the "move" method (the method that makes the motorbike go forward) be "as seen by" an object that is always flat to the ground. If you want the motorbike to turn left or right, make the object flat to the ground turn.

EDIT: On second thought, there is an easier way.
Try making a dummy on the motorbike that has the "forward/turning" control instead of the motorbike, and set the motorbike's vehicle to the dummy. Keep it so that the motorbike, not the dummy, turns backwards for the wheelie, though.
Thanks for the help,I never even considered that! I'm going to give both options a go and see what happens!
   
Reply With Quote
Old
InstigatedApprentice
Junior Member
 
Status: Offline
Posts: 3
Join Date: Mar 2018
Default 03-09-2018, 03:16 PM

Well that was an absolutely brilliant fix. Cheers!
   
Reply With Quote
Reply

Thread Tools
Display Modes

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.