Player icon indicating copy to clipboard operation
Player copied to clipboard

New Commands: 2050 - Call Movement Action | 2051 - Wait for Single Movement (can Detect fail cases)

Open jetrotal opened this issue 1 year ago • 2 comments

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.

@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 avatar Oct 02 '23 19:10 jetrotal

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 avatar Dec 07 '23 12:12 jetrotal

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 avatar Apr 13 '24 19:04 Ghabry