Staredit Network

Staredit Network -> UMS Assistance -> Getting Computer to Attack Closest Unit
Report, edit, etc...Posted by Relentles_Agony on 2006-04-02 at 20:38:20
Im making a map where weapons are fired...
now each player up to 4 on the map gets 1 air unit
Im trying to get a computer scourge to attack unit within an arena
So far ive gotten no where ive tried the order action, ive tried allied actions, and ive tried ai scripts.
Honestly i think that its an ai script but which one?
This is kinda like that Worms map where u had a drop ship and droped a unit to create a weapon well i just want to know how to get that weapon to attack .................... the fustration....
Report, edit, etc...Posted by M_s4 on 2006-04-02 at 21:54:58
Who owns the scourge?
Report, edit, etc...Posted by Relentles_Agony on 2006-04-02 at 22:22:25
um the computer owns the scourge
Report, edit, etc...Posted by Zeratul_101 on 2006-04-02 at 22:39:04
make sure the scourge computer isn't allied with the players you want it to attack, and make sure that the target unit isn't invincible
Report, edit, etc...Posted by Kookster on 2006-04-02 at 23:44:26
you could always center a location on your target then order the scourage to attack to that location.
Report, edit, etc...Posted by Kupo on 2006-04-02 at 23:50:54
Or have a location near the scourges, and have the set random suicide missions
Report, edit, etc...Posted by Relentles_Agony on 2006-04-03 at 00:53:38
QUOTE(kookster @ Apr 2 2006, 09:44 PM)
you could always center a location on your target then order the scourage to attack to that location.
[right][snapback]458450[/snapback][/right]


Well the only problem with this is will it work with multiple people and when i use the weapon will it attack the closest person and not go crazy?

ADDITION:
QUOTE(Kupo @ Apr 2 2006, 09:50 PM)
Or have a location near the scourges, and have the set random suicide missions
[right][snapback]458455[/snapback][/right]


ill try this buy I think that i did and they still just flew straight tward the center of map
but ill try..

ADDITION:
QUOTE(kookster @ Apr 2 2006, 09:44 PM)
you could always center a location on your target then order the scourage to attack to that location.
[right][snapback]458450[/snapback][/right]


this wont work because i need multiple targets to be avalible and the closest one to the weapon gets attacked...

ADDITION:
Could it be cause im doing this in X-tra????
Report, edit, etc...Posted by Zeratul_101 on 2006-04-03 at 01:09:45
agony, have you tried what i said? make sure enemies are set to enemy status. You don't need ai scripts to make units attack, its already built into the unit profile.

and no, its not xtras fault
Report, edit, etc...Posted by Kyuubi. on 2006-04-03 at 02:48:04
sometimes when you trigger order a unit to 'attack' somewhere, it doesn't attack and just goes to the place...so you might have to order it to 'patrol' so that itll attack anything on the way it sees.

its true that you dont need an ai script to order it to attack things.
like it is said computer units don't do anything in used map settings type maps unless assigned an ai script or an action to do with a trigger...but they will to try defend and attack any unit it can they see.
Report, edit, etc...Posted by Relentles_Agony on 2006-04-03 at 03:10:02
QUOTE
but they will try defend and attack any unit it can they see.
[right][snapback]458499[/snapback][/right]


Now this is my problem... i need them to be able to attack even what they cant see but what is within an arena.
Report, edit, etc...Posted by Zeratul_101 on 2006-04-03 at 11:01:51
QUOTE(Relentles_Agony @ Apr 3 2006, 01:09 AM)
Now this is my problem... i need them to be able to attack even what they cant see but what is within an arena.
[right][snapback]458501[/snapback][/right]


lol. why didn't you say so. There really isn't any effective way to do this since you refuse to center location.

you would need to divide up your "attack zone" up with locations and then by using a randomization system order the scourge to patrol to a random location.

An alternative is to detect when an enemy unit is in a location and then order it to attack there. the problem with this is that the scourge will always aim for the location furthest down the trigger list

ADDITION:
or instead of using so many locations, you could put in a grid instead
Report, edit, etc...Posted by Relentles_Agony on 2006-04-03 at 18:28:06
QUOTE(Zeratul_101 @ Apr 3 2006, 09:01 AM)
lol. why didn't you say so.  There really isn't any effective way to do this since you refuse to center location.

you would need to divide up your "attack zone" up with locations and then by using a randomization system order the scourge to patrol to a random location.

An alternative is to detect when an enemy unit is in a location and then order it to attack there. the problem with this is that the scourge will always aim for the location furthest down the trigger list

ADDITION:
or instead of using so many locations, you could put in a grid instead
[right][snapback]458577[/snapback][/right]


This will make it Random? or go to closest unit?
ok, heres what happens in the map.. your flying around with a air unit [not at shuttle] you create a weapon. that weapon [the scourge] is create out of a location that fallows that flying unit. The weapon has multiple targets up to 3 other players like it self. And It MUST kill the closest one...

So does what you said still work out and if so RANDMIZATION is new to me....lol
Next Page (1)