Time Warp Mechanic #42
-
Hello there! I'm working on a personal project and I wanted to ask out of sheer curiosity to see if this was even possible: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
There's several ways to do it, I think the easiest way would to probably have the different time periods be in the scene, have 4 nodes for present, past, future and global (global would be for the player so they wouldn't be affected by time) in the level initialization script, save the other time periods to a variable and use remove_child and add_child to switch between the periods. |
Beta Was this translation helpful? Give feedback.
There's several ways to do it, I think the easiest way would to probably have the different time periods be in the scene, have 4 nodes for present, past, future and global (global would be for the player so they wouldn't be affected by time)
in the level initialization script, save the other time periods to a variable and use remove_child and add_child to switch between the periods.
so for example initializing could be
var getPresent = get_node("Present") var getPast = get_node("Past") var getFuture = get_node("Future") func _ready(): remove_child(getPast) remove_child(getFuture)
and you could call a function to change the time preiods something like
remove_child([current time period]) ad…