How to make player run on button press

Status
Not open for further replies.

RPGM12321

Villager
Member
Joined
Feb 23, 2021
Messages
15
Reaction score
1
First Language
Eng
Primarily Uses
RMXP
Hi,

Having some issue with this.

I have set 2 common events (1st is triggered on a parallel on first map)



1)
Conditional Branch if Z is being pressed
Call common event 2
Else
Change speed to 3 (walk)

2)
Conditional Branch if Z is being pressed
Change speed to 4 (run)
Else
Call common event 1


This seems to work fine, until I teleport to a new map and then it stops working. (If Z is being pressed to run, when I enter the new map it is set to constantly run and releasing / pressing Z does nothing, just keeps him fast).

Also, if I then return to the 1st map (where the parallel is), the run and walk work again, but the player can now move on water and through all objects (tileset priority rules still apply though).

Any guidance on what I am doing wrong please?

TIA!

(Edit - Just realised, this isn't a script request - sorry!)

This has been resolved, see answer below!


For anyone looking to add running sprites, just add the change actor graphic above the set move route commands.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,376
Reaction score
8,096
First Language
German
Primarily Uses
RMMV
please show us a screenshot ofboth the common event and of the event that activates it.
if a common event is activated, it should be for all maps, so that is where you probably made a mmistake.
 

RPGM12321

Villager
Member
Joined
Feb 23, 2021
Messages
15
Reaction score
1
First Language
Eng
Primarily Uses
RMXP
Screenshot below.

Thanks!
 

Attachments

  • running.png
    running.png
    311.4 KB · Views: 8

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,376
Reaction score
8,096
First Language
German
Primarily Uses
RMMV
your problem is that the parallel process is a map event, not a common event.

please change the common event "walk" to trigger = parallel process, select a switch for the trigger and then in the map event, turn the switch ON once before switching off the parallel map process.
"call common event" is a command that should NOT be used for this case.

EDIT: Typo where I messed up on/off corrected
 
Last edited:

RPGM12321

Villager
Member
Joined
Feb 23, 2021
Messages
15
Reaction score
1
First Language
Eng
Primarily Uses
RMXP
Ahh thanks!

So now, it is working where pressing Z runs and releasing walks.
However, there is still the issue that as soon as I enter any different map, it allows the player to walk through all tiles.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,350
Reaction score
1,371
First Language
Spanish
Primarily Uses
RMVXA
any modification to the input scheme should be done by plugin, not eventing.
unless you want to make a very one-use addition for a very specific situation... if not, then anything to do with controls should be added to the Input module.
that's what the module is there for.
 

RPGM12321

Villager
Member
Joined
Feb 23, 2021
Messages
15
Reaction score
1
First Language
Eng
Primarily Uses
RMXP
Thanks gstv87

Sorry if a silly question, but is this applicable to XP?

Edit - Just seen that plugins are the VX / MV version of scripts.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,376
Reaction score
8,096
First Language
German
Primarily Uses
RMMV
However, there is still the issue that as soon as I enter any different map, it allows the player to walk through all tiles.
that has nothing to do with the common event as nothing in it can change passability.

there are only two possibilities:
either it is a completely different bug that has nothing to do with the common event, or the switch used for triggering the common event has already another use in a script that you forgot to configure, or an event that changes the passability.
 

RPGM12321

Villager
Member
Joined
Feb 23, 2021
Messages
15
Reaction score
1
First Language
Eng
Primarily Uses
RMXP
that has nothing to do with the common event as nothing in it can change passability.

there are only two possibilities:
either it is a completely different bug that has nothing to do with the common event, or the switch used for triggering the common event has already another use in a script that you forgot to configure, or an event that changes the passability.
Yeah it must have been an event error somewhere because it worked on a new project. Thanks all!

I have updated the original query too as there was a second part I left off (running sprites)
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,316
Reaction score
5,486
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to XP Support. Please be sure to post your threads in the correct forum next time. Thank you.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Progress on one of my projects has been slow, but I'm at a spot now where I feel like sharing the four main characters.

From left to right we have: Amabel, Tibby, Dusty, and Wren.

tibbyrpgcast.jpg
I'm in a much better mood about my game than I was 2-3 days ago. I keep switching between sideview and front because of the amount of assets needed for side (I'm drawing it all myself)... but I've decided to stick with front, for my own sanity. sidenote... people, planning is important. I've spent so long on just getting my game's ideas off the ground because I didn't plan ahead.
unknown.png

"Fight me."
I'll finally wash my clothes today!
SA46ATTACK.gif :kaojoy:New Arab character in action.

Forum statistics

Threads
110,609
Messages
1,054,687
Members
143,736
Latest member
wildsky
Top