Fangames > Programming Questions
How do I make only one object not be destroyed when pressing R?
(1/1)
l3agu32:
I made an object only for visual purpose and want it not to be destroyed when pressing R. I tried making the room persistent, but it affected other objects, what slowed down the rhythm of the level design.
Kyir:
You could make the object itself persistent I guess? Just be sure to check if one exists before making more so you don't overload everything.
l3agu32:
--- Quote from: Kyir on March 19, 2016, 04:47:44 PM ---You could make the object itself persistent I guess? Just be sure to check if one exists before making more so you don't overload everything.
--- End quote ---
The object is actually already persistent.
patrickgh3:
I think the best approach is to make the object or objects persistent.
As for it not working when you tried it, here's an approach I like using. Start a new empty project, and then import the visual effect objects from your main project (right click on "Objects" -> add existing object). You could also instead just create simplified versions of the objects. Then make an object that switches or restarts the room when you press a key. Now you can fiddle around and make the effect persist properly, without anything getting in your way. Once you've got it working, you can go back to your main project and make it work there. And if you have trouble during this step, you know that it's something external in your project that's affecting it, so that helps to isolate the problem. I hope this approach helps.
Navigation
[0] Message Index
Go to full version