- Joined
- Apr 17, 2008
- Messages
- 20
Hi, i'm making a survival map that some enemies will randomly drop some items that only have effect on towers. such as +500 hp or +5 armor...etc
so i create an item and an ability for the item
is there a way to make the effect (+500 hp or +5 armor...etc) only work on the tower (structure) but no effect on the worker?
i tried a few times (by changing the target allowed of the ability) but not working so i tried to do it with trigger. first i make the item have no ability and whenever a structure acquire such item will grant an ability.
however this is kinda complicate because there are 6 type of item(1-6) and each item have 3 level(a-c), therefore i create 18 dummy items and 6 ability, each ability with 3 level
then i make a trigger like this
is there a better way to write this trigger?
thx for reading this and plz help
so i create an item and an ability for the item
is there a way to make the effect (+500 hp or +5 armor...etc) only work on the tower (structure) but no effect on the worker?
i tried a few times (by changing the target allowed of the ability) but not working so i tried to do it with trigger. first i make the item have no ability and whenever a structure acquire such item will grant an ability.
however this is kinda complicate because there are 6 type of item(1-6) and each item have 3 level(a-c), therefore i create 18 dummy items and 6 ability, each ability with 3 level
then i make a trigger like this
-
Untitled Trigger 004
-
Events
- Unit - A unit Acquires an item
-
Conditions
- ((Triggering unit) is A structure) Equal to True
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item being manipulated)) Equal to item1a
-
Then - Actions
- Unit - Add ability1 to (Triggering unit)
-
Else - Actions
- Skip remaining actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item being manipulated)) Equal to item1b
-
Then - Actions
- Unit - Add ability1 to (Triggering unit)
- Wait 1.00 game-time seconds
- Unit - Set level of ability1 for (Triggering unit) to 2
-
Else - Actions
- Skip remaining actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item being manipulated)) Equal to item1c
-
Then - Actions
- Unit - Add ability1 to (Triggering unit)
- Wait 1.00 game-time seconds
- Unit - Set level of ability1 for (Triggering unit) to 3
-
Else - Actions
- Skip remaining actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item being manipulated)) Equal to item2a
-
Then - Actions
- Unit - Add ability2 to (Triggering unit)
-
Else - Actions
- Skip remaining actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item being manipulated)) Equal to item2b
-
Then - Actions
- Unit - Add ability2 to (Triggering unit)
- Wait 1.00 game-time seconds
- Unit - Set level of ability2 for (Triggering unit) to 2
-
Else - Actions
- Skip remaining actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item being manipulated)) Equal to item2c
-
Then - Actions
- Unit - Add ability2 to (Triggering unit)
- Wait 1.00 game-time seconds
- Unit - Set level of ability2 for (Triggering unit) to 3
-
Else - Actions
- Skip remaining actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
- and so on for item3-6
is there a better way to write this trigger?
thx for reading this and plz help
Last edited: