#I m looking at the tutorial and the code
1 messages · Page 1 of 1 (latest)
this is mine
- I want the code to change the hp value(Which works successfully
- everything starts falling apart when you get to the particle system.
Just move your destroy to the end, then
So that the code all runs before destroying
Destroy happens at the end of the frame so that shouldn't matter
Have you assigned the particle system in the inspector?
wdym i dont follow
Also is the particle system a child of this object?
I mean the healthGain variable
the health gain effect isnt a child of the health collectable
Im also noticing an issue with hurt effect as well
If HealthEffect is a child of Ruby, I think RubyController should do the particle effect playing
currently hurteffect is working as it should be but the moment i swap it out the particles dont show up
Instead of this other script
okay
Move the whole healthGain variable into RubyController
I did it and it started working
thank you
but for learning purposes is it not working because the health gain effect wasn't a child of the pickup
I guess the healthGain variable wasn't set correctly in HealthCollectible's inspector
Not sure, you didn't show it
It wasn't
But if it's a part of Ruby, then RubyController should have the reference to it
okay