Skip to content

New Commands: 2050 - Call Movement Action#3111

Open
jetrotal wants to merge 3 commits into
EasyRPG:masterfrom
EasyRPG-NewFeatures:CallMovement+WaitForMovement
Open

New Commands: 2050 - Call Movement Action#3111
jetrotal wants to merge 3 commits into
EasyRPG:masterfrom
EasyRPG-NewFeatures:CallMovement+WaitForMovement

Conversation

@jetrotal
Copy link
Copy Markdown
Contributor

@jetrotal jetrotal commented Oct 2, 2023

Here's a bunch of stuff that was already requested in different places.

Call Movement Action:

@2050("typeOfAction",[targetIsVar,target, parameterIsvar, parameter])

A collection of new move commands that can be called as:

@raw 2050, "SetMoveSpeed", targetIsVar,target, speedIsvar, speed
@raw 2050, "SetMoveFrequency", targetIsVar,target, frequencyIsvar, frequency
@raw 2050, "SetTransparency", targetIsVar,target, transparencyIsvar, transparency
@raw 2050, "SetAnimationType", targetIsVar,target, animationTypeIsvar, animationType
@raw 2050, "SetFacingLocked", targetIsVar,target, lockedIsvar, locked
@raw 2050, "SetLayer", targetIsVar,target, layerIsvar, layer
@raw 2050, "SetFlying", targetIsVar,target, charsetIndexIsVar, charsetIndex
@raw 2050, "StopMovement", targetIsVar,target
@raw 2050, "ChangeCharset/actor1", targetIsVar,target
@raw 2050, "Event2Event", eventAIsVar,eventA, eventBisVar, eventB 
//teleports an eventA over eventB, putting EventA to look at same direction as EventB too.
@raw 2050, "FaceTowards", eventAIsVar,eventA, eventBisVar, eventB 
@raw 2050, "FaceAway", eventAIsVar,eventA, eventBisVar, eventB 

Wait for Single Movement:

Waits for the end of a Single Event's Movements.
Already Implement on another PR.

Details ```js @raw 2051, "WaitForMovement", 0, 10001, 0, 35, 0, 8 ```
@raw 2051, "WaitForMovement", useVarID, ID, useVarTargetVariable, targetVariable, useVarFailuresAmount, failuresAmount

While waiting for the Move Route to complete, you can save the outcome of the motion (success or failure) to a targetVariable. Additionally, you can set the number of failed attempts allowed before triggering a failure condition. If the failuresAmount is set to 0, this command will simply wait for the motion to finish without considering failures.


old commits comments:
Update Feature - Support Detecting when Move Route Fails Thanks @MackValentine Mack for solving some Core Issues

@jetrotal jetrotal force-pushed the CallMovement+WaitForMovement branch from feeed6f to b58c8af Compare October 8, 2023 16:00
@ghost ghost requested a review from Ghabry October 16, 2023 19:15
@ghost ghost added the Enhancement label Oct 16, 2023
@jetrotal jetrotal force-pushed the CallMovement+WaitForMovement branch from 248a21f to e5c2381 Compare November 17, 2023 19:08
@jetrotal
Copy link
Copy Markdown
Contributor Author

jetrotal commented Dec 7, 2023

This one is near completion.
Just need to revamp @raw 2050, "SetFlying", targetIsVar,target, flyingIsvar, flying

Once Ghabry have time, he will help refactoring the vehicles code, to allow any event entities to fly or land like airships.

I wonder if we could also have an extra parameter called forceLanding to detect if a terrain is appropiate for landing or not.

@jetrotal jetrotal force-pushed the CallMovement+WaitForMovement branch from e5c2381 to 1d9597e Compare March 8, 2024 07:32
@jetrotal jetrotal force-pushed the CallMovement+WaitForMovement branch from 1d9597e to ee8b2ad Compare March 16, 2024 03:58
@Ghabry
Copy link
Copy Markdown
Member

Ghabry commented Apr 13, 2024

About the semantics of Wait for Single Movement:

I understand this ones:

  • Event ID is obviously the event that is checked
  • Failures Amount is a threshold to prevent soft locks: 0 = wait infinitely, >=1 abort move route and continue when failure threshold is reached

But about the output variable:

The variable is set to 0 when the move route was aborted.

The variable is set to 1 when the move route did not exist or ended successfully.

Is this correct and the intention?

@Ghabry Ghabry added the EasyRPG New functionality exclusive to EasyRPG Player label Apr 20, 2024
@Ghabry Ghabry added this to the 0.8.1 milestone Apr 22, 2024
@ghost ghost added the Awaiting Rebase Pull requests with conflicting files due to former merge label Jul 2, 2024
@Ghabry Ghabry modified the milestones: 0.8.1, 0.8.2 Nov 1, 2024
`@raw 2050, "SetMoveSpeed", 0, 10001, 1, 3`
@2050("typeOfAction",[targetIsVar,target, parameterIsvar, parameter])

```js
@raw 2051, "", 0, 10001 //Wait for Single Movement
@raw 20140, "Fails to move x times", 8 // start fail branch
@raw 10 //empty space for more cmds
@raw 20141 // end of fail branch
```
```js
@raw 2050, "FaceTowards", eventAIsVar,eventA, eventBisVar, eventB
```
```js
@raw 2050, "FaceAway", eventAIsVar,eventA, eventBisVar, eventB
```
@Ghabry Ghabry force-pushed the CallMovement+WaitForMovement branch from ee8b2ad to 875e012 Compare November 3, 2024 20:42
@Ghabry Ghabry removed the Awaiting Rebase Pull requests with conflicting files due to former merge label Nov 3, 2024
@Ghabry Ghabry changed the title New Commands: 2050 - Call Movement Action | 2051 - Wait for Single Movement (can Detect fail cases) New Commands: 2050 - Call Movement Action Nov 21, 2024
@ghost ghost added the Awaiting Rebase Pull requests with conflicting files due to former merge label Nov 30, 2024
@florianessl
Copy link
Copy Markdown
Member

Small draft proposal for providing extended functionality of "StopMovement" with a new command:
florianessl@07a5b5c
(Not yet tested - could break)

Minimum parameter size: 3

  • param[0]: Mode
    • 0: Cancel routes of given events
    • 1: Cancel all active routes except those of the given events
  • param[1]: ValueOrVariable modifier (Single value - I see no need to mix modifiers for the subsequent span of parameters)
  • param[2 - x]: event ids

Side note:
Cancelling move routes for single events is actually possible in Vanilla RPG_RT by just calling "Set Move Route" without providing a list of move_commands. But I'm sure a lot of people aren't aware of this detail.

@jetrotal
Copy link
Copy Markdown
Contributor Author

jetrotal commented Jun 10, 2025

@florianessl I like this idea a lot!

Maybe extending it a bit more with
Pause, Resume, Restart Move Route (and maybe goto(lineN)? ) options could help making it more independent from the blank move route approach.


On other subject, We just discovered that this command I made is a bit similar to Maniacs "Add Move Route", with 2 differences:

  • Maniacs Command needs an set move route happening right before it being called.
  • Our command call move route actions instantly, instead of waiting for the next frame, as it is done in call move route (some people liked this a lot)

@Ghabry
Copy link
Copy Markdown
Member

Ghabry commented Jun 10, 2025

Yeah I was thinking about this PR here again after seeing "Add Move Route" and imo this command is quite bad. Especially the requirement to have an existing move route (would be also more useful if it would create a new route instead of silently failing).

At least everything that finishes immediately is imo for this command here. Stuff that takes longer to execute needs testing (or is better suited in a move route).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting Rebase Pull requests with conflicting files due to former merge EasyRPG New functionality exclusive to EasyRPG Player Enhancement

Development

Successfully merging this pull request may close these issues.

3 participants