[RMVX ACE]TRANSFERRING AN EVENT FROM A SEPARATE MAP
Posts
Pages:
1
Hey guys!
So in my game I'm trying to make a type of system were one map holds events than those events can be brought into the current map that the player is on.
To my knowledge this can only be done with a script, but the scripts I've seen
only clone event's. I wan't a fully functional version of the one individual event that can move and all that good stuff. Can anyone help me find a script or create one for this? I just wan't something super simple.
Please don't reply to this saying that I can just make an event in every map that jumps to the player I know you can do that but I wan't a system that can transfer an event from another map.
I would also like so that when the event get's done it goes right back to the map it came from.
So in my game I'm trying to make a type of system were one map holds events than those events can be brought into the current map that the player is on.
To my knowledge this can only be done with a script, but the scripts I've seen
only clone event's. I wan't a fully functional version of the one individual event that can move and all that good stuff. Can anyone help me find a script or create one for this? I just wan't something super simple.
Please don't reply to this saying that I can just make an event in every map that jumps to the player I know you can do that but I wan't a system that can transfer an event from another map.
I would also like so that when the event get's done it goes right back to the map it came from.
The thought in my head is to make a function that creates a temporary variable that's an instance of Game_Event, then add it to the event array of the current map. You'd need two things. The ID of the map the event you're trying to copy is on, and the id of the event you're trying to copy. It might look something like...
...this? I fully admit that haven't actually tested this code/theory. However, I don't think there wouldn't necessarily be a need to transfer the event back to it's original location? In theory, it would occur with a map transfer, which loads the event data attributed to the map it's transferring to.
Though, the tricky/icky thing could be events that use self-switches for their page conditions, as self-switches include both map_id and event_id in their data.
*Edit: Looked into this a bit more, since I wasn't 100% sure if the "events" variable was a reader or an accessor. As it turns out, it's a reader. Which might mean it's a read-only variable, except within the functions, or objects of, Game_Map.
That's not what I was worried about, though. What does worry me is that I remember looking at the value of "$game_map.events" through the console, and seeing a hash table. Which confused the hell outta me. Why is that data stored as a hash table when the actual processing of how $game_map.events is created suggests an array to me?
So, in the end, doing a ".push" function on "$game_map.events" might not produce the intended results! However, if I was able to at least point you in a direction that gets you to a viable solution, I feel like I've done my jobeven if I was absolutely terrible at it.
def copy_event(map_id, event_id) event = Game_Event.new(map_id, event_id) $game_map.events.push(event) end
...this? I fully admit that haven't actually tested this code/theory. However, I don't think there wouldn't necessarily be a need to transfer the event back to it's original location? In theory, it would occur with a map transfer, which loads the event data attributed to the map it's transferring to.
Though, the tricky/icky thing could be events that use self-switches for their page conditions, as self-switches include both map_id and event_id in their data.
*Edit: Looked into this a bit more, since I wasn't 100% sure if the "events" variable was a reader or an accessor. As it turns out, it's a reader. Which might mean it's a read-only variable, except within the functions, or objects of, Game_Map.
That's not what I was worried about, though. What does worry me is that I remember looking at the value of "$game_map.events" through the console, and seeing a hash table. Which confused the hell outta me. Why is that data stored as a hash table when the actual processing of how $game_map.events is created suggests an array to me?
So, in the end, doing a ".push" function on "$game_map.events" might not produce the intended results! However, if I was able to at least point you in a direction that gets you to a viable solution, I feel like I've done my job
You can use the Reproduce Event script by Eshra in tandem with the Napoleon's Map ID. The script has a persistence function (if you want it to remain in the map after transfer) in case you want it to stay in the map or not.
And yeah, it's still cloning blues, but it's functional nonetheless. If it's something like, say, a chasing event then you might have to edit Game_Player and then use the reproduce event script call.
And yeah, it's still cloning blues, but it's functional nonetheless. If it's something like, say, a chasing event then you might have to edit Game_Player and then use the reproduce event script call.
Pages:
1
















