camera_set_view_pos()
Okay so in the obj_camera. In a step event. Something like:target = obj_Aura2 ?
Try:camera_set_view_pos()
It all depends on how your camera is programmed, you must update the camera's position on the step, so just change the target.
The more important detail you left out is HOW the ship(obj_Aura2) is spawned. When you do that, is something preventing you from setting the camera's target to the id of the newly-spawned instance?when the ship(obj_Aura2) is spawned
Yeah I suppose I could try using the step event in the button that spawns the ship. Never thought of that. If that's what you mean.The more important detail you left out is HOW the ship(obj_Aura2) is spawned. When you do that, is something preventing you from setting the camera's target to the id of the newly-spawned instance?
If you're spawning the ship by checking for mouse clicks in the step event, then yes, that makes sense. If you're using a Click Event, then you would put it there. In short, the best place to put code that runs when something changes is in the place where the change happens. When the ship spawns, that's when you do EVERYTHING that should happen when the ship spawns. Having objects sit out there and monitor for conditions to change can work, but it generally isn't the best way to do things.step event in the button
Thanks for explaining that to me. So I group objects in my instances though. I'm thinking it saves on memory or something? You're saying maybe I should have one object per instance so I can call them individually from the Instance id?If you're spawning the ship by checking for mouse clicks in the step event, then yes, that makes sense. If you're using a Click Event, then you would put it there. In short, the best place to put code that runs when something changes is in the place where the change happens. When the ship spawns, that's when you do EVERYTHING that should happen when the ship spawns. Having objects sit out there and monitor for conditions to change can work, but it generally isn't the best way to do things.
It's also much easier that way to use an instance id, since you just spawned the ship and you know what the instance id is, rather than trying to use the object id as suggested here. If there's only ever one instance of any given object at a time, the object id can be used that way, but I think using instance ids is just better for that in general.
No. You don't seem to understand the difference between objects and instances. You use instance IDs so that you don't NEED separate objects for every instance.You're saying maybe I should have one object per instance so I can call them individually from the Instance id?
In what way is running a step event in a button relevant to what you're doing? Your responses in this thread are demonstrating a lack of understanding of some very fundamental aspects of Game Maker. I think you may need to do some more basic tutorials and learn the simple things before you try to do anything complicated.I don't know if the step event would run that command after the instance is destroyed?