BalakaySenpai

Villager
Member
Joined
Oct 17, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
So after spending some time, I couldn't find a way to make an overworld punching actions for my character. I came up with a common even that changes the characters sprite quickly to display a "punching" action which works with other events in game. The problem that I am running into is that the player needs to press a key for the action to be called through a common event. After mixing up Input.trigger with Input.press, I am experiencing fluxiating delay with the event.

[IMG]http://i.imgur.com/WWcEs2P.png[/IMG]

Basically, if you press CTRL, the character switches sprites to look like a punch, then switches back. However if you press the key again afterwards, nothing happens- it doesn't run it again. However after a few seconds or so, if I press CTRL, it will not only run it, but sometimes it will run multiple key pressess. However it will still not allow another input immediately afterwards. All I want to accomplish is that if the player pressess CTRL, it will run this action, and can be repeated with no problems. Also the two Input.updates are there due to me tinkering to try and fix this problem :/
 

Galenmereth

Semi-retired
Regular
Joined
May 15, 2013
Messages
2,249
Reaction score
2,206
First Language
English
Primarily Uses
N/A
Put a Wait 1 frames on the very top there, before the condition; that ought to sort it out. Also not sure why you go "Input.update": there should be no need. What is calling this common event? Is it a parallell process?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Regular
Joined
May 15, 2012
Messages
14,693
Reaction score
3,035
First Language
Tagalog
Primarily Uses
RMVXA
How are you running that common event? It wasn't even set to autorun or parallel
 

BalakaySenpai

Villager
Member
Joined
Oct 17, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
How are you running that common event? It wasn't even set to autorun or parallel
On my map, there is a parallel process event that calls the common event. I set it up like this to test different conditions, and to limit this action from always being able to happen.

Put a Wait 1 frames on the very top there, before the condition; that ought to sort it out. Also not sure why you go "Input.update": there should be no need.
I put the one frame wait as you stated, however it did not resolve my issue. It may be more beneficial if I record this, or if someone could try and replicate it to see if they get the same result.

EDIT*: The Input.update was placed there to see if that would initially fix the issue but it didn't. I removed it once I put the one frame wait, but still no luck.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Regular
Joined
May 15, 2012
Messages
14,693
Reaction score
3,035
First Language
Tagalog
Primarily Uses
RMVXA
Then show us the event of the map too
 
Last edited by a moderator:

BalakaySenpai

Villager
Member
Joined
Oct 17, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
I don't encounter delay when doing this. Check your FPS maybe.

Interesting. What do you mean by checking my FPS though? Do you mean my games or... ?

The only reason why I think I am having issues could be that I have multiple Parallel processes with one other event that is on the map, however still I wouldn't think that it would affect the Input.trigger if it wasn't affecting something like the characters movement as an example. I could be wrong.

EDIT*: Print screening map and stuff.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Regular
Joined
May 15, 2012
Messages
14,693
Reaction score
3,035
First Language
Tagalog
Primarily Uses
RMVXA
Press F2 and you'll see the FPS of your game on the title... Also show us the image of the event on the map
 

BalakaySenpai

Villager
Member
Joined
Oct 17, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Thanks for the info about the games FPS display. Didn't know about that until now.

In regards to that, when I preform the action, it doesn't dip. It stays between 45-60. Also attached to this reply are three images. One of the game with its FPS, my map event with calls my common events, and one NPC event that has multiple pages of Parallel processes.

Enemy.png

Game FPS.png

Map Event.png
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Regular
Joined
May 15, 2012
Messages
14,693
Reaction score
3,035
First Language
Tagalog
Primarily Uses
RMVXA
the difference from 60FPS might be causing it. 60 is the normal FPS.
 

BalakaySenpai

Villager
Member
Joined
Oct 17, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
That definitely makes logical sense, however I would argue that if that were the case, then I would have delay issues if I were to replace Input.trigger with Input.press. When I switch to press, it works perfectly with no issues, however I do not want this action to be able to be repeated by holding down the key. I am trying to make it where you have to press the key for each time you want to do the action. Again, when I use press, it doesn't lag, stutter, or anything.. :c
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Regular
Joined
May 15, 2012
Messages
14,693
Reaction score
3,035
First Language
Tagalog
Primarily Uses
RMVXA
It might be an internal delay for Input.trigger? then.. though I never really noticed something of that kind.


You can still use input.press, run the CE and activate a switch that when ON, would disallow the common event to run.. then if the input isn't pressed, turn switch to false. That way even if he long presses the key, the event will run only once
 
Last edited by a moderator:

BalakaySenpai

Villager
Member
Joined
Oct 17, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
That ended up working perfectly! I guess there just is an internal delay with Input.trigger which is really interesting. Again though, your solution definitely helped me accomplish what I have been having issues with all day, so thank you very much! :) Im going to attach screens to this reply to show what fixed it.

Resolution 1.png

Resolution 2.png

Resolution 3.png
 

Tsukihime

Regular
Regular
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,928
First Language
English
There is a delay for trigger.


It's documented in the help file

Input.trigger?(sym) (RGSS3)


Determines whether the button corresponding to the symbol sym is currently being pressed again.


"Pressed again" is seen as time having passed between the button being not pressed and being pressed.


If the button is being pressed, returns TRUE. If not, returns FALSE.
The reason why this exists is for example if you press the "a" key, do you want your word editor to enter 20 a's just because you happened to hold down the key for more than a few milliseconds?


Or more relevant to RPG Maker, if you press the OK button, do you want to suddenly speed through every confirmation because it doesn't know whether you only wanted one key to register or not.
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

Everybody: "Hey, weren't you supposed to be making a game"?

Me. "MUST MAKE MOAR CUTSCENES!!1"
I've been watching videos about the videogame streamer Open Hand charity scandal, and the rabbit hole keeps getting deeper. At first it was just a lot of donated money being grossly neglected for years, and now there's a lot of money unaccounted for, which could turn this into a legitimate IRS crackdown.
Let's have some fun with my advent calendar. What would you like to see for Day 3: land, sea, or air? :rheh:
I've been thinking about doing a jokey submission for the Christmas jam in which, like a cartoon special where all the characters "play" a counterpart in A Christmas Carol, my MagiCats would each play a role from the C.A. Smith story The Coming of the White Worm, with Cyprian as Evagh, Rousalie as Dooni and so forth. But in the end, I figure all my development efforts should go toward the game proper.
In twitter, square phoenix had successfully prompted chatgpt to make the mini game watermelon pangpang.

Forum statistics

Threads
136,703
Messages
1,268,947
Members
180,419
Latest member
riruru
Top