| 01-30-2005, 01:29 PM | #1 |
Okay, now I have a large number of units of type "Pill," I want to make it so whenever a unit gets within 50 range of a Unit-Type "Pill" then do an action. The problem is that the Event for it only alows a spacific unit...I cant seem to get it to accept variables, or unit-types. Any ideas? (Other than making a seperate event for all 100 pills for all 10 players :\ .) Also, I need to be able to hide the "Pill" unit after the range has been breached...which is also not seeming to be suported by the 'unit in range' function. |
| 01-30-2005, 02:38 PM | #2 |
you can target an variable unit, just use the action: Trigger - Add Event to Trigger to fix it. I don't know any way of detecting the unit that the other unit comes in range of. |
| 01-30-2005, 02:57 PM | #3 | |
Quote:
|
| 01-30-2005, 03:05 PM | #4 |
Except that the point is I dont want to make 1000 events. As such I need to use Generic unit triggers, not specific. |
| 01-30-2005, 03:24 PM | #5 | |
I'm fairly new at triggering but I think you are pretty screwed... except for Toot's Suggestion. Quote:
Basically imagine that the Pill is an archer. Make it so the archer goes and attack the unit by giving it an attack (i think) or/and an acquisition range. Then use what toot told you. Still you will need to make modifications to each pill. Another option would be with auras. One last option... what about units groups? I have no clue how they work but I imagine you can make one large unit group called pill and put all your pills there and use them. Bah I don't know what I'm saying I better shut up. |
| 01-30-2005, 03:32 PM | #6 |
I dont think that will work... Neverthelss, how bout I just get right down and say exactly what im trying to do? Maybe somoene else has a better idea on how to get the effect I want. Im making a Pacman recreation. Pacman is the unit you control, the pills are the small white dots he 'eats.' I want it set up so when Pacman gets within 100 range of ANY pill, the pill is hidden, and +1 is added to a variable (Which will make up the score displayed) Later. I need to be able to unhide the pils, so they are each assigned a variable in the intilization (RedPill(Redpillcount+1)). How can I make it all work out? |
| 01-30-2005, 05:22 PM | #7 |
you dont need 98758934 events, u just need 3 triggers. one trigger: event: unit enters playable map (fired each time a pill is placed) condition: unit = pill action: trigger - add event or like u need to pick them on map init: event: map init actions: unit group pick every unit of type pill and do trigger - add event |
| 01-30-2005, 05:23 PM | #8 |
Heh, thanks. However I devised my own aproach which works flawlessly with only 2 triggers |
| 01-30-2005, 06:40 PM | #9 |
Otherwise you could've given pacman Immolation (without any fire around). Then just count killed units for the scoreboard. |
| 01-30-2005, 07:02 PM | #10 |
ehh, if thats what you want Tim, why can't you just make a trigger some what like this: Event: Unit comes with in range of 100 of Pacman Conds: Unittype of triggering unit = pill Actions: -Remove/hide triggering unit -Set Pills_Taken = Pills_taken + 1 |
