|
Post by jrackley on Sept 10, 2017 17:31:53 GMT
I have a case where I am trying to add the vObjectDamage script attached to a sphere collider nested inside of the player prefab, and then have it only activate during certain circumstances to damage the player. tag is set to player and all values are correct.
The problem is that whenever I nest it in the player, the damage value disappears on the script. If I unnest it then the value returns on the script. Is this normal or maybe I am missing something here, I didnt see anything in the code that would cause this off the top of my head. The damage value is set to public so I am stumped if this is an actual bug or not?
Thanks for ant advice in advance
|
|
|
Post by shadex on Sept 11, 2017 21:02:56 GMT
I have a case where I am trying to add the vObjectDamage script attached to a sphere collider nested inside of the player prefab, and then have it only activate during certain circumstances to damage the player. tag is set to player and all values are correct. The problem is that whenever I nest it in the player, the damage value disappears on the script. If I unnest it then the value returns on the script. Is this normal or maybe I am missing something here, I didnt see anything in the code that would cause this off the top of my head. The damage value is set to public so I am stumped if this is an actual bug or not? Thanks for ant advice in advance Is it on the same gameobject as the player and all the scripts? or is it a child of the player? I've noticed, especially when i spawn things, that if there are to many components on a single object, vObjectDamage seems to get either destroyed or acts buggy. I also noticed that if you spawn a gameobject with vObjectDamage to far down in a heiarchy, it can make the child no appear at all. I've been activly testing this, and it does seem to point to ObjectDamage being the only thing effected. Another thing is if you are using Trigger instead of collision for vObjectDamage, that the target must enter the trigger once it is created. So if you where to have the trigger on the player, they will never "enter" it since they are already inside it. Hope that helps a little.
|
|
|
Post by jrackley on Sept 11, 2017 22:00:55 GMT
Yep it is nested as a child of the player and using on collision. But the damage value just disappears all together. Not a hug deal for now I guess, but just found it really odd. Seems though that you have seen similar so at least I am not alone here! by the way shadex, your magic system has been working really well, nice work on it.
|
|
|
Post by shadex on Sept 12, 2017 7:02:36 GMT
Yep it is nested as a child of the player and using on collision. But the damage value just disappears all together. Not a hug deal for now I guess, but just found it really odd. Seems though that you have seen similar so at least I am not alone here! by the way shadex , your magic system has been working really well, nice work on it. Lol, just wait for the update!
|
|