ReVolver
Mega Super Ultra Cool Member
- Reaction score
- 609
I've been doing this since NewGen came out
good to know that other people are using it. :thup:
And I've been aware of this even before it was thought of >_<I've been aware of this for a very long time too...![]()
Thanksua1b
udef
uhpm
From the main window in the Warcraft 3 World EditorFor the field codes as used on the first page, I can't find them. I know about the codes from Ctrl + D, and I know they're different. For whatever reason, when I ran NewGen on the school computers, they would display those codes. On my computer at home, it doesn't show up. How can I turn these codes on?
library Sparta initializer Absolute
//! textmacro SPARTANS takes NUMBER, DAMAGE, ARMOR, NEXT, SPAWNS
//! external ObjectMerger w3u n001 S$NUMBER$ anam "Spartan $NUMBER$" ua1b $DAMAGE$ udef $ARMOR$ uhpm $NUMBER$
private function Filt$NUMBER$ takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit()) == 'S$NUMBER$'
endfunction
private function Conditions$NUMBER$ takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit()) == 'S$NUMBER$'
endfunction
private function Actions$NUMBER$ takes nothing returns nothing
local group g = CreateGroup()
local integer c = 0
call GroupEnumUnitsInRect(g, GetWorldBounds(), Condition(function Filt$NUMBER$))
if (FirstOfGroup(g) == null) then
loop
exitwhen c == $SPAWNS$
call IssuePointOrder(CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'S$NEXT$', GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit())), "attack", 0., 0.)
set c = c + 1
endloop
endif
call DestroyGroup(g)
set g = null
endfunction
private function Init$NUMBER$ takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t, Condition(function Conditions$NUMBER$))
call TriggerAddAction(t, function Actions$NUMBER$)
endfunction
//! endtextmacro
//! runtextmacro SPARTANS("001", "1", "1", "002", "1")
//! runtextmacro SPARTANS("002", "1", "1", "003", "1")
//! runtextmacro SPARTANS("003", "1", "1", "004", "1")
//! runtextmacro SPARTANS("004", "1", "1", "005", "1")
//! runtextmacro SPARTANS("005", "1", "1", "006", "1")
//! runtextmacro SPARTANS("006", "1", "1", "010", "1")
//! runtextmacro SPARTANS("010", "1", "1", "001", "1")
private function Absolute takes nothing returns nothing
call Init001()
call Init002()
call Init003()
call Init004()
call Init005()
call Init006()
call Init010()
endfunction
endlibrary
n001 is the base unit you're using for all those other units. If n001 is a hero, then all other units based on it will also be heroes. Change the base unit to another raw code.EDIT: EDIT: It compiles and runs fine now, but the created units are heroes...I don't want that...Code://! external ObjectMerger w3u [B]n001[/B] S$NUMBER$ anam "Spartan $NUMBER$" ua1b $DAMAGE$ udef $ARMOR$ uhpm $NUMBER$