Skip to toolbar

Respawning Monsters

Welcome Forums Get help Respawning Monsters

  • This topic has 5 replies, 2 voices, and was last updated 2 weeks ago by deWiTTERS. This post has been viewed 96 times
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #29665
    Msquared
    Participant

    Hey all, so I’m trying to figure out a way to have my monsters respawn… and I can’t conceive of any elegant way to do it, other than basically like dumping a bunch of tokens into the hero at the start, and forcing the character through a series of “pressure plate” event triggers at the beginning/ending of each area.

    Is there a more elegant way to do this that I’m missing?

    0
    #29683
    deWiTTERS
    Keymaster

    Can you give some more details on what exactly you want to happen?

    0
    #29696
    Msquared
    Participant

    Sure, so the game I made is just a very simple series of areas arranged in a loop. It’s just a little fantasy world that I made so my young son could go around and have some fun slaying monsters.

    You cannot access an area except by going through the area preceeding it. So the loop is arranged like this:

    “first”/village > “forest” > “ruins” > “caverns” > “first”/village

    The game is public, so you can go check it out if you want to see what I’m talking about. It’s in “debug” mode atm (invincible hero), but it might help you understand what I want to achieve…

    What I want is either that:

    1. any time the hero exits an area, when they return to it, all monsters have returned.

    2. any time the hero takes the one-way exit from the caverns back to the village, the monsters will in effect return to all the areas the next time they enter them.

    So that he can just go on this endless loop of monster slaying.

    So, it makes my brain hurt trying to figure it out, but the only way I can think of coming close to achieve something like this is to drop a token for each area into the hero at the start of the game (by dropping them at the start onto a walk-over event). Say the tokens are: “Village token”, “Forest token”, “Ruins token”, and “Caverns token”.

    So, when the hero leaves the first/village area and enters the forest area, there will be an event that checks for the “Village token” and will first use that to make all monsters in the area Inactive. They will never lose the “Village token”. Every area uses the Village token” to make monsters Inactive.

    Then there will be an event which they are corralled into walking over that checks for the “Forest token”. Since/if they’ve never been in the forest before, they have the “Forest token”. That token will Activate all the monsters. And after it Activates all the monsters the event will remove the token (so that they can’t, for example, re-Activate the monsters on accident after they’ve killed some, just by walking around within the area).

    Then, I need to have an event that they have to use to leave the area that triggers off of NOT having the “Forest token”, and it will give the “Forest token” back to them only when they affirm that they want to leave…

    Thereby, when they return to the area, they have both the Village and Forest tokens again, and all the monsters go away and comeback again, upon leaving the area.

    Repeat that token-event scheme for every area, or at the end of the loop when they go from Cavern back to first/Village.

    Does that work? I’m trying to envision it, and it makes my head hurt.

    0
    #29764
    deWiTTERS
    Keymaster

    Yes, it seems like that would work.

    0
    #29786
    Msquared
    Participant

    Can you, or anyone, think of a more elegant way to do it? 😛

    Is there any functionality that I’m missing? The whole ‘funneling them through events’ is a bit of a headache cuz it requires not only the “coding” but also map-engineering.

    0
    #29790
    deWiTTERS
    Keymaster

    You could also try our Discord. Plenty of people there to ask: https://discord.gg/tyHjdt3

    0
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.