| 11-16-2003, 11:24 PM | #1 |
hi, i'm working on a map and i cannot seem to find something. I want to use something like (Unit-type of (Selected Unit)) Equal to CurrentLevelUnit[Level] Now, my problem is that there doesn't seem to be a selected unit part in the WE. I dunno if this is possible or not, and if it is obvious and i just missed it please point me in the right direction =) all help is greatly appreciated |
| 11-16-2003, 11:26 PM | #2 |
Perhaps you could make an event of something like "A unit is selected" then something like "Triggering unit equal to CurrentLevelUnit[Level]" or something along those lines. I don't really see how else it could be done. |
| 11-16-2003, 11:27 PM | #3 |
its in events. Event Response- Selected Unit. |
| 11-16-2003, 11:44 PM | #4 |
i know i should see it, but there i definately don't. I'm using this in the condition part of the trigger. I go down to unit type comparison and then click on triggering unit to change that to something else, i scroll down and none of them are Event Response - selected unit, the closest to that is Event response - targeted unit but that doesn't seem to be what i want =\ |
| 11-17-2003, 12:17 AM | #5 |
Use "Event Response - Triggering unit" to refer to Player selects a unit events. (From the WE) |
| 11-17-2003, 12:28 AM | #6 | |
perhaps i should just post my whole trigger so you all can get an idea of what i'm trying to accomplish. Quote:
|
| 11-17-2003, 01:31 AM | #7 |
bump =) please help me I'll give uh...5 points to whoever gives me either a working trig that accomplishes whaqt i'm trying to do above, or enough help to let me figure it out on my own |
| 11-17-2003, 01:45 AM | #8 |
Are you attempting to compare the selected unit's level to a different unit's level (ie. Footman lvl/Knight lvl)? If so, then you might want to try setting custom values for non-hero units. They don't have level comparison condition like hero units do. |
| 11-17-2003, 01:50 AM | #9 |
actually i'm writing a sort of unstick trigger for my TD. if a unit get's stuck, a player targets it and types -unstick. If all conditions are true unit is equal to the current level's unit, and they haven't unstuck a unit in 20 seconds, it will start the character back at the beginning. which it hopefully won't get stuck that time around |
| 11-17-2003, 01:57 AM | #10 |
Perhaps you can try to remove the 2nd condition. Turn off the Trigger then create a new trigger that wait for 20 seconds before turning the Unstick trigget back on. I have to think clearly... |
| 11-17-2003, 02:00 AM | #11 |
i don't quiet get what your saying, but my only real problem with this trigger is the part that says (Unit-type of (Targeted unit)) Equal to CurrentLevelUnit[Level] i want it to be like (Unit-type of (Selected unit)) Equal to CurrentLevelUnit[Level] but there is no selected unit part in the WE and i'm tryin to find another way around it, so far i'm unsuccesful |
| 11-17-2003, 02:17 AM | #12 |
Forget about the last post I made. It would only be applicable if there is only one player. I assume CurrentLevelUnit is a unit variable arrray. Where is the trigget that re-enables the unstick trigger? It won't work if the value is still false. Try setting the value to true right at game startup. |
| 11-17-2003, 02:31 AM | #13 |
I don't think we are quite understanding eachother lol. All i need is a way to compare the currently selected unit to the current level unit. |
| 11-17-2003, 02:40 AM | #14 |
Just make a variable for it. You won't find what you are looking for in the editor, it's not a hidden feature it just does not exist. Code:
Selected Units
Events
Player - Player 1 (Red) Selects a unit
Conditions
(Triggering unit) Equal to selectedunit
Actions
Unit Group - Add (Triggering unit) to unitvariableNow use "unitvariable" for your Wannabe "Event response - selected unit". Hope that helps. EDIT: Yeah, I just realized you can't use a variable the way you are trying to. You'll need to find a workaround but a variable is the only way to address a selected unit like you are doing. |
| 11-17-2003, 02:41 AM | #15 |
I'm saying that the Boolean variable is false by default. Make a 2nd trigger that assigns a varible to the selected unit. Use that 2nd variable for unit comparison. Edit: he beat me to posting it... |
