I have implemented another cool feature into my game. It now gets dark and night. I have made it to where when it gets dark torches are lit inside cities. If you are not near a light when it gets dark, several of your stats are lower and, obviously, you can't see as well. I am trying to decide whether or not you can have a lantern or a spell to make light when you are own your own in the woods.
However, there is a problem now. I have one object, placed in room one, that creates all the persistent objects. So when you go from room one to another and then back, all of the objects are created again. Now, you have two guys,two everythings. Is there a way to have something only created once, or make rooms persistent???Screenshots:This is set at about down, which is near an outpost, which have torches.http://greaterthanvideogames.com/twok_s_1.PNGDuring the day, the torches are extinguished.http://greaterthanvideogames.com/twok_s_2.PNGA straw roof buildinghttp://greaterthanvideogames.com/twok_s_3.PNGWhen you first enter, the roof quickly fades away.http://greaterthanvideogames.com/twok_s_4.PNGNo roof!http://greaterthanvideogames.com/twok_s_5.PNGDon't get stuck in the dark by yourself.http://greaterthanvideogames.com/twok_s_6.PNGPlease leave any suggestions you have-3492 hits-GTVG
Click the little "Persistant" box in the room editor.
Khan is never in the dark.
This should fix it. let's say the guy's object name is obj_Guy. Not in the Create Event, in the Room Start event, type this:
if instance_count(obj_Guy)>1{obj_Guy.instance_destroy()instance_create(x,y,obj_Guy)}For some reason instance_count doesn't work :( It turns a different color when I type it though.
Unknown function or script: instance_countThxs tg persistent works.