- Joined
- Mar 2, 2010
- Messages
- 3,069
i am working on inplementing the blood elves in warcraft 3. what i want is to make the units use mana to construct buildings.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I don't know how this is possible through the object editor but you can do it via triggers:
@Hell_Master
=)
dont forget to make this completely MUI otherwise it will bug up at times and not subtract mana from the unit when wanted. u should use indexing for this. hashtables should be ok if u really want to use them tho.
Erm...you can make them be summoned like undead buildings using mana by this way :
Use spellbook with no cooldown and inside put :
(for example) 8 spells that create a diffrent ward with summoned duration (the ward is our building being constructed timer, make it look like a construction in progress model). Each ward costs different mana as it is a different building.
Then use a simple trigger:
A unit dies
triggering unit equal to (ward type)
create unit - the actual building.
play sound - construction complete message for humans.
(Or even make it with no trigger - make each ward spawn a permanent unit uphon the ward's death - the unit being the building. base it off spawn hydra hatchlings)
So in total you need :
8 spells in a spellbook
8 wards for construction purposes - duration = construction time
8 buildings that spawn when each ward dies
8 triggers to spawn them (or no triggers if used spawn-spell)
That's a workaround that has its limitations but it is the easiest way.
blood elf

Events


Unit - A unit Begins construction

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Unit-type of (Constructing structure)) Equal to Dragonhawk breader



Then - Actions




Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) - 200.00)



Else - Actions




Unit - Order (Triggering unit) to Stop
Untitled Trigger 006

Events


Unit - A unit Is issued an order targeting an object

Conditions

Actions


Unit - Order (Ordered unit) to Human Peasant - Repair (Target unit of issued order)
Untitled Trigger 006

Events


Unit - A unit Is issued an order targeting an object

Conditions

Actions


Trigger - Turn Off ( this trigger)


Unit - Order (Ordered unit) to Human Peasant - Repair (Target unit of issued order)


Trigger - Turn On ( this trigger)
Register Buildings

Events


Unit - A unit Begins construction

Conditions


Or - Any (Conditions) are true



Conditions




(Unit-type of (Constructing structure)) Equal to Blood elf town hall




(Unit-type of (Constructing structure)) Equal to Altar of elven Kings (blood elf)




(Unit-type of (Constructing structure)) Equal to Lumber Mill (blood elf)




(Unit-type of (Constructing structure)) Equal to Blacksmith (Blood elf)




(Unit-type of (Constructing structure)) Equal to Arcane Sanctum (blood elf)




(Unit-type of (Constructing structure)) Equal to Blood Elf Farm




(Unit-type of (Constructing structure)) Equal to Dragonhawk breader




(Unit-type of (Constructing structure)) Equal to Blood Elf Barracks

Actions


Game - Display to (All players) the text: Registered.


Unit Group - Add (Constructing structure) to buildingGroup


Set buildingUnitCount = (buildingUnitCount + 1)


Trigger - Turn on Reduce Mana <gen>
Untitled Trigger 006

Events


Unit - A unit Is issued an order targeting an object

Conditions


Or - Any (Conditions) are true



Conditions




(Unit-type of (Targeted unit)) Equal to Blood elf town hall




(Unit-type of (Targeted unit)) Equal to Altar of elven Kings (blood elf)




(Unit-type of (Targeted unit)) Equal to Dragonhawk breader




(Unit-type of (Targeted unit)) Equal to Arcane Sanctum (blood elf)




(Unit-type of (Targeted unit)) Equal to Blacksmith (Blood elf)




(Unit-type of (Targeted unit)) Equal to Lumber Mill (blood elf)




(Unit-type of (Targeted unit)) Equal to Blood Elf Farm




(Unit-type of (Targeted unit)) Equal to Blood Elf Barracks

Actions


Trigger - Turn off (This trigger)


Unit - Order (Ordered unit) to Human Peasant - Repair (Target unit of issued order)


Trigger - Turn on (This trigger)