Skip to content

Commit

Permalink
New subcommands: JumpTo and SetAnimationType
Browse files Browse the repository at this point in the history
  • Loading branch information
jetrotal committed Mar 8, 2024
1 parent 6be99f8 commit 1d9597e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/game_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5061,6 +5061,7 @@ bool Game_Interpreter::CommandCallMovement(lcf::rpg::EventCommand const& com) {

int eventID = ValueOrVariable(com.parameters[0], com.parameters[1]);
int outputParam = ValueOrVariable(com.parameters[2], com.parameters[3]);
int outputParamB = ValueOrVariable(com.parameters[4], com.parameters[5]);

Game_Character* event = GetCharacter(eventID);
Game_Character* target;
Expand All @@ -5078,6 +5079,7 @@ bool Game_Interpreter::CommandCallMovement(lcf::rpg::EventCommand const& com) {
if (moveCommand == "SetMoveSpeed")event->SetMoveSpeed(outputParam);
if (moveCommand == "SetMoveFrequency")event->SetMoveFrequency(outputParam);
if (moveCommand == "SetTransparency")event->SetTransparency(outputParam);
if (moveCommand == "SetAnimationType")event->SetAnimationType(static_cast<Game_Character::AnimType>(outputParam));

if (moveCommand == "Event2Event") {
target = GetCharacter(outputParam);
Expand All @@ -5104,7 +5106,9 @@ bool Game_Interpreter::CommandCallMovement(lcf::rpg::EventCommand const& com) {
if (moveCommand == "SetLayer")event->SetLayer(outputParam);
if (moveCommand == "SetFlying")event->SetFlying(outputParam); //FIXME: I wish any event could imitate an airship, lacks more work.
if (moveCommand == "ChangeCharset")event->SetSpriteGraphic(outputString,outputParam); // syntax ChangeCharset/actor1


if (moveCommand == "JumpTo")event->Game_Character::Jump(outputParam, outputParamB), event->Game_Character::SetMoveRouteFinished(true);

if (moveCommand == "StopMovement")event->CancelMoveRoute();

return true;
Expand Down

0 comments on commit 1d9597e

Please sign in to comment.