- Joined
- Nov 26, 2007
- Messages
- 1,964
Okay, so what I'm trying to do is that when unit X enters within # range of a unit Y, and unit Y has a torch item, unit X is granted vision of that unit (so he sees the extended sight radius that unit Y has as a result of the torch)
You come near a unit with a torch and can see farther, makes sense, right?
It's not working for some reason though, this is what I've got:
This is just to set the item:
This one just sets the torch to no item if a hero drops it.
Any ideas?
You come near a unit with a torch and can see farther, makes sense, right?
It's not working for some reason though, this is what I've got:
This is just to set the item:
-
TorchAct
-
Events
- Unit - A unit Acquires an item
-
Conditions
-
Multiple ConditionsOr - Any (Conditions) are true
-
Conditions
- (Item-type of (Item being manipulated)) Equal to (==) Basic Torch
- (Item-type of (Item being manipulated)) Equal to (==) Traveller's Torch
-
Conditions
-
Multiple ConditionsOr - Any (Conditions) are true
-
Actions
- Set STEEL_Torch[(Player number of (Owner of (Hero manipulating item)))] = (Item being manipulated)
- Trigger - Turn on Torch Check <gen>
-
Events
-
Torch Check
-
Events
- Time - Every 0.30 seconds of game time
- Conditions
-
Actions
-
Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (STEEL_Hero[(Integer A)] has buff Torch Glow ) Equal to (==) True
-
Then - Actions
-
Unit Group - Pick every unit in (Units within 800.00 of (Position of STEEL_Hero[(Integer A)]) matching (((Matching unit) has an item of type (Item-type of STEEL_Torch[(Player number of (Owner of (Matching unit)))])) Equal to (==) True)) and do (Actions)
-
Loop - Actions
- Unit - Grant shared vision of (Picked unit) to (Owner of STEEL_Hero[(Integer A)])
- Unit Group - Add (Picked unit) to Torch_Bearer[(Player number of (Owner of STEEL_Hero[(Integer A)]))]
-
Loop - Actions
-
Unit Group - Pick every unit in (Units within 800.00 of (Position of STEEL_Hero[(Integer A)]) matching (((Matching unit) has an item of type (Item-type of STEEL_Torch[(Player number of (Owner of (Matching unit)))])) Equal to (==) True)) and do (Actions)
-
Else - Actions
-
Unit Group - Pick every unit in Torch_Bearer[(Player number of (Owner of STEEL_Hero[(Integer A)]))] and do (Actions)
-
Loop - Actions
- Unit - Deny shared vision of (Picked unit) to (Owner of STEEL_Hero[(Integer A)])
- Unit Group - Remove (Picked unit) from Torch_Bearer[(Player number of (Owner of STEEL_Hero[(Integer A)]))]
-
Loop - Actions
-
Unit Group - Pick every unit in Torch_Bearer[(Player number of (Owner of STEEL_Hero[(Integer A)]))] and do (Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple ConditionsAnd - All (Conditions) are true
-
Conditions
- STEEL_Torch[1] Equal to (==) No item
- STEEL_Torch[2] Equal to (==) No item
- STEEL_Torch[3] Equal to (==) No item
- STEEL_Torch[4] Equal to (==) No item
- STEEL_Torch[5] Equal to (==) No item
- STEEL_Torch[6] Equal to (==) No item
- STEEL_Torch[7] Equal to (==) No item
- STEEL_Torch[8] Equal to (==) No item
- STEEL_Torch[9] Equal to (==) No item
- STEEL_Torch[10] Equal to (==) No item
- STEEL_Torch[11] Equal to (==) No item
- STEEL_Torch[12] Equal to (==) No item
-
Conditions
-
Multiple ConditionsAnd - All (Conditions) are true
-
Then - Actions
- Trigger - Turn off (This trigger)
-
Else - Actions
- Do nothing
-
If - Conditions
-
Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)
-
Events
This one just sets the torch to no item if a hero drops it.
-
TorchDet
-
Events
- Unit - A unit Loses an item
-
Conditions
-
Multiple ConditionsOr - Any (Conditions) are true
-
Conditions
- (Item-type of (Item being manipulated)) Equal to (==) Basic Torch
- (Item-type of (Item being manipulated)) Equal to (==) Traveller's Torch
-
Conditions
-
Multiple ConditionsOr - Any (Conditions) are true
-
Actions
- Set STEEL_Torch[(Player number of (Owner of (Hero manipulating item)))] = No item
-
Events
Any ideas?