- Joined
- Jul 14, 2008
- Messages
- 1,353
How do i make my version of " Iron Forged Swords " Attach a differnt sword each time it upgrades? please help.. 
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.
Iron Sword

Events


Time - Every 0.50 seconds of game time

Conditions

Actions


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



If - Conditions




(Current research level of Iron Sword for Player 1 (Red)) Equal to 1



Then - Actions




Unit - Remove Attach1 from (YourUnit)




Unit - Add Attach1 to (YourUnit)



Else - Actions




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





If - Conditions






(Current research level of Iron Sword for Player 1 (Red)) Equal to 2





Then - Actions






Unit - Remove Attach2 from (YourUnit)






Unit - Add Attach2 to (YourUnit)





Else - Actions
If you want to be effecient, try to use the evnt: A unit finishes a research
Actions

Set TempGroup = (Units of type Peon)

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


Loop - Actions



Your Actions here

Custom script: call DestroyGroup(udg_TempGroup)
Attachment1

Events


Time - Every 0.25 seconds of game time

Conditions

Actions


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



If - Conditions




(Current research level of Iron Sword for Player 1 (Red)) Equal to 1



Then - Actions




Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Peon) and do (Actions)





Loop - Actions






Unit - Remove Sword from (Picked unit)






Unit - Add Sword to (Picked unit)



Else - Actions

Example

Events


Unit - A unit Finishes research

Conditions


(Researched tech-type) Equal to Iron Forged Swords

Actions


Custom script: set bj_wantDestroyGroup = true


Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit)) of type Raider) and do (Unit - Remove Sphere from (Triggering unit))
Attachment

Events


Time - Every 0.25 seconds of game time

Conditions

Actions


Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Peon) and do (Actions)



Loop - Actions




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





If - Conditions






(Current research level of Sword for Player 1 (Red)) Equal to 1





Then - Actions






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







If - Conditions








(Level of Sword1 for (Picked unit)) Equal to 1







Then - Actions








Do nothing // ignore this, don't add Do nothing







Else - Actions








Unit - Add Sword1 to (Picked unit)








Game - Display to (All players) the text: Attachment





Else - Actions






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







If - Conditions








(Current research level of Sword for Player 1 (Red)) Equal to 2







Then - Actions








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









If - Conditions










(Level of Sword2 for (Picked unit)) Equal to 1









Then - Actions










Do nothing









Else - Actions










Unit - Remove Sword1 from (Picked unit)










Unit - Add Sword2 to (Picked unit)










Game - Display to (All players) the text: Attachment







Else - Actions
Your Trigger

Events


Time - Every 0.25 seconds of game time

Conditions

Actions


Set PlayerGroup = (All players matching (((Matching player) slot status) Equal to Is playing))


Player Group - Pick every player in PlayerGroup and do (Actions)



Loop - Actions




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





If - Conditions






(Current research level of (Iron Sword) for (Picked player)) Equal to 1





Then - Actions






Set UnitGroup = (Units owned by (Picked player))






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







Loop - Actions








Unit - Remove Sword from (Picked Unit)








Unit - Add Sword to (Picked Unit)





Else - Actions


Custom script: call DestroyForce(udg_PlayerGroup)


Custom script: call DestroyGroup(udg_UnitGroup)
Your trigger

Actions


Set PlayerGroup = (All players matching (((Matching player) is an enemy of (Owner of (Casting unit))) Equal to True))


-------- When you are done with all your Actions, do this --------


Custom script: call DestroyForce(udg_PlayerGroup)
Your trigger

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Animate Dead

Actions


Set PlayerGroup = (All players matching (((Matching player) is an enemy of (Owner of (Casting unit))) Equal to True))


Player Group - Pick every player in PlayerGroup and do (Actions)



Loop - Actions




Environment - Reset fog to default values




-------- Some other actions, such as timer --------


-------- When you are done with all your Actions, do this --------


Custom script: call DestroyForce(udg_PlayerGroup)