Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   How do i make a bullet counter? (http://www.alice.org/community/showthread.php?t=7268)

Silux 09-22-2011 07:13 PM

How do i make a bullet counter?
 
I watched the vid on youtube on how to make one but it didnt work...when i try to drag the variable into true it wont let me can someone help?

Silux 09-22-2011 07:32 PM

Like when you put in a if/else and i try to put it in true but it wont let me

Silux 09-22-2011 07:44 PM

Because i want it to stop at 0 but it wont...can someone please help?

David B 09-23-2011 05:27 AM

Please avoid double/triple posting when possible. If you want to add more infomation to a post click on the [IMG]http://www.alice.org/community/images/aria/buttons/edit.gif[/IMG] button.

As for your problem, I don't know what to tell you. You could maybe do something like once the bullet is one meter away from the gun increment bullet_counter by one. If you need me to show you that in Alice code language, let me know, and I will.

DensetsuNoKaboom 09-23-2011 05:41 AM

Sometimes if you create a variable for one object, it won't let you put it into if/elses in another object's methods.

So what you do is, put your desired if/else with the variable in it in a method for the object that has the variable, then drag said if/else to the clipboard in the top-right corner, go to where you want the method to be, and drag from the clipboard to there.

Did you understand all that?
>Yes
>No

Silux 09-23-2011 06:20 AM

It didnt work...i cant drag it into that true box you know the one that if you click on new options pop up and i cant find a way to do it

InsertName 09-23-2011 12:14 PM

[QUOTE=DensetsuNoKaboom;41822]Sometimes if you create a variable for one object, it won't let you put it into if/elses in another object's methods.

So what you do is, put your desired if/else with the variable in it in a method for the object that has the variable, then drag said if/else to the clipboard in the top-right corner, go to where you want the method to be, and drag from the clipboard to there.

Did you understand all that?
>Yes
>No[/QUOTE]

Basicly since the function you are tying to do is under [U]World[/U] function you have to make the bullet counter a [U]World[/U] variable

I hope this clears it up, I had trouble with the same thing.

Silux 09-23-2011 09:21 PM

Sorry but how do you make it into a world variable lol?

adams34 09-25-2011 10:04 AM

As for your problem, I don't know what to tell you. You could maybe do something like once the bullet is one meter away from the gun increment bullet_counter by one. If you need me to show you that in Alice code language, let me know, and I will.


All times are GMT -5. The time now is 12:06 AM.

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