Creating Event on Map During Play

● ARCHIVED · READ-ONLY
Started by SecularBaron 10 posts View original ↗
  1. I'm not quite sure how to ask this question(and can't find an answer) as this is my first RPGmaker project. Is it possible for me to create an event at the player's location on the map through use of a common event? Or through use of a skill, then the event appears on the map at player location?

    Edit: Also I'm not looking to make a random encounter. I want to make something more like an event with a graphic. 
  2. Explain what you're trying to accomplish. There may be an easier way to achieve it. We don't just want to tell you how to do what you're asking, because what you're asking may not be the best way :)
  3. Thank you for your reply. I have a skill that unlocks, lets say it's "placing a torch", that you can use while on the map. When you use this skill I want it to create a torch at the players location on the map. It really just needs to be a graphic (regardless of being an event or not, doesn't matter I think).  I hope this is specific enough.
  4. If you want it to be an animated torch (with a flame), it would need to be an event.


    Is there a limit to how many of these a player could place? There are some spawning scripts around that might help you. I'm not sure if they'd make it so the torches are still there when you come back to the map though.


    If there's a limited number you can use, you can just create the events in an out-of-the-way place and condition them by switches or self switches, then when you want to place it use a Set Event Location to move the next one available to the correct spot and turn on its self switch. I've made a Remember Event Position script that you could then use to make sure it appears in the right place next time.


    That's a bit of a higher level overview - not worth giving much more detail on either method until you state how many can be placed on a map, whether they can be placed on ANY map, and whether you want them to still be there when you leave the map and come back.
  5. Thank you again for your help.

    "Is there a limit to how many of these a player could place? "

    No.

    "whether they can be placed on ANY map"

    Yes. This is needed.

    "whether you want them to still be there when you leave the map and come back"

    No.
  6. Edit: I wrote this after the first answer, ninja'd by Shaz again ;-)


    The main problem is that you can't create events without the use of scripting, and in most cases this it is not neccessary to create events for whatever the idea is.


    So what is the function of that torch? if it doesn't have additional functions then it might be easier to use a tileswap script to place torches.


    How many torches is the player allowed to place? If it's a game mechanic that allows only a limited number, then the usual solution is to make the torch events outside the visible map area and have them transferred to the new location upon use of the skill


    There is a script that allows you the creation of events, but you need to know a lot about programming to be able to use it correctly.


    There is also a script that can copy events from another map - but allowing unlimited copies of events into a map might create a lot of lag on that map.


    That is why Shaz asked for more info - there are several ways to do this, but each of them has other advantages and disadvantages, and we need to know your game's mechanics to point you to the solution that would be best for you.
  7. Thanks for your reply Andar. The torch is for visual flavor (trust me it makes sense in the game). A tile swap might work if it preserves the tile under it, possibly even one that isn't a ground tile. There are counter and table looking tiles in the game that wouldn't make sense if they disappear. As I said in my last post.

    "Is there a limit to how many of these a player could place? "

    No.

    "whether they can be placed on ANY map"

    Yes. This is needed.

    "whether you want them to still be there when you leave the map and come back"

    No. And probably best to prevent lag (however that most likely won't be a problem).
  8. Nice! The tileswap script would work well. And if you're clever, you can STILL have it animated :)
  9. Thank you both for your help. I'm looking into tile swapping. If there is a suggested script tell me. I'm sure I can find some however.
  10. The tileswap script is here:


    http://www.himeworks.com/2013/02/17/tutorial-easy-tile-swapping/


    http://www.himeworks.com/2013/02/17/tile-swap/


    However, that would have the tables below disappear while the other tile is there.


    If you don't need to store the torches, a copy event from another map might be a better solution, but even that can't be placed everywhere (you can only place one event per grid tile unless you're using scripts as well).


    If I remember correctly, copy event can be done by script call and doesn't need a fill script (only for storing the new event would you need a script), just search for copy event if you want to go that way instead.