• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Unit in no team

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,290
Line of site is tied to players. It is possible to make units have no line of sight however one cannot make it so that units only respond based on their own line of sight as vision is player wide.

One can use triggers to alter shared vision between players. I think, but am not sure, that one can even turn off shared vision with oneself, resulting in the owner not getting any LoS from his units.
 
Level 11
Joined
Oct 9, 2015
Messages
721
Only players have limited vision, Neutral has vision all over the map, try using "share vision of neutral hostile with player1" for example. Your question is quite strange because only players can see, not units, however they can detect units (acquisition range). Maybe you can use my Faction System or Stealth System (or both) to achieve something similar to what you want.
 
Level 6
Joined
Jun 4, 2017
Messages
172
Use Neutral hostel?
I already tried that but neutral hostile units share vision too.
Set sight raidience to 0 for both day and night?
I still didn't tried that but I think that then units will not able to see you completely even if you are very close to them.
I think, but am not sure, that one can even turn off shared vision with oneself, resulting in the owner not getting any LoS from his units.
No it can't be done I tried that. I even tried to disable individually unit shared vision with his own player but it didn't work.
Only players have limited vision, Neutral has vision all over the map, try using "share vision of neutral hostile with player1" for example. Your question is quite strange because only players can see, not units, however they can detect units (acquisition range). Maybe you can use my Faction System or Stealth System (or both) to achieve something similar to what you want.
Well, I was trying to do a stealth map, so maybe your stealth system can help me. I will try that tomorrow because now I can't open the wc3 world editor.
 
Level 6
Joined
Jun 4, 2017
Messages
172
I found a solution to this problem using units acquisition range. Basically what I do is set all enemy units' acquisition range to 100, and then create a region every second in front of each of them, if the player unit is in that region the acquisition range of the unit who saw the player changes to 1000. Just for make sure that enemy units can't see you through walls i made a condition which creates a new region from position of the enemy unit who see you and your character and checks if there are destructible(walls) in that regions. If there are 0 destructible in the second region the enemy will see you. Just for a greater security I even add the condition "is unit visible to player". It seems to work.
Just a quick question: does regions leak? Regions created by trigger I mean.
 
Level 6
Joined
Jun 4, 2017
Messages
172
Yes.

Here's the custom script to get rid of them:
Code:
call RemoveRect(rect_variable)
Thank you.
What you described is something like my stealth system, maybe you wanna give it a look: Stealth System
I just tried it. It's really good but there is a fundamental problem: units are able to see over destructible. In my map there are walls which are destructibles, with this system all enemy units are going to see you even if there are walls in the middle of you and them.

I think I can consider this thread solved, thank you all for helping me, + rep.
 
Last edited:
Level 6
Joined
Jun 4, 2017
Messages
172
And how does your system solve that?
  • Start
    • Eventi
      • Map initialization
    • Condizioni
    • Azioni
      • Set AI_Unita[0] = (Units owned by Giocatore 2 (Blu))
      • Set Player_Hero = Fante 0000 <gen>
      • Visibilità - Create an initially Attivo visibility modifier for Giocatore (Rosso) emitting Visibilità across (Playable map area)
      • Visibilità - Create an initially Attivo visibility modifier for Giocatore 2 (Blu) emitting Visibilità across (Playable map area)
  • test
    • Eventi
      • Tempo - Every 0.75 seconds of game time
    • Condizioni
    • Azioni
      • Gruppo di unità - Pick every unit in AI_Unita[0] and do (Actions)
        • Giro - Azioni
          • Set Point[0] = ((Position of (Picked unit)) offset by 650.00 towards (Facing of (Picked unit)) degrees)
          • Set Region = (Region centered at Point[0] with size (1000.00, 1000.00))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Se - Condizioni
              • (Region contains Player_Hero) Uguale a TRUE
            • Allora - Azioni
              • Partita - Display to (All players) the text: ti vedo forse
              • Set Point[0] = (Position of (Picked unit))
              • Set Point[1] = (Position of Player_Hero)
              • Set Region = (Region(Point[0], Point[1]))
              • Set Point[2] = (Center of Region)
              • Set Region = (Region centered at Point[2] with size ((Distance between Point[0] and Point[1]), (Distance between Point[0] and Point[1])))
              • Distruttibile - Pick every destructible in Region and do (Actions)
                • Giro - Azioni
                  • Set Number_of_destructibles = (Number_of_destructibles + 1)
              • Partita - Display to (All players) the text: (String(Number_of_destructibles))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Se - Condizioni
                  • Number_of_destructibles Uguale a 0
                • Allora - Azioni
                  • Partita - Display to (All players) the text: ti vedo
                  • Set AI_Unita[1] = (Units within 1000.00 of Point[1] matching (((Matching unit) Diverso da Player_Hero) and ((Custom value of (Matching unit)) Uguale a 0)))
                  • Gruppo di unità - Pick every unit in AI_Unita[1] and do (Actions)
                    • Giro - Azioni
                      • Unità - Set (Picked unit) acquisition range to 1000.00
                      • Unità - Set the custom value of (Picked unit) to 1
                      • Unità - Order (Picked unit) to Attacca Player_Hero
                • Altrimenti - Azioni
                  • Set Number_of_destructibles = 0
            • Altrimenti - Azioni
This is the test map. I'm still using the patch 1.27 but I think you should still be able to open the map even in the 1.28, I think.
I forgot to delete those text message from the map. Don't take care of those text messages. I only used them too see if the trigger works correctly.
 

Attachments

  • Stealth test.w3x
    18.2 KB · Views: 31
Last edited:
Level 6
Joined
Jun 4, 2017
Messages
172
So if there are any destructables within a ~4*4 tile square in front of the unit they will not attack?
Not exactly, the tile square is based on how far is your unit from the enemy unit. I tested it with different sized destructibles and it seems to works with all of them. I did that to prevent enemy units to keep unseeing you if you've got a destructible behind you.
 
Last edited:
Status
Not open for further replies.
Top