Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Triggering an event to run on the same tile after erased.

i have a simulated plant event that will erase itself once dug up.  i want to be able to re-plant something on that same tile after the first event has been erased.  is that possible?  and if so, would someone mind walking me through it?
 
A better idea than erasing it is re-initializing it using self-switches.
for example. When you dig up the plant, self switch A turns on. Then you have a second event page, where the graphic is gone, which requires self-switch A to be on. When you use that event, it could plant the seed, turn self-switch A back off, and there'd be a graphic again.
I might be able to make a better example if you elaborate a little
 
after the plant has been dug up, i want the option to plant anything there. not just the one that was there to begin with.  thats why it erases itself after its dug up.
 
One thing you need to know about erasing is that it's only erased until you re-enter the map.
I'll make you a little screenshot tute on how I would set up the plant thing though
 
Before I start putting up screenshots. Exactly what do you want to do. A detailed description would be handy because the event system might change on the exact details
 
i have a simi-working demo that i could send you if that would help.  i really dont want to mess with finding a free file hosting site, im on dialup and that kinda stuff can take way too much time.

but heres what i have planned

you have a plant that starts full grown and ready to harvest.  you can then harvest many parts of the plant, seed, flowers or you can dig it up alltogether.

if you harvest it, it grows back after a time so you can harvest it again

but what plant can grow back after its been dug up?  so i have it erase the event if the player decides to dig it up.

all that above is what i have, and it works minus a few noob issues : P

but after the event erases itself, i want a new event to take its place so that i can plant another plant in its place, a different one, if i wanted the same i could just take out the erase command because atm it can grow back from a seed based on how it was harvested.

i was thinking that i could just start an event with no graphics that is triggered when the test plant deleats itself.  i could (possibly) have the invisable event walk a path to the tile where the first event was and then have it start as a pile of dirt to recieve a new plant.

i may be thinking too complicated for this program, but ive got a really cool ldea in my head : P

thanks a ton for your help, its greatly appriciated : )
 
Your idea is not too bad actually, just the "erase event" will cause you pain. The problem is that the event will be re-initialized as soon as you exit/enter the map again meaning you're back to square one.
A set-up I've made that would, with some adaptations, probably work for your system is as follows:
Your plant's event will need 2 pages. The first page will have no graphics and will be set up so that, when you choose to dig up the plant, a variable is set to 0, and self switch A is turned on.
The second page is a bit more complicated, here's a copy of the code to save me some explaining
Code:
@>Text: Plant a new seed here?
@>Show Choices: Yes,No
  : When[Yes]
    @>Text: What seed would you like to plant?
    @>Show Choices: Seed1,Seed2,Seed3,Seed4
      : When[Seed1]
        @>Set Move Route: Player
          :                      :$>Turn Down
          :                      :$>Move Down
        @>Wait for Move's Completion
        @>Control Variables:[0001] = 1
         : When[Seed2]
        @>Set Move Route: Player
          :                      :$>Turn Down
          :                      :$>Move Down
        @>Wait for Move's Completion
        @>Control Variables:[0001] = 2
         : When[Seed3]
        @>Set Move Route: Player
          :                      :$>Turn Down
          :                      :$>Move Down
        @>Wait for Move's Completion
        @>Control Variables:[0001] = 3
         : When[Seed4]
        @>Set Move Route: Player
          :                      :$>Turn Down
          :                      :$>Move Down
        @>Wait for Move's Completion
        @>Control Variables:[0001] = 4
        : When Cancel
         @> Exit Event Processing
         @> Branch End
       @>Conditional Branch: Variable[0001] >= 1
          @>Control Self Switch: A = OFF
          @>
      : Branch End
       @>
  :  When[No]
   @>Text: Awwww...
   @>
  :  Branch End
@>
That event page must require self-switch A to be on, and also has no graphic.
Now, you're probably wondering...this event has no graphic...what's with that?
That's where a 2nd event comes in
This event parallel processes and is invisible(both pages of it)
The first page only does 2 things.
Firstly it sets that variable to a certain value, this value is whatever seed number the plant should start off with
secondly it turns self-switch A on.
The second page of this event will need self-switch A to be on.
This event page uses several conditional branches to check what the variable is. When it's equal to 1, you use "set moveroute", and in the moveroute you select change graphic, and change it to whatever you want the new plant to look like if seed 1 was chosen, etc. for all the other possible values. (make sure you apply this change to the plant's event, not the player or this event)
Thats basically it.
Rather than changing the graphic with this variable, you can also make use of it to simply have different things happen in your original event.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top