Not sure how to phrase this but does anyone know of any ways or scripts that allow the player to create an event during gameplay? I want to have my player use an item that would create an event on the tile in front of the direction he's facing. The event could be pre-designed on some other map and called through a common event or something. Does anything like this exist?
Thanks
Dym
Yanfly has a clone event script... you can set-up all possible item events on a sample map, then clone it when needed
Actually, this can easily be done with switches. You create a blank event with a second page that is activated when a certain switch gets turned ON. Then, within whatever event you want, when the event ends, you set the switch for the blank event to turn ON.
That activates the second page which makes it do...whatever it is that you wanted it to do. That way, you "create" events. Or to put it on more technical terms, you "wake up" a sleeping event, not create one.
And further more, you can have 4 of the same events surrounding the character. Then, set it up so that only the event in the way that the player is facing will turn ON.
You can simply calculate the position where the event should spawn... I've used that script and I can spawn them dynamically anywhere in the map...
This is from the spawn events page, this is the very first set of script calls for spawning events...
spawn_event_location(x, y, event_id)spawn_event_location(x, y, event_id,map_id)It takes x,y position of where to spawn the event...You'd need to calculate x,y based on direction though. 🙂
I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
You can use the MultiQuote button to quote multiple posts in a single response. They don't auto-merge.
Tsukihime wrote a script that would allow you to spawn items on the map (take them from your inventory and add them to the map so you can pick them up again later). You didn't really explain what you intend to do, and whether the items you "use" are what appears on the map or something else, so I'm only throwing it out there as a possibility.
You can use these methods:
x = $game_map.round_x_with_direction($game_player.x, $game_player.direction)y = $game_map.round_y_with_direction($game_player.y, $game_player.direction)
then make your event spawn at the point designated by x and y. However, that could be ANYWHERE on the map - on a tree, on the wall of a house, on a cliff or hill, in the water. There is no check that the tile in front of the player is a VALID tile for a particular event to spawn on. You would have to do that check yourself, using whatever rules you need for the purpose you have in mind.
It will spawn on the tile in front of the player, not where the player is.
If you put that into the script call and it gives an error, it'll be because you're using an earlier version of the engine and the lines are too long, and have auto-wrapped in a bad place. If that happens, make the lines break after the ( and before $game_player and it should be right.
Then maybe get the new version of Ace.. 🙂
Not sure, but getting it won't really do any harm...