Alice Community  

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

Reply
 
Thread Tools Display Modes
object variable---speed---
Old
Liquidsky
Guest
 
Status:
Posts: n/a
Default object variable---speed--- - 09-11-2009, 10:23 PM

I have created a seaplane in alice, how do I make it speed up and slow down with the click of a button, how do I program that
Can some one please walk me through that ?
Thanks
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 09-11-2009, 10:32 PM

Heres a probably working method:

Plane move at 1m per second

Below is a number variable and a true/false variable:

speed of plane=1 Plane moving fast=f

when mouse is clicked on plane

loop infinity times
if plane moving fast==true
Speed of plane set to 1
else
if plane moving fast==false
Speed of plane set to 2


--------------------------next method------------------------

Loop infinity times
If/else speed of plane=2
plane move at speed 2m per second

------------------------next method---------

loop infinity times
If/else speed of plan=1
plane move at speed 1m per second
   
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.