HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

trigger for active neutral hostile unit

08-03-2005, 09:07 PM#1
Keitaro
What I want is to have a newly created neutral hostile unit to randomly choose which player from all players to attack, and then go to the next random player.
So far I've only managed to make it attack in a fairly large area, but not to make it seek out towns.
08-03-2005, 10:10 PM#2
Vexorian
First thing would be knowing which player to attack

Get a random number from 1 to 12 then Use Convert index to player and done.

Then use something like this:

Custom Script: set bj_wantDestroyGroup=true
- Pick Every Unit owned by (ToAttack) and do
-- if (Picked Unit is a building) then
--- Set CreepTarget = Picked unit

Custom Script: set bj_wantDestroyGroup=true
set TargetPoint = Unit - Position of CreepTarget
- Pick Every Unit owned by (Neutral hostile) and do:
-- ORder picked unit to attack move TargetPoint
Custom Script: call RemoveLocation(udg_TargetPoint)

08-04-2005, 04:28 PM#3
Keitaro
Thanks for the help, Lord Vexorian, but I don't get it at all.
Think of a shallow Windows-user who needs some explanation about mounting an NTFS partition in Linux. I'm afraid I have to ask you to explain everything in details, and if possible; step by step.
It seems you assumed I knew a little about what I was doing, but I'm actually a complete nobody when it comes to this.

Thanks for your time.