• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

confused.

Status
Not open for further replies.
This is my trigger
  • Spawn 1
    • Events
      • Timer - Every (Random real between 0.5 and 2.0) seconds of Game Time
    • Local Variables
      • NoSpawnBulk = No Region <Region>
      • SpawnPoint = No Point <Point>
      • Position of Unit = No Point <Point>
      • NoSpawn = No Region <Region[8]>
      • Player = 0 <Integer>
    • Conditions
    • Actions
      • General - For each integer Player from 1 to 8 with increment 1, do (Actions)
        • Actions
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Number of Living units in (Battle Suit units in (Entire map) owned by player Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) > 0
            • Then
              • Unit Group - Pick each unit in (Battle Suit units in (Entire map) owned by player Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
                • Actions
                  • Variable - Set Position of Unit = (Position of (Picked unit))
                  • Variable - Set NoSpawn[Player] = (Region(Position of Unit, 10.0))
                  • Region - Add NoSpawn[Player] to NoSpawnBulk
                  • Variable - Set Position of Unit = No Point
                  • Variable - Set NoSpawn[Player] = No Region
            • Else
      • Unit Group - Pick each unit in (Battle Suit units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
        • Actions
          • Variable - Set Position of Unit = (Position of (Picked unit))
          • Variable - Set SpawnPoint = (Position of Unit offset by (Random real between 11.0 and 15.0) towards (Random angle) degrees)
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • Or
                • Conditions
                  • (SpawnPoint is in NoSpawnBulk) == true
                  • (SpawnPoint is in (Playable map area)) == false
            • Then
              • Variable - Set SpawnPoint = No Point
              • Variable - Set Position of Unit = No Point
              • Variable - Set NoSpawnBulk = No Region
            • Else
              • Unit - Create 1 Zergling for player 15 at SpawnPoint using default facing (No Options)
              • Unit - Order (Last created unit) to ( Attack targeting Position of Unit) (Replace Existing Orders)
              • Variable - Set SpawnPoint = No Point
              • Variable - Set Position of Unit = No Point
              • Variable - Set NoSpawnBulk = No Region
what it does, is spawn zerglings in random locations around the picked units but excludes points that are set too close i.e. in sight range of those units, making the illusion that they are arent just spawning from thin air but rather had traversed a certain distance to finally reach their destined target.

The trigger works perfectly fine,
but i still get these errors that don't seem to affect anything but nonetheless are pretty annoying and serve as a warning sign that some creeps are about to surround you. i don't want that.
errors.jpg

whats the deal with these errors anyway?
i can't seem to fix them
 
Level 11
Joined
Aug 1, 2009
Messages
963
It is probably because you start off with no region. Try using the region function to create a region that has the min/max x/y values equal to each other, essentially an empty region.

Pretty sure its just a bug with RegionAddRegion which causes problems if one of the arguments is null.
 
Status
Not open for further replies.
Top