Levels

33 views
Skip to first unread message

nram...@ellingtonps.net

unread,
Dec 11, 2014, 8:45:57 AM12/11/14
to starlo...@googlegroups.com
I have a student that is wondering how to go from level 2 to level 3 using the same procedure and colliding into the same player. The problem he is having is that there is only one collision block available with that specific procedure for reaching level 2. He wants to reach level 3 with the same procedure. Is there a way to do this? Thanks!

Daniel Wendel

unread,
Dec 12, 2014, 2:17:57 PM12/12/14
to starlo...@googlegroups.com
Yes, absolutely! He just needs to use an if block to check the current level. For example:
if current level = "Level 1"
   change level "Level 2"
else 
   if current level = "Level 2"
       change level "Level 3"

Note that the second if needs to be in the "else" part of the first if-else block. Otherwise, the first one would switch it to level 2, but then the second one would see that it was level 2 and immediately switch to level 3.

--Daniel

On Thu, Dec 11, 2014 at 8:45 AM, <nram...@ellingtonps.net> wrote:
I have a student that is wondering how to go from level 2 to level 3 using the same procedure and colliding into the same player. The problem he is having is that there is only one collision block available with that specific procedure for reaching level 2. He wants to reach level 3 with the same procedure. Is there a way to do this? Thanks!

--
You received this message because you are subscribed to the Google Groups "StarLogo TNG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to starlogo-tng...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

nram...@ellingtonps.net

unread,
Dec 15, 2014, 7:30:15 AM12/15/14
to starlo...@googlegroups.com
Great, thank you!
Reply all
Reply to author
Forward
0 new messages