change owner stop my units

andrei009

Member
Reaction score
1
This is just a quick question .
How can I make all the units that were attacking the enemy building to keep attacking the building even if the building changed the owner to my player or to someone else. Because now if a bunch of soldiers attack an enemy building just stop moving/attacking if the building changed the owner and I can't trigger them with Unit - A unit Is issued an order with no target

+ Extra question : How can I disable black mask & fog of war for a Picked Player?
 

Inflicted

Currently inactive
Reaction score
63
Well do they change to an ally or enemy?
I think your problem might be that you change teams to an ally. You could pick all the units nearby, but to check which units where attacking it before you will need to trigger it. Perhaps a continious trigger that runs every time a unit is attacked, using a hashtable to store the last attacked unit and then comparing? But it could easily be complex.

+ Extra question : How can I disable black mask & fog of war for a Picked Player? .
Well there is a way to kindof cheat for this, i'd be careful if you are like going to continiously add and remove vision over the entire map. Dont enable/disable fog of war and black mask but rather give a vision modifier.
eg code below:
Trigger:
  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 10.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across (Playable map area)
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Fog of war across (Playable map area)
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Black mask across (Playable map area)
          • Visibility - Create an initially Disabled visibility modifier for (Picked player) emitting Fog of war across (Playable map area)


Trigger:
  • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across (Playable map area)

This will enable the player to see the entire map. Merely disabling it using the same trigger and setting Enable->Disable will counteract it.
If only Fog of war is to be disabled, there is a setting for that.

To get to this line, go to the heading 'Visibility' - and select 'Create Visibility Modifier Region'.

There is a slight chance of leaks I am not sure of, perhaps setting the entire map to a preset region could avoid this.
I hope I have helped, feel free to ask if there is anything you do not understand or need help with.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
uhmmm, just a heads up, ^ there you used picked player and loop integer, you should use pick every player, or convert the integer to a player via number, but if you only want to do it for a specific player, do it by choosing that specific player rather than (Picked player) like in infected's post
 

Inflicted

Currently inactive
Reaction score
63
inflicted*
and yeah that was just a quick example. Your right, rather pick from a group of In-game Playing 'players'. :/
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top