Author Topic: [XP] mad.array Mini add-ons  (Read 2793 times)

Offline mad.array

  • Trained Member
  • *
  • Posts: 26
  • LV: 7
  • Gender: Male
  • Homeless Dev
    • View Profile
[XP] mad.array Mini add-ons
« on: March 24, 2013, 02:25:15 AM »
mad.array Mini Add-ons
Authors: mad.array
Version: 1.0
Type: Snippets
Key Term: Misc Add-on

Introduction

A collection of bite sized add-ons that I've tinkered with. Look at the features a few dozen pixels down to see the list. Also ignore the fact that taking the hyphen into account, the acronym for this script is MaMa.

Features

  • In Battle Event Deletion
  • Event Mover & Perma-Delete
  • Global Self Switch Controller & Switch Invert
  • Advanced Timer Controls

Screenshots

As usual, I have none.

Script

Insert somewhere above Main.
(click to show/hide)

Instructions

Insert above Main. Follow the half-hearted copy-paste job that is my set of instructions.

In Battle Event Deletion

Erases specified events DURING a battle. Not a frame before, not a frame afterwards. Use a 'Call Script' command before a battle. Then type:

    $game_temp.battle_ids = [x,y,z, etc]

Inside the array, place the ids of the events to be deleted. When the battle
begins, the events will be removed. This works in the same way as the
'Erase Event' command, so make sure you set a switch or use some other method
to permanently remove the events.

Event Mover & Perma-Delete

Permanently moves or 'deletes' events. Whenever the map is reloaded, it will remember the new location and whether the event is permanently deleted. Choose a 'Set move route' command and select the event you want to move or delete, then use the 'script' option in the move route planner and type one of these:

  'set_to_current_pos' - Sets the Events new position to where it currently is
  so that next time the map loads, that's where the event will be.

  'set_to_this_pos(x,y)' - This will set the position of the event to the
  x and y coordinates specified.

  'delete_event' - Permanently 'deletes' the event. Actually it doesn't, it
  just removes it every time the map is loaded.

Global Self Switch Controller & Switch Invert

This lets you control Self Switches on the current map from ANY event!
Using 'Call Script', just type 'SetSelfSwitch(e,s,v)' where e is the Event ID,
s is the Self Switch to alter ("A","B","C" or "D") and v is the boolean (true or false)

Also, by typing 'InvertSelfSwitch(e,s)' you can turn a self switch off if it
is on and on if it is off.

Plus, as an added bonus, you can do this to normal switches by typing
'InvertSwitch(s)'

Advanced Timer Controls

Adds a few functions to the timer. With it you can pause/unpause a timer, or add/take away time. Use the 'call script' command and type one of the following:

  timer_add(x)   -  Where x is the number of seconds you want to add to the timer.

  timer_minus(x) -  Where x is the number of seconds you want to take away from the timer

  pause_timer    -  If you want to pause the timer (Can be set before you start a timer so that it doesn't start until you tell it to.

  unpause_timer  -  Unpauses a paused timer(Can again be set when a timer isn't running.

Compatibility
None as far as I'm aware. Let me know if you encounter any.

Credits and Thanks

Mikey, for bombarding me with script requests and keeping me thinking.
Hayley, for putting up with the pre-release insomnia and post-release grouches.

Author's Notes

Credit is appreciated, but not needed.
« Last Edit: March 24, 2013, 03:05:14 AM by mad.array »
"To walk at speed, manage or oversee..."

"RUN!"

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1519
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: mad.array Mini add-ons
« Reply #1 on: March 24, 2013, 02:53:29 AM »
Very nice add-ons! I love scripts that add to the default features :) Lvl++

Offline mad.array

  • Trained Member
  • *
  • Posts: 26
  • LV: 7
  • Gender: Male
  • Homeless Dev
    • View Profile
Re: [XP] mad.array Mini add-ons
« Reply #2 on: March 24, 2013, 03:07:08 AM »
Thanks! I'm always open to suggestions for improvements to the default features, though I'll admit my time with XP is limited these days. I hope you get some use out of the script.
"To walk at speed, manage or oversee..."

"RUN!"