User Tools

Site Tools


prpl:iseditmode

<- PRPL reference <- Map/Mission

IsEditMode

ArgumentsResultNotation
none True/False [ - b1 ]

Description

Returns 1 if this script is running on a map open in the level editor, 0 otherwise. This is useful for enabling/disabling functionality while editing a map, such as a PRPL tool for creating particles directly in the editor.

Examples

IsEditMode if #Don't waste time during play
    "Debugging code" Trace
endif

IsEditMode if #Don't allow editing code to be used in-game (for utility scripts)
    "Mapmaking code" Trace
endif

IsEditMode not if #Don't sit under the mouse as might happen in-game.
    Self GetMousePosition SetUnitPixelCoords Trace
endif
prpl/iseditmode.txt · Last modified: 2017/10/31 10:19 by GameGibu