Alice Community  

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

Reply
 
Thread Tools Display Modes
How do i make a bullet counter?
Old
Silux
Junior Member
 
Status: Offline
Posts: 9
Join Date: Sep 2011
Default How do i make a bullet counter? - 09-22-2011, 08:13 PM

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?
   
Reply With Quote
Old
Silux
Junior Member
 
Status: Offline
Posts: 9
Join Date: Sep 2011
Default 09-22-2011, 08:32 PM

Like when you put in a if/else and i try to put it in true but it wont let me
   
Reply With Quote
Old
Silux
Junior Member
 
Status: Offline
Posts: 9
Join Date: Sep 2011
Default 09-22-2011, 08:44 PM

Because i want it to stop at 0 but it wont...can someone please help?
   
Reply With Quote
Old
David B
Senior Member
 
David B's Avatar
 
Status: Offline
Posts: 1,145
Join Date: Dec 2010
Location: N/A
Default 09-23-2011, 06:27 AM

Please avoid double/triple posting when possible. If you want to add more infomation to a post click on the 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.

Last edited by David B; 09-23-2011 at 06:30 AM.
   
Reply With Quote
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default 09-23-2011, 06: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


Thank you for taking the time to read this signature. This signature loves you.
   
Reply With Quote
Old
Silux
Junior Member
 
Status: Offline
Posts: 9
Join Date: Sep 2011
Default 09-23-2011, 07: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
   
Reply With Quote
Old
InsertName
Senior Member
 
InsertName's Avatar
 
Status: Offline
Posts: 341
Join Date: Jun 2011
Location: In a house
Default 09-23-2011, 01:14 PM

Quote:
Originally Posted by DensetsuNoKaboom View Post
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
Basicly since the function you are tying to do is under World function you have to make the bullet counter a World variable

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


__№_₤⅞__
Handguns: http://www.alice.org/community/showthread.php?p=45349
MINECRAFT IN ALICE: http://alice.org/community/showthread.php?p=48208
My Stupid Animations: http://alice.org/community/album.php?albumid=119
   
Reply With Quote
Old
Silux
Junior Member
 
Status: Offline
Posts: 9
Join Date: Sep 2011
Default 09-23-2011, 10:21 PM

Sorry but how do you make it into a world variable lol?
   
Reply With Quote
Old
adams34
Guest
 
Status:
Posts: n/a
Default 09-25-2011, 11: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.
   
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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.