Quantcast
Channel: Latest Questions by Montraydavis
Viewing all articles
Browse latest Browse all 6

Passing param to 'Start ( )' on Instantiate?

$
0
0
I am building a Magic (Damage) system, and I basically need to have it attack the player, then be destroyed. Now, I already know that I can easily just use a few ifs in Update to get this job done, but, I want to pass several pieces of data, and ensure that they are all recieved before this 'oneShot' script is applied. I do know that I could just use a boolean to ask if X is ativated, but, how would one go about passing data in: function blaaa ( ) { var Google = Instantiate ( Google, Googles.transfrom.position, Googles.transform.rotation ) ; // <--- Here is where I want to pass things like "Magic Type, Damage, Defense, etc. } I don't really want to Access the script, and set variables. I'd much just rather do this in one shot . Any help would be greatly appreaciated ! Thanks much :D

Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>