So, im making a knockoff kingdom hearts game (just for fun) and the little ice spell (or whatever) shoots an ice ball at the transforms direction i get how to instatiate (spellcheck? xD) and shoot it from a point.
I also get the OnTriggerEnter but how do I get the info from the player to the iceball , then the iceball to the enemy
As in (c# btw)
PlayerScript
void start () {
SpellStr = 9}
void Update () {
if(Input.GetButtonDown(“magic”)) {
instatiate(blah , spawnpoint, Quaternion.identiy);
blah.rigidbody.Addforce * 1000;}
how do i get the script on “blah” and change a variable (lets say ‘damage’) and set it to Spellstr
then how do I get Hit from Blah into the OnTriggerEnter and change the enemies health by Hit?
}