Script pbIsRunning? is not working.

Snowi2000

Rookie
Member
Joined
Jul 17, 2017
Posts
2
I'm using the latest version of Essentials (v17.2).

I'm trying to make an event that triggers something when the player runs over it, but only when the player runs. I have set up a test event with conditional branch using the script pbIsRunning? as such: https://imgur.com/a/pQdtJ

The problem is, the event does nothing whether you run over it or not. The game doesn't crash either. Nothing happens.

If I add something to the else section, it will always do what is in the else section as such: https://imgur.com/a/pUwoA

I have not installed any extra scripts or packs, nor have I edited any of the default scripts.

Thank you for the help.
 

xUMG

Hoho-oh?
Member
Joined
Oct 16, 2017
Posts
114
I tried to bypass it but it seems to not work.
The problem is if you set a player touch event and touch it, The event would run which means your not running anymore.
You should try to check if the player is holding a certain key, like the run key (Which i don't know if possible)

Or you could also try to do something like this.
 

Uax

Novice
Member
Joined
Jan 10, 2018
Posts
14
So I just tried the input.trigger and it seems to not work,it will return always false. The problem is, as xUMG sayd, when you trigger an event you're actually not running anymore.

Btw I noticed that when you run over an event with the Trigger set to "Event Touch" it will trigger 5 times, instead if you walk on it, it will trigger 10 times ( ofc you're slower ).

You could use this at your advantage setting a variable and +1 it each time the event triggers and then watching the result stored in that variable and getting the conclusion via event in the tile next to it if the player was running or not.
 
Last edited:

chikorita

Novice
Member
Joined
Apr 2, 2017
Posts
43
This is the event that you need to use:



You can put the "control variables" in a common event if you are going to use in more maps.



The 13 and 10 in the conditional branch are the tile you are placing the event. 13(X), 10(Y)
 

Snowi2000

Rookie
Member
Joined
Jul 17, 2017
Posts
2
I tried to bypass it but it seems to not work.
The problem is if you set a player touch event and touch it, The event would run which means your not running anymore.
You should try to check if the player is holding a certain key, like the run key (Which i don't know if possible)

Or you could also try to do something like this.
The problem is, I'm trying to make an event that will trigger a spinning trainer to look at the player if they run over it. Like in the main series games.
I'm going to try chikorita's idea, and I'll get back with the results.------------------------
This is the event that you need to use:

You can put the "control variables" in a common event if you are going to use in more maps.

The 13 and 10 in the conditional branch are the tile you are placing the event. 13(X), 10(Y)

Worked like a charm.
Thank you all for your help.
 
Top