Skip to content

SalticHash/bunch-of-complex-stuff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7f3bae4 · Jan 25, 2025

History

28 Commits
Jan 25, 2025
Aug 3, 2024
Sep 7, 2024
Sep 7, 2024
Sep 7, 2024
Jan 25, 2025
Aug 3, 2024
May 29, 2024
Jan 25, 2025
Aug 10, 2024

Repository files navigation

Bunch of Complex Stuff (for AFOM)

A box containing the logo of BOCS, get it?

Find on GameBanana

The mod is now officially part of AFOM and I will keep working on it from there, improvements are on the way!

The triggers

Object variable sprite Object get variable sprite Object delay sprite Object compare sprite

A mod for Pizza Tower's "Another Fixed Objects Mod", this mod offers triggers and more complex features for AFOM, the full list of additions is listed down below.

  • Added obj_variable, obj_delay, obj_getvar and obj_compare, all of them children of obj_trigger.
  • Added the ability to use global variables as values for object's variables.

Sound like not a lot but it's very powerful.

obj_trigger

// The ID of this trigger
trigger_id = -1;

// The ID of the trigger to be triggered if this trigger executes properly
target_trigger_id = -1;

// Execute on room start
on_start = true;

// Execute when player inside
on_touch = false;

// Execute when triggered by other triggers
on_trigger = false;

// Execute every frame (ignores multi)
on_repeat = false;

// Execute even if executed before, else just execute one time.
multi = false;

// Activated (ignored if multi)
activated = false;

obj_variable

// The name of the global variable to set
name = "panic";
    
// The value to set it to
value = true;

obj_delay

// The delay in seconds to trigger target trigger
delay = 1;

obj_compare

// The values to compare
a = 5;
b = 10;
    
// The operation to check: =, !=, >, <, >=, <=, or, and.
op = "=";

obj_getvar

// The object you want to get a variable from.
target_obj = obj_player
    
// The local variable of the object.
target_var = "x"
    
// The global variable to set it to.
target_global_var = "player_x"

Variable access

v_ or vs_ before a local variable name, sets a global variable to a local one, v_ for each frame and vs_ for on room start, example

v_x = panic; in this case the x position of the object is the value of the global variable panic.

Variable definition

g_ or gs_ before a global variable name, sets a local variable to a global one, g_ for each frame and gs_ for on room start, example g_pepx = x in this case the global variable pepx is set to the x of the object each frame, very similar to obj_getvar, but obj_getvar is for objects that you can't set this variable in like peppino.

Operations

Where each operation starts with zero and then the front operation is evaluated.

op=,+panic,*100,
op=,-100,+100,
op=,+glob1,+glob2,
op=,+6,*7,/4,