Staredit Network > Forums > SC2 Assistance > Topic: Can't use variable in certain event
Can't use variable in certain event
Dec 26 2010, 9:03 pm
By: PIESOFTHENORTH  

Dec 26 2010, 9:03 pm PIESOFTHENORTH Post #1



I am having difficulty with these things.

1. In the event Unit enters a distance from Unit it won't let me use a variable unit for the second unit. Any way to allow this?

2. Is there a way to keep text tags locked on the unit when it moves? I can attach it but it doesn't stick to the unit when it moves away.

3. I have an trigger that orders a unit to hold position, I have another trigger that fires when a unit is ordered to hold position. The first trigger does its job fine, but for some reason the second trigger doesn't fire. I tried putting a computer in the slot of the player that has this unit (this is all in editor testing btw), but it still won't work.



None.

Dec 26 2010, 9:52 pm Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

@1
Use a region and attach the region onto the unit.

@3
Does the second trigger work, if the player presses the button ingame?
You can workaround that with the run trigger action.




Dec 27 2010, 12:22 am PIESOFTHENORTH Post #3



If I manually hold position then the second trigger works for me, but the unit i'm trying to order is for a different player.



None.

Dec 27 2010, 3:16 am Roy Post #4

An artist's depiction of an Extended Unit Death

Quote from PIESOFTHENORTH
1. In the event Unit enters a distance from Unit it won't let me use a variable unit for the second unit. Any way to allow this?
As far as I know, no, not directly. Using a different event would probably be better, depending on what you want to accomplish.

Quote from PIESOFTHENORTH
2. Is there a way to keep text tags locked on the unit when it moves? I can attach it but it doesn't stick to the unit when it moves away.
There is an action called "Set Position of Text Tag" which takes in a point. You can periodically set it to the position of a specified unit.

Quote from PIESOFTHENORTH
3. I have an trigger that orders a unit to hold position, I have another trigger that fires when a unit is ordered to hold position. The first trigger does its job fine, but for some reason the second trigger doesn't fire. I tried putting a computer in the slot of the player that has this unit (this is all in editor testing btw), but it still won't work.
There is a conditional statement to check a current unit's order. If the hold position event is supposed to fire from an order from a trigger, then simply have the trigger run when you want it to run. The event fires when a hold position has been issued by a player in-game, and not when one has been set via an action.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:35 pm]
Symmetry -- though mine's probably worse
[03:35 pm]
Symmetry -- That certainly sounds similar to what I've made
[06:28 am]
Ultraviolet -- sounds like Bound & Defend
[07:43 pm]
Symmetry -- If you take the reins you damn well be ready to ride
[2026-5-23. : 2:46 pm]
NudeRaider -- you wish
[2026-5-23. : 12:43 am]
IskatuMesk -- Ah, so Reindeer Breeding 3: BDSM edition.
[2026-5-22. : 12:45 am]
Moose -- tbh
[2026-5-20. : 8:27 pm]
Symmetry -- It's a bound map where you cross obstacles to earn units to defend your base
[2026-5-20. : 8:16 pm]
Symmetry -- No, the world isn't ready for that
[2026-5-20. : 5:11 pm]
Zoan -- Reindeer Breeding 3?
Please log in to shout.


Members Online: lil-Inferno