Making player owned units attack "player"?

Smygarn777

Member
Reaction score
6
Simple in simple, im looking for a way to make a unit attack the player, not a set point or specific unit.

Some of you may remember that in Red Alert or other similar games when the Computer lost all their structures, that their units would go on a suicide run. thats practically what im looking for.

How to make the units go on a suicide run towards the player owned structures.

i hope there is a simple solution for this.
 

Executor

I see you
Reaction score
57
Yes: Don't post sth. like that in the "Tutorials and Resources" - Section.

To your question:

Change the ownership of that unit to some AI - controlled player slot?
 

kaboo

New Member
Reaction score
45
1. find the buildings owned by winner
2. order units of defeated player to move somewhere nearby those buildings

Code:
actions
- unit group - pick every unit in units controled by defeated player
  - if picked unit is not structure then
     - unit - order picked unit to move to random point in region centered at position of winner structure with size (500,500)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top