Video explanation coming soon!
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
andobj_compare
, all of them children ofobj_trigger
. - Added the ability to use global variables as values for object's variables.
Sound like not a lot but it's very powerful.
// 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;
// The name of the global variable to set name = "panic"; // The value to set it to value = true;
// The delay in seconds to trigger target trigger delay = 1;
// The values to compare a = 5; b = 10; // The operation to check: =, !=, >, <, >=, <=, or, and. op = "=";
// 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"
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.
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.
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,