~~NOTOC~~ <=[[4rpl:start| Index]] ====== EditAddUndo ====== EditAddUndo(<-undoType) ===== Description ===== Creates an undo entry when editing the map. The argument specifies the type of undo. A value of 0 means any terrain change.\\ Only undoType of 0 (zero) is supported.\\ An undo entry can be restored by the map maker while in edit mode by pressing CTRL+Z.\\ This command does nothing when the editor is not currently active. (Enabled/disabled via Shift+E). Do note that you should use this API before applying a terrain change, not after. ===== Examples ===== EditAddUndo(0) #--Add an undo state (before changing terrain). SetTerrain(42 23 10) #--Apply terrain change. #--The terrain change is now part of the undo state and can be undone by the map maker via CTRL/command-z. <=[[4rpl:start| Index]]