x


shooting in 2d problem

i want to shoot when i hold my mouse button but it wont happen here is my script (c#) and please bear with me im new to unity:

using UnityEngine; using System.Collections;

public class VariableScript : MonoBehaviour { public GameObject objBullet; public GameObject parBulletHit; public GameObject parAlienDeath; public GameObject parAlienHit; public GameObject parPlayerDeath; public GameObject parPlayerHit; }

more ▼

asked Dec 28, 2010 at 03:25 PM

mido555 gravatar image

mido555
74 18 16 22

That looks more like the bullet itself. Not the actual script that shoots :)

Dec 28, 2010 at 06:46 PM Ejlersen

oops added the worng script, here it is:

using UnityEngine; using System.Collections;

public class VariableScript : MonoBehaviour { public GameObject objBullet; public GameObject parBulletHit; public GameObject parAlienDeath; public GameObject parAlienHit; public GameObject parPlayerDeath; public GameObject parPlayerHit; }

Dec 28, 2010 at 09:41 PM mido555

edit your original post to include the correct code. it's a jumble in the comments.

Dec 29, 2010 at 01:23 PM dissidently

ok i did sorry it came out like this i had it all nice but it came out like this

Dec 29, 2010 at 01:57 PM mido555
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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:

x3034
x451
x144
x74

asked: Dec 28, 2010 at 03:25 PM

Seen: 1354 times

Last Updated: Dec 29, 2010 at 01:56 PM