i can find them in java script everywhere but i cant seem to change it around into C# script can someone just send me a simple code i know how to add prefabs and spawn points for bullets ect
Nov 01 '10 at 12:38 PM
You might want to explain what it is that you actually need, and what part of it you cant figure out
just the public part really i dunno what to put in public bullet : ? im pretty confused there but i can write the rest myself thanks buddy :)
public variables are serialized in the editor. You can add any kind of object of that type (except for script types) to that slot in the editor. Alternatively, to set a public variable programmatically, you need to get a reference to the script and set the variable on the reference.
with the script you could be using, if the type of variable that you are using for the bullet/projectile,is a rigidbody and your bullet prefab does not have a rigidbody component then it will not work.
ive improved alot from back then i can do this stuff with my eyes closed now but thanks guys for ure help
can anyone help me make a raycast shoot script please..
Jan 01 at 08:12 PM
Jan 01 at 07:55 PM
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
The best place to ask and answer questions about development with Unity. Check out our FAQ for more information.
To help users post good questions and use the site effectively we have posted a tutorial video. Please check it out.
asked: Nov 01 '10 at 12:38 PM
Seen: 2363 times
Last Updated: Jan 01 at 08:12 PM
Control amount of bullets
Bullets sometimes shoot under map
Need a script for a gun that shoots bullet using raycast
shooting more than 1 bullet
Shooting causes character to shoot forward
How do I make the gun stop shooting when I am out of ammo?
Bullet Collision Issues
How do shoot a bullet when the right button is clicked?
Raycasr in my fps?
Enemy Damage problem