Common Event Help, Please...

Discussion in 'RPG Maker MV' started by RemyKey109, Jul 4, 2019.

  1. RemyKey109

    RemyKey109 Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    common-event-help03.jpg
    common-event-help02.jpg
    common-event-help01.jpg
    Hello everyone.
    I had this project where I'd set up an Intoxication system. In it, using RPG Maker MV, I had an item that had a chance to apply an intoxication state. Once that state was applied to the actor (actor 1), using a common event, it would make it to where they couldn't "walk straight". What it did was if the state was applied, it would change the movement route for when the "Right" button, or the "Up", "Down", "Left" buttons were pressed, players would move in a different direction than expected. It worked.
    Some files got corrupted and I had to re-event this intoxication system and it is NOT working with the buttons for some reason!

    I have a common event running parallel with a specific switch, so that when the Intoxication state is applied, a balloon icon appears, then goes into an Conditional Branch: "If Intoxication state is applied to actor 1", then...and that's where I have the button press and change movement routes added in a nest of that condition, like the following...

    The item applies a state (intoxication---let's say it's successful).

    Common Event:
    +Show Balloon Icon: Player, Sweat (wait)
    +If : Hero is affected by intoxication
    +If : button [DOWN] is pressed down
    +Set Movement Route : Player (skip)
    : : +Turn Left
    : : +Move Left
    Etc., etc., as far as each of the four movement directions (I just didn't feel like typing them all out here).
    Then, of course the "END" at the bottom of those. I did not apply an Else Condition, though I have tried testing it with that just in case that made some kinda difference.
    NOTE: I nested the above, yet it doesn't show up that way once posted, so I attached screen shots...
    (the second screen shot is a different way I tried the code in the fresh, new project.)

    I tried this without the Parallel setting, and just with "NONE", and that still calls the Balloon Icon, but not the conditional movement. I can get the common event to work, to be clear---it will be invoked/triggered, yet will only do the balloon icon and not the movement instructions. Any clues as to what is going on here? As stated, I had this working before...

    I did also start a FRESH, NEW project and tested it the same way to see if a plugin was interfering, yet I got the same results with no plugins...any clues guys?

    ~~~Genuinely,
    Remy K.
     
    Last edited: Jul 4, 2019
    #1
  2. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    672
    Likes Received:
    234
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Hi!
    So, i don't understand very well, i think its a bit confuse. let's resume this.
    You want to create a item that put an state that affects the movement of the player. And this state will be removed after a certain number of steps. Right?

    In the common event that are parallel, the ballon will keep showing because the event itself will repeat, loop as long as the switch is ON.

    In the set movement route, you can remove the "turn left" "turn right" etc. When the player moves left he will turn left too.

    Also put that movement route to "SKIP" and "REPEAT". I think the repeat will make the player repeat the movement while the button is still pressed. Because without it, the player will move only once when the button is pressed down(not sure about this).

    But in the common event you can put a command to add + 1 to a variable in the first line.
    Then put a conditional, if the variable is equal to 1, show the ballon.
    Then proceed with your events.
    This will make the ballon not show over and over again.
    In the final put a condition to when the intoxication is gone, put the variable equal to zero and turn off the switch that triggers this parallel event.
     
    #2
  3. standardplayer

    standardplayer Keeper of Kitties Veteran

    Messages:
    252
    Likes Received:
    915
    First Language:
    English
    Primarily Uses:
    N/A
    @Eliaquim seems to have your scenario ironed out pretty well, that should work. However...

    Did you know you can do $gamePlayer.moveRandom()? This will move the player one step in a random direction. You could have this as a result of any of the player movement inputs, it would make what you're going for a bit easier, right?
     
    #3
    Eliaquim likes this.
  4. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    672
    Likes Received:
    234
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Ohh!! You are absolute right!
    You can use a conditional branch and put that in the script call field:
    $gamePlayer.isMoving() == true
    Then inside the conditional branch you put another script call:
    $gamePlayer.moveRandom();
     
    #4
    standardplayer likes this.
  5. standardplayer

    standardplayer Keeper of Kitties Veteran

    Messages:
    252
    Likes Received:
    915
    First Language:
    English
    Primarily Uses:
    N/A
    @Eliaquim nice, I think you nailed it ^^
    @RemyKey109 perhaps I'm missing it, but when and where it the switch to run the common event actually being flipped on?
     
    #5
    Eliaquim likes this.
  6. RemyKey109

    RemyKey109 Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    @standardplayer : It's in a common event that if the "Intoxication" state is applied to a Player (actor 1), then it should automatically trigger the common event. I've also tried putting the Call Common Event in the trait section of the item.

    All I am going for is to have an item (alcoholic beverage) that when drank, has a chance to apply the Intoxication State. Once that is applied, I want everything to function as usual, yet with only the directional movement changed...

    This was so simple the first time I set it up and it worked perfectly. A few files got corrupted and I had to rebuild a few things from a backup, in which this is one thing I'm having to redo in the game project, and this time it isn't working as easily and simply as the first time I set it up. heh

    @Eliaquim : I'll give your suggestions a try, though it's similar to what I've tried already. Couldn't hurt to double-check... :D
     
    Last edited: Jul 4, 2019
    #6

Share This Page