Object instances?

Yasha asked 5 years ago

So I really enjoyed doing Danny’s space-shooter tutorial and I made a neat little take on it that you can see here: https://snowpawstudios.itch.io/deathwing?secret=XfuUTGDWpG9ANCPK0hajomqqq28
Check it out, its awesome 🙂
Anyway, I started on a tower defense project, and I was making great progress, easily implementing tower spawning systems, enemy spawning, waves etc. But then when I tried setting up the logic for targeting and shooting, I found something that blew my mind: instances of objects do not seem to be independent in Fusion. In other game engines I’ve used whenever I instantiate an instance of an object, that instance has its own independent variables and is treated essentially as a separate “cookie” made from the “cookie cutter” (the master object) so to speak. I’ve spent hours banging my head against this, but from what I can gather, to get a similar functionality in Fusion I have to run fast loops and store the unique object ID- in this case for both the towers spawned and each enemy, and perhaps run a nested loop to determine which enemy is within range of which tower?
I’m used to solving the problem by writing something like “target= collision_circle(x, y, range, enemy) / “if target exists rotate tower and shoot”. The wording differs slightly by language/engine, but once that’s set up every tower will independently find, track, and shoot at its own target within range. The paradigm in Fusion seems very different though, and its frustrating me to no end. I’ve signed up for Danny’s new course starting in May, hopefully that will help me push through this sticking point. If you guys have any advice or thoughts please let me know! Other than this Fusion has been so amazingly fast and easy to use, I have the feeling that I just need to get over this hump and everything will fall into place.