HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit remove does'nt remove ?

05-02-2007, 01:24 AM#1
PsychoPif
I'm trying to make a repick option for my heroes, here's my trigger:
Trigger:
Repick
Collapse Events
Player - Player 1 (Red) types a chat message containing -repick as An exact match
Player - Player 2 (Blue) types a chat message containing -repick as An exact match
Player - Player 3 (Teal) types a chat message containing -repick as An exact match
Player - Player 4 (Purple) types a chat message containing -repick as An exact match
Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
Player - Player 6 (Orange) types a chat message containing -repick as An exact match
Player - Player 7 (Green) types a chat message containing -repick as An exact match
Player - Player 8 (Pink) types a chat message containing -repick as An exact match
Player - Player 9 (Gray) types a chat message containing -repick as An exact match
Player - Player 10 (Light Blue) types a chat message containing -repick as An exact match
Collapse Conditions
((Triggering player) Current gold) Greater than or equal to HeroCost
Collapse Actions
Set tempUnitGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
Collapse Unit Group - Pick every unit in tempUnitGroup and do (Actions)
Collapse Loop - Actions
Unit - Remove (Picked unit) from the game
Set tempUnitGroup = (Units owned by (Triggering player) of type Soulstone)
Camera - Pan camera for (Triggering player) to (Position of (Random unit from tempUnitGroup)) over 1.00 seconds
Custom script: call DestroyGroup(udg_tempUnitGroup)

The thing is, player are limited to one hero, but when I use the remove action, even though the hero is removed from the game, the player can no longer pick a new hero.

What am I doing wrong ?
05-02-2007, 01:52 AM#2
Dil999
What do you mean by can no longer pick a new hero? It says you need a new 'teir' or what?
05-02-2007, 02:24 AM#3
PsychoPif
The heroes' icon no longer apear in my tavern. Just like after I pick my first hero, the Tavern are empty.

I don't get them on my resurection building either, but that's working as intended.
05-02-2007, 03:56 AM#4
Dil999
Thats because youve restricted the number of heros with a trigger. (Its a basic trigger, all maps start with it) go to triggers, dint Limit heros or something, and delete it.
05-02-2007, 02:21 PM#5
PsychoPif
Yes I did, but I want my player to be limited to one hero only. The thing is, I want him to be able to repick if he randomed an unwanted hero or if he tried a hero that was'nt his style.

I've used the limit training trigger and the game constant technic because I'd rather now mess with the food, lumber ressources.

My problem is the player loose his hero but it look like the hero count is not lowered.
05-03-2007, 03:14 AM#6
Pyrogasm
Then simply set the limit for the heroes to +1 whenever a player repicks?