Seeking some very specific common event script calls.

I really wasn't sure where to put this in the forums, so I hope this one is right... ;;;;v;;;;

Basically, I need a few script calls that I cannot locate, even in the script Google Doc list or through the actual RMMV javascript files. I do not need a plugin. This all basically for my momentum-based project I'm doing, if anyone asks.

1) The location of a mouse click (when clicking to move around). I need to make an event that calculates the distance between the player and the location where you are clicking. I can make a distance calculation fine and dandy, I just need the script for the click location.

2) The script to remove/reset the clicked location of the mouse. This is basically to allow me to remove a clicked point before the player can reach said point. A rolling ball isn't very realistic when it's full speed and then suddenly and abruptly stops at the spot you clicked at.

3) The script to call a player touch AND an event touch for one event(character). I need to be able to have the event touch the player to cause the player to bounce away and vice versa.

4) The movement speed of an event, but more importantly, to allow incremental increases/decreases in speed. I managed to achieve this with the player with $gamePlayer.setMoveSpeed ( $gamePlayer.moveSpeed() + X) where X is the speed I need, I just am having difficulties with setting up an event version.

Also, if anyone would be so amazing as to help me get the conditional acceleration and deceleration variables in this script into a nice and tidy loop system to take some load off the parallel processing I will love you forever:
Screenshot001.png
2&3 do not exist

there is nothing to store any click position, you will always only get the current click coordinates
and you cannot have two triggers at the same time as the event structure does not support this

You'll have to rework your logic to handle things differently
If you give a better description on what you want to happen (ingame terms) instead of how you want it to happen (programmer description), we can try to help you better.
I think they mean the player's destination generated when you click on a tile. It's stored in the $gameTemp object.

Code:
$gameTemp.destinationX();
$gameTemp.destinationY();
@Andar

I’ll try to word it in ingame terms (I’ve been staring at code on RMMV and Adobe Animate for 16 hours today so my brain is a little frazzled lol). I’m trying to make the momentum of a ball be realistic. There’s one plugin I’m temporarily using for pixel movement: Altimate Movement.

With my first two points above, I’m trying to make it so the ball is accelerating the longer you hold down the mouse. When you let go of the mouse, it’s supposed to fling off and start to slow down in the direction you let go. No Problem so far with the code above. The problem is, if you let go of the mouse and your cursor is too close to the ball, it will stop abruptly wherever the mouse was let go at well before deceleration would stop it naturally. If you were going lighting speed and let go close to the ball, boom, dead stop.

I assumed by personal observation (however right or wrong it is) that the game was storing that release point temporarily until the player reached it, then removed the stored coordinate once they stopped there. You can see it happen live with the glowing halo around the release of the mouse click. I had hoped that, by removing the stored coordinate entirely once deceleration started, I could avoid the ball stopping abruptly.

As for the third request, I was focusing more on enemy behavior. I want to make it so:
1: enemy touches you while you were either stationary or faced away = bounces you away.
2: vice versa = bounces them away.
3: you hit each other head on = you both bounce away.

As for the last request, it’s just making it so the enemy has momentum like the player.
I think they mean the player's destination generated when you click on a tile. It's stored in the $gameTemp object.

Code:
$gameTemp.destinationX();
$gameTemp.destinationY();

@Hudell I really hope that’s it, I’ve been up for way too long so I’ll definitely try that out when I wake up!
using for pixel movement: Altimate Movement.
that is a key info here and you need to give a link to that plugin.
The default engine doesn't store mouse clicks themselves, but it does remember a move target in a simple pathfinding.
However there is a good chance that the plugin has changed that depending on how it works - someone would have to check its code to determine that. I don't know that plugin.

As for your contact problem - you need to work it differently, then you don't need two different triggers.
The event touch trigger is enough - it will trigger in all three cases. and then (after the trigger) your event has to check which of the three cases has happened.
Basically use control variable to get the position of both player and event, then compare them and the facing to determine what happened and which object to move etc.
Example: If the player is facing east and the event is to the west of the player position, then the event hit the player in the back. If the player is facing the event then you need to check which direction the event is facing to determine cross collision or if player came onto event. and so on.
@Andar
https://forums.rpgmakerweb.com/index.php?threads/altimit-pixel-movement-0-50β.85408/ Here's a link to the plugin. Using the information from Hudell, I searched the code and it looks like touch movement has been altered in some way. I'm going to give their script a try and return with whether it works or not.
Okay, I've done some work and I managed to make it so that:

A: If the ball is near the cursor it slows down to a stop:

◆If:Script:(Math.abs($gamePlayer.x - $gameTemp.destinationX()) + Math.abs($gamePlayer.y - $gameTemp.destinationY()) > 2)
◆Wait:5 frames
◆Script:$gamePlayer.setMoveSpeed ( $gamePlayer.moveSpeed() + 0.2)
◆Script://------------------------------------------------------//
◆If:Script:$gamePlayer._moveSpeed >= 6
◆Script:$gamePlayer._moveSpeed = 6
◆
:End
◆
:Else
◆Wait:5 frames
◆Script:$gamePlayer.setMoveSpeed ( $gamePlayer.moveSpeed() - 0.6)
◆Script://------------------------------------------------------//
◆If:Script:$gamePlayer._moveSpeed <= 0
◆Script:$gamePlayer._moveSpeed = 0
◆
:End
◆
:End

B: Releasing the mouse when there is a destination calls an event. Still working on how I'm going to make that event continue the ball's momentum.

◆If:Script:$gamePlayer.isMovementSucceeded && $gamePlayer._touchTarget != null && !TouchInput.isPressed()
◆Text:None, Window, Bottom
: :Move forward via plugin commands or remove the destination entirely.
◆Script:// Stupid plugin has a BUG!
◆
:End
That plugin has a _touchTarget object on the player, if it's assigned you can get the position with $gamePlayer._touchTarget.x

you need to make a conditional for $gamePlayer._touchTarget first or it'll crash.
That plugin has a _touchTarget object on the player, if it's assigned you can get the position with $gamePlayer._touchTarget.x

you need to make a conditional for $gamePlayer._touchTarget first or it'll crash.

@Hudell It's worked flawlessly so far, thanks for the tidbit! I'll be making some updates to the code soon!
Moderator note: @sfdasfasf Please try to avoid double-posting (posting directly after yourself unless 3 days have passed), as it's against the forum guidelines. If you need to respond to multiple posts, you can use the Multi-Quote function to help do this - it's the "+ Quote" button at the bottom-right of other peoples' posts; click that button on all the posts you want to respond to, then select the "Insert Quotes" button that appears below your text entry box. 🙂

If you have any questions about how to use Quotes, Multi-Quotes, or other forum functions, feel free to ask on the Site Feedback board and we'll be happy to assist you.
This Thread seems to solve the coordinates when touch click happens. Maybe it helps:

The RMMV Scriptcall List does not contain the answer for this, but its very helpfull:

Original thread: https://forums.rpgmakerweb.com/threads/seeking-some-very-specific-common-event-script-calls.117106/