Help with a trigger please. -1 reply

Please wait...

paulberaud

I'm too cool to Post

50 XP

25th July 2004

0 Uploads

1 Posts

0 Threads

#1 14 years ago

Here is the scenario. 8 players or less. Each player with 1 unit. A unit from whichever player has to make it from 1 side to the other. There will be flying sheeps in between. "If a unit touches the flying sheeps, the unit dies". Here is the problem. I can not make a trigger that can do the sentence between " ", because it tells me to choose a unit. So I choose one but the unit I have to choose has to be already on the map, and There will be about 100 or + sheeps flying around. The event is this "Unit - A unit comes within 1.00 of ->"?"<- Here I want to put the sheep, but it tells me to select it from the map,. Is there a way to select 1 and that 1 represent all of the sheeps in the map? Here is the condition "[Unit-type of [Triggering unit]] Equal to ->"?"<- Here how do I do it to tell it that I want ANY UNIT owned by such & such player to be the unit to die when they touch the sheep. And here is the action "Unit - Kill [Picked unit]. If anyone can think of a better action I can use or maybe you know of another way to make the whole thing happen. The thing is that after the peasant (which will be the first unit owned by the players) reaches the other side, the peasants will be removed and footies will spawn on the starting side, and then knights, and so on and so son. So, the problem is that I can't just select peasant because there will be spawning units after the peasant dies, and they will not be in the map at begining with peasants, They will appear only after peasant dies, that's why I need the condition to be "any units owned by player x". Plz help! I try explaining it as best as I could.




OD-Deadly Blowfish

Head Of Creep Campaigns Mod

50 XP

28th June 2004

0 Uploads

131 Posts

0 Threads

#2 14 years ago

Perhaps you could try using jass




Eleandor

No User title

50 XP

27th July 2004

0 Uploads

548 Posts

0 Threads

#3 14 years ago
paulberaudHere is the scenario. 8 players or less. Each player with 1 unit. A unit from whichever player has to make it from 1 side to the other. There will be flying sheeps in between. "If a unit touches the flying sheeps, the unit dies". Here is the problem. I can not make a trigger that can do the sentence between " ", because it tells me to choose a unit. So I choose one but the unit I have to choose has to be already on the map, and There will be about 100 or + sheeps flying around. The event is this "Unit - A unit comes within 1.00 of ->"?"<- Here I want to put the sheep, but it tells me to select it from the map,. Is there a way to select 1 and that 1 represent all of the sheeps in the map? Here is the condition "[Unit-type of [Triggering unit]] Equal to ->"?"<- Here how do I do it to tell it that I want ANY UNIT owned by such & such player to be the unit to die when they touch the sheep. And here is the action "Unit - Kill [Picked unit]. If anyone can think of a better action I can use or maybe you know of another way to make the whole thing happen. The thing is that after the peasant (which will be the first unit owned by the players) reaches the other side, the peasants will be removed and footies will spawn on the starting side, and then knights, and so on and so son. So, the problem is that I can't just select peasant because there will be spawning units after the peasant dies, and they will not be in the map at begining with peasants, They will appear only after peasant dies, that's why I need the condition to be "any units owned by player x". Plz help! I try explaining it as best as I could.

I don'( know the condition will work, but It may be this: Condition: [Unit-type of [Triggering unit]] Equal to ->"?"<- Equal to: (Default is footman) You click at 'footman' and you do not apply 'value' but you apply 'function' Then, the function has to be 'Unit type of unit' Triggering Unit (Default unit of that function) = Random unit from unit group The unit group = Units owned by player X color. Player X color = the owner of the sheeps with its color. I am not sure It will work, but I don't think there is another possibility to make such a trigger.




Eleandor

No User title

50 XP

27th July 2004

0 Uploads

548 Posts

0 Threads

#4 14 years ago

I really don't know how to make the event. But I think there is another way: Let the sheep have the possibility to attack. (damage = 0) If they see the unit, you can make another trigger: Trigger 1: Event : Unit - Generic Unit Event --> a Unit is attacked Condition: Unit-Type Comparison --> Unit Type of "(You apply 'function) Event response: attackING unit" "Equal to" "Unit type of 'Random unit from unit group' (Unit group = Units of type )" Action : The action that the sheep has to do. Do you understand me? If oyu don't, I'll explain it again.