RPG script
From Platinum Arts Sandbox Free 3D Game Maker
Revision as of 23:35, 14 July 2010 by Hirato (Talk | contribs) (Created page with '=Intro= Generally speaking, you should not invoke the commands directly, unless it's called from one of the r_script_ slots. See the container section. Scripts work with a stac…')
Contents
Intro
Generally speaking, you should not invoke the commands directly, unless it's called from one of the r_script_ slots. See the container section.
Scripts work with a stack based approach. When invoking one of the containers, it may alter or check some values before executing the script. Once the script is executed it will revert the variables to their prior values.
Containers
These are all prefixed with r_execute_
Note that if any requires conditions aren't met, execution will abort.
- all - loops through all the maps and executes it on every entity.
- local - loops through the selected map's entities and executes the script.
- mapdata - loops through all the available maps and executes the script.
- map - executes the script on the selected map.
- selected - executes the script on the selected entity.
- player - executes the script on the player.
- curmap - executes the script on the current map.
- actor - executes the script on whatever interacted with you
- inv - loops through the selected entity's inventory
Examples
a substitute for r_execute_all
r_execute_mapdata [ r_execute_local [ .... ] ]
Looping through all entities on your current map
r_execute_curmap [ r_execute_local [ .... ] ]
How to be really nasty to people who won't leave you alone ;)
r_execute_actor [ r_execute_inv [ r_drop (r_get_itembase) ] ]