Alice Community  

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

Reply
 
Thread Tools Display Modes
How do I...do a method after t seconds?
Old
jissan11
Junior Member
 
Status: Offline
Posts: 14
Join Date: Mar 2011
Question How do I...do a method after t seconds? - 04-02-2011, 07:35 PM

I have a world running where a dragon and a blimp are going towards each other. If they get too close, they'll avoid each other.

Now for the part I need help with. I want the dragon and blimp to turn, and come back on THE SAME AXIS THEY ARE ON CURRENTLY so that they can redo the collision miss and this will continue infinitely.

Thank you for the assistance.

P.S.: In the attached code, my attempt at this involves the objects turning after 10 seconds. It does not work.

P.P.S: It will be welcomed if you post comments while doing any changes to the code so that I can understand what you did.

Sorry about the late edit, but it will be actually much better if the changes done are NOT so that they can be done after t seconds
Attached Files
File Type: a2w aliceP4T31.a2w (1.72 MB, 3 views)

Last edited by jissan11; 04-02-2011 at 07:37 PM. Reason: Forgetting to give key info
   
Reply With Quote
Old
nickster654
Senior Member
 
Status: Offline
Posts: 180
Join Date: Feb 2011
Location: nickster12345678@gmail.com
Default 04-02-2011, 07:44 PM

ill look at it and see what i can doo
   
Reply With Quote
Old
nickster654
Senior Member
 
Status: Offline
Posts: 180
Join Date: Feb 2011
Location: nickster12345678@gmail.com
Default 04-02-2011, 08:01 PM

wait after how many seconds do you want them to turn?
   
Reply With Quote
Old
jissan11
Junior Member
 
Status: Offline
Posts: 14
Join Date: Mar 2011
Default 04-02-2011, 08:11 PM

Like I say at the bottom, it would be best if the turn were done WITHOUT time, but instead before the left the screen.
   
Reply With Quote
Old
nickster654
Senior Member
 
Status: Offline
Posts: 180
Join Date: Feb 2011
Location: nickster12345678@gmail.com
Default 04-02-2011, 08:54 PM

Quote:
Originally Posted by jissan11 View Post
Like I say at the bottom, it would be best if the turn were done WITHOUT time, but instead before the left the screen.
ok this took about 2 minutes, is this what ya wanted?
OH and i had to disable the sounds because it kept saying error, sooooo ya might want to enable them
Attached Files
File Type: a2w dragon, blimp helping.a2w (1.71 MB, 4 views)
   
Reply With Quote
Old
jissan11
Junior Member
 
Status: Offline
Posts: 14
Join Date: Mar 2011
Default 04-02-2011, 10:35 PM

I had managed to get something like that to work previously.

What I need is the exact same thing as you got, BUT with the blimp and dragon both going straight ahead until they came close to the end of the screen and THEN turn.

When they start going forward again, they should come across each other again and do Dragon.dragonCollision again, with it doing this forever.

Thanks for getting what you have though.
   
Reply With Quote
Old
nickster654
Senior Member
 
Status: Offline
Posts: 180
Join Date: Feb 2011
Location: nickster12345678@gmail.com
Default 04-03-2011, 08:47 AM

Quote:
Originally Posted by jissan11 View Post
I had managed to get something like that to work previously.

What I need is the exact same thing as you got, BUT with the blimp and dragon both going straight ahead until they came close to the end of the screen and THEN turn.

When they start going forward again, they should come across each other again and do Dragon.dragonCollision again, with it doing this forever.

Thanks for getting what you have though.
ohhh ok, i can do tht real quick
   
Reply With Quote
Old
nickster654
Senior Member
 
Status: Offline
Posts: 180
Join Date: Feb 2011
Location: nickster12345678@gmail.com
Default 04-03-2011, 12:33 PM

i thinkkk i got it
Attached Files
File Type: a2w dragon, blimp helping.a2w (1.73 MB, 3 views)

Last edited by nickster654; 04-03-2011 at 01:38 PM.
   
Reply With Quote
Old
David B
Senior Member
 
David B's Avatar
 
Status: Offline
Posts: 1,143
Join Date: Dec 2010
Location: The Twilight Zone!
Default 04-03-2011, 01:19 PM

Along the bottom of an Alice method, is the "wait" method.


██████████████████████
█░░░░░░░░░░░░░░░░░░░░█
█░▓▓▓▓░░░▓░▓░▓░░▓▓▓▓░█
█░▓░░░▓░░▓░▓░▓░░▓░░░░█
█░▓▓▓▓░░░▓░▓░▓░░▓▓▓░░█
█░▓░░░░░░▓░▓░▓░░▓░░░░█
█░▓░░░░░░░▓░▓░░░▓░░░░█
█░░░░░░░░░░░░░░░░░░░░█
██████████████████████

________________

Alice Hater? Rant Here!: http://tinyurl.com/HateAlice
   
Reply With Quote
Old
nickster654
Senior Member
 
Status: Offline
Posts: 180
Join Date: Feb 2011
Location: nickster12345678@gmail.com
Default 04-03-2011, 01:23 PM

Quote:
Originally Posted by David B View Post
Along the bottom of an Alice method, is the "wait" method.
............... wow im stupid....... didnt think of that
   
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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.