Alice Community  

Go Back   Alice Community > Alice 3 > How Do I?

Reply
 
Thread Tools Display Modes
I'm making a tower defense game, help me!!!
Old
chicky371
Junior Member
 
Status: Offline
Posts: 3
Join Date: Apr 2018
Location: I live in Ho Chi Minh city, Vietnam
Default I'm making a tower defense game, help me!!! - 04-23-2018, 06:50 AM

I tried to use If/Else statement to ask the tower shoot when the distance between the tower and alien is <= 4, but it did not work.
This is the link to my world:
https://drive.google.com/file/d/1oPb...ew?usp=sharing
   
Reply With Quote
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default 04-23-2018, 02:38 PM

Quote:
Originally Posted by chicky371 View Post
I tried to use If/Else statement to ask the tower shoot when the distance between the tower and alien is <= 4, but it did not work.
This is the link to my world:
https://drive.google.com/file/d/1oPb...ew?usp=sharing
I could not find the if statement in your movie but I think I know what the problem is. The way the movie is setup it will call "myFirstMethod" and then exit. If the distance is not <= 4 when the movie starts your condition will not be true. There are two common ways to do this.
  1. put everything within a while loop that ends when the program is done.
  2. use an event to keep checking the condition when the movie is running.
Mark


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote
Old
michaelauthour
Member
 
Status: Offline
Posts: 15
Join Date: Aug 2018
Default 08-07-2018, 06:07 AM

having the same issues. will follow this thread.

muchael
author
https://africanbettingguide.com
   
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.