Common Event Help, Please...

RemyKey109

Villager
Member
Joined
Jul 4, 2019
Messages
5
Reaction score
1
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:

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,695
Reaction score
1,113
First Language
Portuguese - Br
Primarily Uses
RMMZ
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.
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
698
Reaction score
3,451
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?
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,695
Reaction score
1,113
First Language
Portuguese - Br
Primarily Uses
RMMZ
@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?
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();
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
698
Reaction score
3,451
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?
 

RemyKey109

Villager
Member
Joined
Jul 4, 2019
Messages
5
Reaction score
1
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:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top