On map enemy help

● ARCHIVED · READ-ONLY
Started by Drago9 6 posts View original ↗
  1. I have been trying for hours struggling to make the "On-Map" enemy randomly spawn by a chance.

    I was able to make it randomly spawned by 50% chance. But here's the problem: I can't figure out how to despawn them. After they spawned, they just stay there until I defeat them. I want ALL my on-map enemy to despawn and reset after leaving the map.

    I'm not very good at eventing but if anyone can help me I will greatly appreciate it. Thanks in advance.

    image.jpg

    image.jpg
  2. Bump
  3. Can you explain what you mean by "despawn". This seems to suggest that they can respawn while you are on the map.

    Have you tried using a switch on the exit transfer event? Not knowing what your common event looks like I'm guessing here, but if your on map events had a second page conditioned by that switch with no graphic and no commands, then when you leave the map, the switch will activate that second page and so the event cannot call your common event. That would mean a new switch for each map.
  4. Fixed my posts. Could have state them better.

    Edit: found a game with similar system of what I'm trying to achieve:

    Homework Salesman.

    The enemy event spawn on random location in the map. There are rare enemies with low spawn chance and once you leave the map, they all reset meaning all the location of enemy change and rare enemy might not be there anymore.

    But in my case, I can't figure out how to reset the spawned enemy event...

    image.jpg

    image.jpg
  5. it's a bit crude in respect to what you want to achieve, but I have yet to find a way to refine this process.

    At any rate, you can try placing this script call in your map transfer event(s) :

    $game_self_switches[[mapID, eventID, 'self_switch']] = true/false

    Eg: $game_self_switches[[12, 8, 'A']] = false

    This will switch off self-switch A of event 8 on map ID 12.

    You will have to make a script call for each individual enemy event you have on the map.
  6. Susan said:
    it's a bit crude in respect to what you want to achieve, but I have yet to find a way to refine this process.


    At any rate, you can try placing this script call in your map transfer event(s) :


    $game_self_switches[[mapID, eventID, 'self_switch']] = true/false


    Eg: $game_self_switches[[12, 8, 'A']] = false


    This will switch off self-switch A of event 8 on map ID 12.


    You will have to make a script call for each individual enemy event you have on the map.
    Oh snap it works! But It's a pain to set up those in every map transfer. If anybody can come up with a more easier way I would greatly appreciate. But for now, you're my hero!