Saturday, January 4, 2014

Space Shooter Day 8

today I learn about the tag function in Unity which make object organization and scripting a little bit easier

How ever I am having problem with getting the new part of the script to work. What I wrote is a script that will write a "string" which is a set of words when bullet hit an asteroid. However it seem that the script is correct because I was able to test in game mode just fine but the string is not printing like it suppose to
so my hypothesis is :
1. the bullet is not hitting the asteroid
or
2. Some in game function, setting is not set correctly

I been tackling this problem for a while now but it doesn't seem to be working so I'll continue next time if problem is unresolved i might skip it because this is minor detail and is not really needed for this game to be complete.

this code use a new function instead of function update it change to function OnTriggerEnter  (other : Collier)
which is a function use with object with rigid body to created interaction. In this case below is saying if the bullet (this is a bullet's script) hit an object with a tag name "astroid" then the object with the tag will reappear on the top at random x-axis. 

I couldn't find anything wrong with the script but it doesn't seem to be working so i'm looking into that.  


No comments:

Post a Comment