HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Change neutral mobs to owner

05-16-2009, 04:00 PM#1
Vervekke
Hi

Im trying to change the ownership of mobs when my hero get in range of them.

This is what I got but doesn't work.

Condition
(Neutral Group 1 <gen> contains Hero) Equal to ((This trigger) is on)

Action
Unit - Change ownership of Rifleman 0004 <gen> to Player 1 (Red) and Change color
Unit - Change ownership of Rifleman 0006 <gen> to Player 1 (Red) and Change color
Unit - Change ownership of Footman 0005 <gen> to Player 1 (Red) and Change color

Neutral Group 1 is a region that I have created where the 3 mobs standing in. Now I want to change there ownership from neutral to red when my hero stands in it.

But this doesn't work. Any Ideas?

Joris
05-16-2009, 04:13 PM#2
TriggerHappy
(Neutral Group 1 <gen> contains Hero) Equal to ((This trigger) is on)

What..?

Just do

(Neutral Group 1 <gen> contains Hero) Equal to true
05-16-2009, 04:27 PM#3
Vervekke
I've tried (Neutral Group 1 <gen> contains Hero) Equal to true but it doesn't work.

Have another idea?
05-16-2009, 04:33 PM#4
Kino
Perhaps add a action that plays a short text eg. "Its Alive!".\

Simply to test if the trigger is even firing, if the text doesnt appear its because the event conditons have problems etc.
05-16-2009, 05:06 PM#5
Fireeye
I guess something like this would work perfectly fine, if no other units move into that region, you might also disable the trigger if want.

Trigger:
Whatever
Collapse Events
Unit - A unit enters <Your Region>
Collapse Conditions
((Triggering unit) is a hero) equal to True
Collapse Actions
Custom script: set bj_wantDestroyGroup = true
Set tmp_Group = (Units in <Your Region> owned by <Your Player>)
Collapse Unit group - Pick every unit in tmp_Group and do (Actions)
Collapse Loop - actions
Unit - Change ownership of (Picked unit) to (Owner of (Triggering unit)) and change color
05-16-2009, 05:12 PM#6
Vervekke
Cheers m8 thnx.

It works!