Many people have been critical about GMS not having constructors and overloads, thus not letting define and set variables for a new instance of an object before that instance runs the create event, thus forcing us to find workarounds.
Worry no more
instance_create_ext() and instance_create_ext_fast() are two scripts I've wrote that allows the user to define and set how many variables he want, like this instance_create_ext_fast(x,y,depth,oBox,"color",c_white,"grav",global.grav,"box_type","Wood")
It also returns the id of the created object if you use the instance_create_ext() script, to do something like var inst = instance_create_ext(x,y,depth,oPlayer,"alarmTime",random(100)) inst.alarm = inst.alarmTime
And of course, you can use it as a normal instance_create, but without having to define _layer or _depth, as you can use both, because the scripts detects if you put a depth or a layer
If you like this and you find it useful (which you probably will if you are at least a middle level user of GML), and you want/can support me, you can check my other assets (maybe my battle ship engine) or leave a buck in my itch.io account! Also, I would be very grateful if you could leave a like and a follow in my facebook page!
Thank you very much. Love -Floyd
Version 1.0.0. Published September 21, 2018
This asset hasn't received enough reviews yet.
You can only review assets you've bought.
No reviews have been left for this asset - be the first!