Y
yinyie
Guest
Hey there sorry if the question is dumb, Im new and unsure about what functions are available to me at this point.
I have currently set up a "button" which when clicked spawns a new instance of an object at a specific position.
What i want to do is modify the position at which the instance is spawned IF any other instance already exists there.
I first tried DND with if "any object at place" which sounds like it does what i want to do until i checked the codeit creates and place_empty seems to return if a collision event is happening at the position (as one object doesnt collide with itself afaik ... this does something entirely different to what it claims it does)
I could try to use "get_position" if there was only one instance present which i potentially have to check for but as it stands the game im trying to create could potentially have multiple instances of multiple objects at any given time (say 50 objects and up to 20 instances of each) trying to get position of every single potentially existing instance is a complete waste of my time and ressources so im wondering if theres any function that could help me here.
My first idea is to spawn a test instance at the position first then use place_empty and delete the the test instance afterwards but that doesnt feel clean and more like im working around the code instead of with it.
I have currently set up a "button" which when clicked spawns a new instance of an object at a specific position.
What i want to do is modify the position at which the instance is spawned IF any other instance already exists there.
I first tried DND with if "any object at place" which sounds like it does what i want to do until i checked the codeit creates and place_empty seems to return if a collision event is happening at the position (as one object doesnt collide with itself afaik ... this does something entirely different to what it claims it does)
I could try to use "get_position" if there was only one instance present which i potentially have to check for but as it stands the game im trying to create could potentially have multiple instances of multiple objects at any given time (say 50 objects and up to 20 instances of each) trying to get position of every single potentially existing instance is a complete waste of my time and ressources so im wondering if theres any function that could help me here.
My first idea is to spawn a test instance at the position first then use place_empty and delete the the test instance afterwards but that doesnt feel clean and more like im working around the code instead of with it.