Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Questions and Comments (http://www.alice.org/community/forumdisplay.php?f=9)
-   -   Bullets number variable (http://www.alice.org/community/showthread.php?t=7105)

simsman2011 08-18-2011 07:00 AM

Bullets number variable
 
I wanted to make a number variable in a shoot method that expresses the number of bullets.........

here is the method:



[IMG]http://img810.imageshack.us/img810/4953/shotty6shoot.png[/IMG]





I tried: If {Bullets >= 1} except of {Bullets > 1}......
but it still shoots without limits......
please, tell me what can I do?......

legolizard 08-18-2011 12:32 PM

This is because every time you call fro your method you create a [I]new[/I] bullets variable. Just make this variable global(make it a world variable) and then use it.:)


All times are GMT -5. The time now is 04:49 AM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.