1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Solved] Cleaning leak from point array question

Discussion in 'World Editor Help Zone' started by Xzere, May 2, 2020.

  1. Xzere

    Xzere

    Joined:
    Feb 23, 2020
    Messages:
    152
    Resources:
    0
    Resources:
    0
    Hello, how do i clean the leak from a point that looks like this?

    • Set VariableSet RandomSpawn = (Random integer number between 1 and 13)
    • Unit - Create 10 Troll Priest (Level 2-5) for Player 12 (Brown) at Region[RandomSpawn] facing Default building facing degrees
    • Unit - Create 10 Troll (Level 1-3) for Player 12 (Brown) at Region[RandomSpawn] facing Default building facing degrees
    • Unit - Create 10 Troll Warrior (Level 1-3) for Player 12 (Brown) at Region[RandomSpawn] facing Default building facing degrees


    call RemoveLocation(udg_Region[RandomSpawn]), does not work, so how do i clean this?
     
  2. JAKEZINC

    JAKEZINC

    Joined:
    Aug 13, 2013
    Messages:
    1,615
    Resources:
    9
    Spells:
    9
    Resources:
    9
    call RemoveLocation(udg_Region[udg_RandomSpawn])
     
  3. Xzere

    Xzere

    Joined:
    Feb 23, 2020
    Messages:
    152
    Resources:
    0
    Resources:
    0
    ohh i see! thank you very much dude! :)
     
  4. Xzere

    Xzere

    Joined:
    Feb 23, 2020
    Messages:
    152
    Resources:
    0
    Resources:
    0
    @JAKEZINC Although, how do i fix this the easiest way? If i do like this it wont work properly since the second creation of units wont spawn

    • Set VariableSet RandomSpawn = (Random integer number between 1 and 13)
    • Unit - Create 15 Troll (Level 1-3) for Player 12 (Brown) at Region[RandomSpawn] facing Default building facing degrees
    • Custom script: call RemoveLocation(udg_Region[udg_RandomSpawn])
    • Unit - Create 15 Troll Warrior (Level 1-3) for Player 12 (Brown) at Region[RandomSpawn] facing Default building facing degrees
    • Custom script: call RemoveLocation(udg_Region[udg_RandomSpawn])
     
  5. maddeem

    maddeem

    Joined:
    Jan 1, 2011
    Messages:
    1,325
    Resources:
    6
    Icons:
    1
    Maps:
    2
    Spells:
    3
    Resources:
    6
    If you are continually using the same location in the same variable, there is no need to remove it.
     
  6. JAKEZINC

    JAKEZINC

    Joined:
    Aug 13, 2013
    Messages:
    1,615
    Resources:
    9
    Spells:
    9
    Resources:
    9
    If you're not dynamically creating the points to spawn then there's no reason to clean as there's no leak in reference.
     
  7. Xzere

    Xzere

    Joined:
    Feb 23, 2020
    Messages:
    152
    Resources:
    0
    Resources:
    0
    Ah i see, alright then thank you! :)
     
  8. Map Designer

    Map Designer

    Joined:
    May 2, 2011
    Messages:
    1,255
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    but it seems that random spawn is an integer not a location! (in first line)

    and in second line its used as region???!!!!