Alice Community  

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

Reply
 
Thread Tools Display Modes
Timer Run Out
Old
BunnieBoo
Guest
 
Status:
Posts: n/a
Angry Timer Run Out - 03-21-2009, 04:54 AM

IGNORE THIS POST!!
YOU MIGHT FIND PART OF A SOLUTION IF YOU READ IT THOUGH.

Hi I'm kinda new to this forum thing, so bear with me, please
I have made a timer for my game, but...
When it runs out, I want Alice to do If/Else.

As in if you find all the pieces of this spaceship -
(scattered parts of one spaceship are clicked on, then they turn invisible and the corresponding part - on a different object, but the same type of spaceship - becomes visible) -
You see a 'well done' cut scene.

else you see a 'you loose' cut scene.

i've tested different ways by making a chicken get bigger
When timer == 0 didn't work
And Wait 55 seconds didn't work in sync with timer

And I'm not sure how to say 'When all the parts of the spaceship are showing'
I've tried doing them all seperately...but, no.
Tried doing the entire spaceship and, no.

Yes, I am using the right spaceship.

Please help, it's driven me mad for 3 weeks now!

Last edited by BunnieBoo; 04-17-2009 at 01:40 PM.
   
Reply With Quote
Old
Ch0pStickS
Guest
 
Status:
Posts: n/a
Default 03-21-2009, 10:30 AM

instead of == 0 try lessthan or equal to zero.
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Talking 03-22-2009, 08:58 AM

Actually, I think the problem is that if you are using an "event when" - it apparently doesn't get evaluated if some other code is running. See the attached code and note that if the delays are missing (or set too short) in either of the methods, you don't always see the full 10 spin cycles before the chicken disappears.

A word of caution. This is the sort of thing where I often make a wrong first guess. Be sure to experiment a bit more - and please post your results - whether they agree or disagree with my guess.
Attached Files
File Type: a2w Counter & When Test.a2w (222.0 KB, 39 views)
   
Reply With Quote
Thanks
Old
BunnieBoo
Guest
 
Status:
Posts: n/a
Talking Thanks - 03-24-2009, 10:44 AM

Thank you very much for the code!

Me being stupid and all...
When I run the world, the chicken spins for about five seconds, pauses facing forward and then spins for 5 secs. again, pauses etc.
Is this what you meant by the timing not being right, or am I going loopy?

Quote:
Originally Posted by Ch0pStickS View Post
instead of == 0 try lessthan or equal to zero.
How do you do equal to zero?

Thanks again for the code x
I'll post anything else that I do

Last edited by BunnieBoo; 03-24-2009 at 10:58 AM.
   
Reply With Quote
Next step please!?
Old
BunnieBoo
Guest
 
Status:
Posts: n/a
Default Next step please!? - 04-10-2009, 02:59 AM

Ok, I got this to work.
But I still need the If / Else.

Loop infinity times
While timer.text == 0.0
If true
wellDoneCutScene

Else
tryAgainCutScene

Thanks Dr. Jim, your guess did work

The timer.text bit works fine if you tell it to do one thing, but I need it to be something like:

While timer.text == 0.0
AND
If 'you've found all the pieces

Do 'well done'
Else do 'you lose'


Pleeeease help me

Thanks again
x

Last edited by BunnieBoo; 04-10-2009 at 03:04 AM. Reason: Forgot thank Dr Jim xD
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 04-11-2009, 12:00 PM

Quote:
Originally Posted by BunnieBoo View Post
AND
If 'you've found all the pieces
Make a list of all the pieces and test each item - see attached.
Attached Files
File Type: a2w Is Showing.a2w (590.8 KB, 10 views)
   
Reply With Quote
VERY sorry Dr Jim
Old
BunnieBoo
Guest
 
Status:
Posts: n/a
Default VERY sorry Dr Jim - 04-12-2009, 07:24 AM

I'm VERY sorry, Dr Jim
I don't understand the code you put in the world.
Thank you for taking your time to put it together, could you explain it, please?

Just now, I'm trying to do the If/Else seperately as in:

While timer.text == 0.0 do
'you loose'

Bad thing about that is, if they 'find' all the parts just as it hits zero, they're still gonna get you lose?

While is showing and while is 100% opaque don't work.
So I was thinking maybe get them to press a button when they find all the parts? But they cud press it without having finished.

Thank you very much for helping

BunnieBoo
x
   
Reply With Quote
OK, just tried this.
Old
BunnieBoo
Guest
 
Status:
Posts: n/a
Default OK, just tried this. - 04-12-2009, 08:17 AM

Like I sed in the original post:
scattered parts of one spaceship are clicked on, then they turn invisible and the corresponding part (on a different object, but the same type of spaceship) becomes visible

so I told the 'final, rebuilt spaceship' parts to set to 100% opaticity when the scattered parts are clicked on
I have now changed this, so that:
at the beggining, the rebuilt spaceship is showing=false
and when the scattered part is clicked on it sets to showing=true

now, i thought if i did:
if 'rebuilt spaceship' is showing=true
do 'this'

would work, but it doesn't

So; I just tried:
putting a lever in

when lever is clicked:
"lever handle goes forward then back"
If rebuilt lunar lander is showing
do chicken resize 1000000 (just to check that it works)

nope. it doesn't

BunnieBoo
x

Last edited by BunnieBoo; 04-12-2009 at 08:21 AM.
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 04-13-2009, 11:48 AM

Seems like it should work - at least on a PC running XP and Alice 2.0. Opacity can be a problem with other configurations.

I suggest you post the code and I'll take a look.
   
Reply With Quote
Reply

Tags
cut, cutscene, run, scene, timer

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 ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.