Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Commands: 2050 - Call Movement Action #3111

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jetrotal
Copy link
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, "SetFacingLocked", targetIsVar,target, lockedIsvar, locked
@raw 2050, "SetLayer", targetIsVar,target, layerIsvar, layer
@raw 2050, "SetFlying", targetIsVar,target, flyingIsvar, flying
@raw 2050, "StopMovement", 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.

```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
Copy link
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
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
@fdelapena fdelapena 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
@fdelapena fdelapena added the Awaiting Rebase Pull requests with conflicting files due to former merge label Nov 30, 2024
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