|
hey guys im following a tutorial series on youtube and im on step 11....which can be found here I can make the turret shoot but when i push spacebar the turret shoots instead of the worm. I dont understand what i did wrong. Here is the code:
If you cant help i understand. its ok. ill find help on their website hopefully if they ever write back. thanks anyway.
(comments are locked)
|
|
I am not sure what you mean saying you're shooting when you press space bar. There is no line of code that mention space bar or even input in your example. None the less, looking at the code I see that you instantiate the bullet at some object called "spawnPoint". If you want to instantiate the object on the same position as the script is on, you can modify that piece of code to
This require that your script is located on the worm. i have to objects in my scene called spawn point. one for the turret to shoot and the other for the worm to shoot. I need to be able to shoot with the worm with spacebar and the turret to shoot by itself. which it does. its just when i hit spacebar it uses the turrets spawnpoint instead of the worms spawnpoint and it shoots from the turret.
Jan 11 '11 at 12:33 AM
Brandon 8
Oh ok, change name on the worms "spawnPoint" to "wormSpawnPoint" then?
Jan 11 '11 at 09:42 AM
Statement ♦♦
There is no guarantee which one of the objects you'll get if they are named the same.
Jan 11 '11 at 09:43 AM
Statement ♦♦
(comments are locked)
|

"If you cant help i understand. its ok. ill find help on their website hopefully if they ever write back. thanks anyway." It's funny you say that on a site dedicated to help people.