Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Reply
 
Thread Tools Display Modes
need urgent help
Old
intel8080
Junior Member
 
Status: Offline
Posts: 1
Join Date: Dec 2011
Default need urgent help - 12-13-2011, 04:36 PM

please, could some one tell me, that how can i reload bullets and how can i set each bullet false by firing every time...

suppose, i have 5 bullets..every time i fire, each bullet should be vanish accordingly, how can i make this method?
   
Reply With Quote
Invisible Bullets
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Talking Invisible Bullets - 12-14-2011, 01:52 PM

What I would do is make a variable called Counter, the increase it by 1 every time a bullet is fired. After that, make a bunch of if/else statements to see which number counter is at, and under those if/else statements set the proper bullet to isShowing == false.


--------------------------------------------------------------------------------------------------------------------------
I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes

Wondering about my Avatar?
http://en.wikipedia.org/wiki/Tardigrade

Wondering about my username?
http://www.youtube.com/watch?v=jG7vhMMXagQ
   
Reply With Quote
Old
dakota95
Senior Member
 
dakota95's Avatar
 
Status: Offline
Posts: 426
Join Date: Aug 2011
Location: like I would tell you. ;)
Default 12-14-2011, 02:05 PM

Quote:
Originally Posted by intel8080 View Post
please, could some one tell me, that how can i reload bullets and how can i set each bullet false by firing every time...

suppose, i have 5 bullets..every time i fire, each bullet should be vanish accordingly, how can i make this method?
would using one bullet work? It would work faster than multiple bullets and it is easier. You could just tell it to move back to the gun a split second after it is fired. The only problem with it, is that there is no limit to the amount of times you can fire.


<Insert_Signature_Here>
   
Reply With Quote
Old
waqar
Senior Member
 
Status: Offline
Posts: 51
Join Date: Sep 2011
Location: Pakistan
Default 12-19-2011, 02:59 PM

I guess this maybe helpfull for u
Attached Files
File Type: a2w bullet with barrel.a2w (1.67 MB, 3 views)
   
Reply With Quote
Old
Joker899
Junior Member
 
Status: Offline
Posts: 5
Join Date: Dec 2011
Location: Canada
Default 12-19-2011, 10:07 PM

Having bullets move back and forth between the gun tends to not work. The bullets ignore frames and any detection or bullet collision you had is ineffective.

Usually I use a method similar to this: http://www.alice.org/community/showthread.php?t=4861

That's the basic bullet collision detection I use (Look for the cone in the objects, that is the detector).

Also to keep track of bullets I use a number variable and some 3D text.

Lets say for example I use
Code:
3dtext set value (int (world.bulletvariable) as a string)
Use this in a infinite loop and it will keep track of your ammo.
Have the default setting of the variable be your max ammo in clip.
Now whenever you shoot just drag the variable in the shoot mechanism and choose decrement (world.bulletvariable) by 1. This will then adjust your ammo accordingly.

When you reload, just drag the variable into the reload mechanism and have it set (world.bulletvariable) to (30 or whatever your max ammo is)

Works like a charm. If I went a bit off-topic--sorry. Hope this helped.
   
Reply With Quote
Old
waqar
Senior Member
 
Status: Offline
Posts: 51
Join Date: Sep 2011
Location: Pakistan
Default 12-20-2011, 08:57 PM

believe me why go hard when u can do it in an easy way check out the FPS i made its working pretty cool w/o this bulllet detection thing i set that if mouse clicked on enemies do following methods check it out
http://dl.dropbox.com/u/52144883/COU...AT%20KIET.a2w:)

for screen shots and other link go here

http://alice.org/community/showthrea...4966#post44966
   
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 ©2018, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.