restoring units from script?

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

anaslex
Newcomer
Posts: 5
Joined: March 19th, 2014, 11:42 pm

restoring units from script?

Post by anaslex »

so I've deprotected a map, took some stuff and made a new map, I want to be able to move/delete/add units however they are all in the script, I can add units and copy the information to the script however it's a pain in the ass, specially if I want to move units that are in the script.
Is there any way I can add units from the script to worldedit?
here is an example of the functions.

Code: Select all

function CreateUnitsForPlayer0 takes nothing returns nothing
local player p=Player(0)
local unit u
local integer unitID
local trigger t
local real life
set u=CreateUnit(p,'n03S',-6562.2,-10904.2,267.605)
set u=CreateUnit(p,'nvlk',4824.3,-11425.7,125.918)
set u=CreateUnit(p,'nvk2',4936.9,-11478.0,165.053)
set u=CreateUnit(p,'nvk2',-2306.6,-11043.3,149.133)
set u=CreateUnit(p,'nhef',1321.3,-9257.2,108.471)
endfunction
anaslex
Newcomer
Posts: 5
Joined: March 19th, 2014, 11:42 pm

Re: restoring units from script?

Post by anaslex »

Also if I have no choice to do it manually I'd like to know If I can somehow input coordinates into worldedit for a unit.