x


simple Shooting in C# script please

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

thankyou!

more ▼

asked Nov 01 '10 at 12:38 PM

Daniel Girgis gravatar image

Daniel Girgis
51 13 13 17

You might want to explain what it is that you actually need, and what part of it you cant figure out

Nov 01 '10 at 12:48 PM Atnas1010

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 :)

Nov 01 '10 at 01:14 PM Daniel Girgis

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.

Nov 01 '10 at 02:26 PM skovacs1

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.

Jan 31 '11 at 10:42 PM pdh1kid

ive improved alot from back then i can do this stuff with my eyes closed now but thanks guys for ure help

Feb 02 '11 at 11:54 AM Daniel Girgis
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

can anyone help me make a raycast shoot script please..

more ▼

answered Jan 01 at 08:12 PM

Gab Steve gravatar image

Gab Steve
1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3333
x308
x275
x98

asked: Nov 01 '10 at 12:38 PM

Seen: 2363 times

Last Updated: Jan 01 at 08:12 PM