Skip to content

Instantly share code, notes, and snippets.

View Xane123's full-sized avatar

Xane Myers Xane123

View GitHub Profile
@Xane123
Xane123 / level_setup_ref.acs
Last active March 13, 2018 00:42
Mary's Magical Adventure level setup ACS template
//INITIAL LEVEL VARIABLES
world int 3:initial_music; //This is set by areas and determines what music it will play initially.
world int 4:world_info[]; //This holds the world number ([0]) and level number within that world ([1]) to form things like "1-1".
world int 7:movesky[]; //[0] is horizontal skybox movement while [1] is vertical.
world int 14:time_override; //If set, this will either force a stormy appearance or disable sky/fog changes, allowing levels to use their own settings. 1: Change to stormy appearance, 2: Disable automatic time of day changes,
world int 15:time_settings; //This determines which arrays will be used when setting the sky appearance, sector/fade colors, and brightness levels. The stormy weather above overrides this.
world bool 16:time_safe; //If the sky cannot be seen in the area the player's in, set this to TRUE and the time of day will advance mid-level.
world int 17:time_defaults[]; //What TOD time/sky/color setitngs are applied if the TOD system is off, if any. [0] = on/off, [1
@Xane123
Xane123 / upgrade_menu.acs
Created June 28, 2018 05:45
Mary's Magical Adventure upgrade menu source (from COMMON2.acs)
////////////
//UPGRADES//
////////////
script "DetermineWUpgradeSpawn" (int spec_id)
{
bool can_spawn[3]; //Stores whether weapon upgrades, health upgrades, and jump height upgrades can spawn here.
If(special_id[spec_id]==FALSE&&challenge[0]==0)
{ //Upgrades will only spawn if the player hasn't already picked up the upgrade.
int thing_id = UniqueTID(900,100);
If(thing_id==0) { Log(s:"A unique thing ID couldn't be determined. Aborting upgrade spawn."); Terminate; }