State Immediately Trigger Common Event

Discussion in 'RPG Maker MV' started by Moo :D, Feb 5, 2016.

  1. Moo :D

    Moo :D Veteran Veteran

    Messages:
    31
    Likes Received:
    3
    First Language:
    English
    Hi Community! : D


    Is there anyway to trigger a common event from a state immediately? I'm thinking this might require a script but maybe there is another way? Waiting till the end of the turn for a battle event check is too long, I need the state to trigger the common event as soon as its applied. Please let me know what you think and thank you for your time! 
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,960
    Likes Received:
    11,615
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    How have you got it set up now?  Sounds like you're using event commands in the troop tab.


    You should be able to add a feature to the state which associates it with a common event.  I think that will run the common event as soon as the state is applied.
     
    #2
  3. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,071
    Location:
    Toronto
    First Language:
    English
    You could use a "moment" troop event span, which checks it all the time.
     
    #3
  4. Moo :D

    Moo :D Veteran Veteran

    Messages:
    31
    Likes Received:
    3
    First Language:
    English
    Hey yall! Thanks for replying, and sorry I'm late! Shaz you're on the right track I sure did try the traits tab, but I did not see a common event selection for states; there is a common event selection for skills and items for not for weapons and states T__T Thank you for your idea though I really appreciate you for taking the time yet again! xD You're a lifesaver Shaz! Hime, thank you for replying! We haven't met yet but I hope to make my face more familiar soon! Thank you for all the plugin work and support you have put out for the community! I'm using a number of your plugins and once I get some actual material to show I will send you some screenshots and such as I hope to do some commerical-ish stuff xD! As for your suggestion, I will try it right now! I feared using moment because I thought it might loop over and over after not finding it, but I never tried, so its just a fear, not an experience. I'll get to it right now! Thank you!
     
    #4
  5. Moo :D

    Moo :D Veteran Veteran

    Messages:
    31
    Likes Received:
    3
    First Language:
    English
    Yeah, it is looping under the moment selection in event battle. What I'm trying to do is have a common event immediately play when a state is applied. The way I have it setup is I have a common event labeled "check for state" to run every turn. It checks Enemies 1-8 for the state, if any enemy has the state then the common event is applied. Since it is on a turn basis, all players continue their actions until the next turn. However, it would be best if I could have the common event applied immediately as the state is applied. Is there any other way I could arrange these commands perhaps? Just for clarity, my setup right now is:


    Turn by Turn: ----> Common Event: Check for State -----> If State is on Enemy Party then execute X-Scripts from Plugin Command (Himeworks: ActorBattleCommands)
     
    #5
  6. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,518
    Likes Received:
    3,771
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Troop events with the Moment scope will loop endlessly as long as their condition continues to be true.  You need to make sure that the condition becomes false at the very end of the event page.  There are lots of ways to do this.


    One way would be to have a switch turned ON at the beginning of the battle (Turn 0), and require (on the Moment page's requirements) that the switch is turned On and the State in question has been applied to the actor, then turn the switch Off at the end of the event (this would be for if you only want the event to run once no matter how many times the State is applied).


    A different way would be to apply a "fake" State (let's call it "Fake Poison") to an Actor instead of the real poison, and have that Fake Poison be the requirement to run the event.  At the end of the event, you apply the real Poison state, and remove the Fake Poison state (which will cause the event to not loop anymore; the only time it will re-run is if the state is applied again)
     
    Last edited by a moderator: Feb 5, 2016
    #6
  7. Moo :D

    Moo :D Veteran Veteran

    Messages:
    31
    Likes Received:
    3
    First Language:
    English
    PERFECT! Thank you Wavelength! and thanks again Hime and Shaz!  Wavelength, your 2nd solution worked out great, instead of skills n such applying the state directly, they turn on a common event which turns on a switch/the state which turns on the battle event which turns on the common event in moment that needs to be applied immediately with the state! Big workaround, but it works, great thank you again!
     
    #7
    SoftCloud likes this.

Share This Page