- Joined
- Apr 7, 2012
- Messages
- 28
When unit type "egg" reached 100 mana. create unit type "spider" at position of "egg". Kills unit type "egg".
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.
Event
Unit-Unit X's mana becomes greater than 100
Action
Create 1 Unit for player 1 at position of unit X
Kill unit X
Init

Events


Map initialization

Conditions

Actions


Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Egg ) Equal to True)) and do (Actions)



Loop - Actions




Set Eggs = (Picked unit)




Set mana = (Mana of Eggs)




Set Pos = (Position of Eggs)




Unit Group - Add Eggs to EggGroup




Trigger - Turn on mana <gen>


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



If - Conditions




mana Equal to 100.00



Then - Actions




Trigger - Turn off mana <gen>




Unit - Create (Number of units in EggGroup) Spider for Player 1 (Red) at Pos facing Default building facing degrees




Unit - Remove Eggs from the game



Else - Actions
mana

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


Set mana = (mana + 20.00)
Like this??
Unit - Create (Number of units in EggGroup) Spider for Player 1 (Red) at Pos facing Default building facing degrees
Unit - Remove Eggs from the game
Better use "replace unit" action. It will do both actions removes unit and creates unit at the same time and uses less space.
___________________________________________________________________________________________
When unit type "egg" reached 100 mana. create unit type "spider" at position of "egg". Kills unit type "egg".
What do u think about adding "custom ability" to unit which would use 100mana.
When u reaches 100mana you just press that ability by your self and trigger activates.
It may only require 1ability with some lvl's for all units and triggers, like:
EGG - Custom ability (lvl1 - needs 100mana.)
Spider - Custom ability (lvl2 - needs 200mana.)
and so on...
than trigger would be like this:
EVENT
Unit starts the effect of the ability.
Condition
(Ability being cast) equal to "Your ability"
Actions
If then else
Conditions
Unit (Unit type of (casting unit)) equal to "your unit"
Than Actions
Unit - Unit replace casting unit with "your unit2"
Else Actions
If then else
Conditions
Unit (Unit type of (casting unit)) equal to "your unit2"
Than Actions
Unit - Unit replace casting unit with "your unit3"
Else Actions
I think killing egg would be more apropriate. For eye candy matters(I assume egg is some of the spider eggs war3 has)
Time - Every 0.01 seconds
Time - Every 1.00 seconds
AgreeY
PLS Time every sec. makes map go laggy. Triggers start leaking. It may ruin the map.
There's other ways to do this without "time every sec.".
Untitled Trigger 084

Events


Map initialization


Unit - A unit enters (Playable map area)

Conditions


(Unit-type of (Triggering unit)) Equal to egg

Actions


Custom script: if GetTriggerEventId() == EVENT_GAME_ENTER_REGION


Unit Group - Add (Triggering unit) to group


Custom script: else


Custom script: set bj_wantDestroyGroup = true


Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to egg))) and do (Actions)



Loop - Actions




Unit Group - Add (Picked unit) to group


Custom script: endif
Untitled Trigger 083

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


Unit Group - Pick every unit in group and do (Actions)



Loop - Actions




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





If - Conditions






(Mana of (Picked unit)) Greater than or equal to 100.00





Then - Actions






Set point = (Position of (Picked unit))






Unit - Kill (Picked unit)






Unit - Create 1 spider for (Owner of (Picked unit)) at point facing (Random angle) degrees






Custom script: call RemoveLocation(udg_point)






Unit Group - Remove (Picked unit) from group





Else - Actions
