Page 1 of 1

Setting a spesific tile to be assigned to the DestroyTrigger

Posted: Fri Apr 08, 2016 4:16 am
by TheOriginalCj
So, I have an instance where I'm spawning in objects with the SpawnObjectTrigger and I need to destroy these objects after a given time.

So in this instance I'm using SteamSpawners. The function when started should find all the SteamSpawners and bind them to the DestroyObjects "array". When the timer trigger finishes it will trigger the destroy function.

I know a bit of C++ but I'm only doing single source code type projects. The tutorials have been helpful but don't exactly go into binding objects to an array-style variable (I'm probably not even using the right terminology... :/ )

Thanks for any and all help!

Re: Setting a spesific tile to be assigned to the DestroyTrigger

Posted: Fri Apr 08, 2016 8:49 pm
by Gurt
You will need to do some scripting. After SpawnObjectTrigger spawns an object you want to set a specific CustomID to that object. You can then grab all objects with a specific CustomID and destroy them all.
I don't have time for an in-depth example so check out viewforum.php?f=22 to get started. At viewtopic.php?f=22&t=67 you can see an example destroying all objects with a specific CustomID.