Chris Smith
Member
Hey guys, so I've been doing a game jam, and naturally some stupid stuff got me all kinds of stuck for almost a whole day now. I've been finding little things because of this, but not making any progress. But I've gotten my main issue down to an issue regarding activating objects.
So here's the rundown.
When the game starts, the first thing I do is create 62 instances of obj_npc, with various things within them being randomized. In the first room they are all left active, as the title screen just displays all of your NPCs and it's kinda neat. I like it.
The way I want to control which rooms the NPCs show up in, is by activating all obj_npc in the Room End, and deactivating them all in the Room Start event (and reactivating all the NPCs that are supposed to be active in that room) - since persistent objects that are deactivated at Room End will be discarded, and I don't want that... so I activate them all for the last frame.
However. it seems like activating them on Room End is still discarding them. But if they're active before Room End, they're just fine.
1. Why does activating on Room End not work?
2. How would you suggest activating them shortly before room end?
Many thanks, friends.
Update: Here's a video I made displaying the issue and relevant code.
So here's the rundown.
When the game starts, the first thing I do is create 62 instances of obj_npc, with various things within them being randomized. In the first room they are all left active, as the title screen just displays all of your NPCs and it's kinda neat. I like it.
The way I want to control which rooms the NPCs show up in, is by activating all obj_npc in the Room End, and deactivating them all in the Room Start event (and reactivating all the NPCs that are supposed to be active in that room) - since persistent objects that are deactivated at Room End will be discarded, and I don't want that... so I activate them all for the last frame.
However. it seems like activating them on Room End is still discarding them. But if they're active before Room End, they're just fine.
1. Why does activating on Room End not work?
2. How would you suggest activating them shortly before room end?
Many thanks, friends.
Update: Here's a video I made displaying the issue and relevant code.
Last edited: