HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Damned triggers! Anyone can help?!?

10-23-2002, 12:59 PM#1
Guest
Plz! I tried to put in a trigger that takes an item from a hero when he dies and gives it to another random hero from player group (all players), but that's not working.
Grrr! Tried to do it another way, using 'take' and 'give' triggers and so on... but that's the hell still not working! Please, help me 'cos I'm either dull or the comp fools me or both at the same time...
10-23-2002, 02:35 PM#2
Krakou
Could you post your exacte trigger ?
10-24-2002, 05:59 AM#3
Guest
It goes like this:
Events:
- unit - Arthas <gen> Dies
Conditions:
- Arthas <gen> has Orb of Fire <gen> Equal to True
Actions
- Item - Change ownership of Orb of Fire<gen>to (Random player from (All players)) and Retain Color
10-24-2002, 10:26 AM#4
Guest
Er... that seemed logical to me, when an item changes ownership, it changes its owner. Sorry 'bout that. It caused maybe my poor english. Now when I think a little about it I feel stupid :-)

Though I used trigger 'take the item from hero' and 'give it' to another, but there seems to be lack of possibilities, when I want to choose from all heroes of all players in the game. There's not any option of giving it to 'a random hero (from all players))'. Heck, I don't really know how to do it!
10-24-2002, 02:04 PM#5
Krakou
First create a groupe of units with all your heros,

than do this action:

Hero - give item to hero
Hero give <your item> to (random unit from <your group>)
10-25-2002, 06:48 AM#6
Guest
Jesus I'm lama! I tried to make a group in 'Edit variables' and put all heroes in it, but it didn't work. I simply don't know how to Create a group containing all my heroes from all players. I wanted to make it as 'array', but the option of editing was still disabled.
Pleeeeease! Could anyone be patient with me and write down how to create a group containing units? Thanks a lot...
10-25-2002, 11:45 AM#7
Krakou
The group is not an array it is a variable of type unit group.

To fill this group you have several ways to pick your heros but the action is something like add <unit> to unit group.

To picks your heros you could do this:
event : map initialisation (or other depend when your heros are created)
action : pick every unit of type hero on entire map add picked unit to unit group (this is not the exact action but I am not at home and I write this from memory)