• 🏆 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!

Bot And Top Lane Problem

Status
Not open for further replies.
Level 5
Joined
Jul 30, 2012
Messages
93
I'm working on AoS map but i couldn't do something. :S
My creeps of bot and top lane are go to oppenent's 2. tower and return..On middle lane no problem.Please someone help!

Sorry for language. :(
 

Attachments

  • Akissel[Beta]~4.w3x
    628.9 KB · Views: 28
Level 25
Joined
Jul 10, 2006
Messages
3,315

14w3mf9.png



Works fine here.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
That I didn't.

But if you're ordering them to attack from the corners after they reach it, it should reset their guard position.

Otherwise do this:

  • Set tempLoc = position of triggering unit
  • Unit - Move triggering unit instantly to tempLoc
  • Unit - Order triggering unit to attack-move to enemy base
  • Custom Script: call RemoveLocation(udg_tempLoc)
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Looking through your triggers now, I see you are ordering the units that reach the corners to attack the base unit.

What you need to do there is make them attack move to its position.

We use variables to clean up memory leaks (otherwise the game will lag after a while)

Here, as an example I've cleaned the leak for one of the spawns: (repeat what I've done, changing the region each time)
  • Creep Spawn
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • Set TempLoc = (Center of Takim 1 Creep Re Mid <gen>)
      • Unit - Create 3 Captain for Player 11 (Dark Green) at TempLoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempLoc)
      • -------- do the rest like this one --------
      • Unit - Create 3 Captain for Player 11 (Dark Green) at (Center of Takim 1 Creep Re Alt <gen>) facing Default building facing degrees
      • Unit - Create 3 Captain for Player 11 (Dark Green) at (Center of Takim 1 Creep Re Ust <gen>) facing Default building facing degrees
      • Unit - Create 1 Sorceress for Player 11 (Dark Green) at (Center of Takim 1 Creep Re Ust <gen>) facing Default building facing degrees
      • Unit - Create 1 Sorceress for Player 11 (Dark Green) at (Center of Takim 1 Creep Re Mid <gen>) facing Default building facing degrees
      • Unit - Create 1 Sorceress for Player 11 (Dark Green) at (Center of Takim 1 Creep Re Alt <gen>) facing Default building facing degrees
      • Unit - Create 3 Skeleton for Player 12 (Brown) at (Center of Takim 2 Creep Re Mid <gen>) facing Default building facing degrees
      • Unit - Create 3 Skeleton for Player 12 (Brown) at (Center of Takim 2 Creep Re Alt <gen>) facing Default building facing degrees
      • Unit - Create 3 Skeleton for Player 12 (Brown) at (Center of Takim 2 Creep Re Ust <gen>) facing Default building facing degrees
      • Unit - Create 1 Necromencer for Player 12 (Brown) at (Center of Takim 2 Creep Re Ust <gen>) facing Default building facing degrees
      • Unit - Create 1 Necromencer for Player 12 (Brown) at (Center of Takim 2 Creep Re Alt <gen>) facing Default building facing degrees
      • Unit - Create 1 Necromencer for Player 12 (Brown) at (Center of Takim 2 Creep Re Mid <gen>) facing Default building facing degrees
And for the corner trigger:
  • Creepleri Yurutme Top Lane Copy
    • Events
      • Unit - A unit enters Ust Region <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
        • Then - Actions
          • Set TempLoc = (Position of Ana Bina 0025 <gen>)
          • Unit - Order (Triggering unit) to Attack-Move To TempLoc
          • Custom script: call RemoveLocation(udg_TempLoc)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
        • Then - Actions
          • Unit - Order (Triggering unit) to Attack Ana Bina 0007 <gen>
        • Else - Actions
Just repeat the TempLoc step for each of the regions and groups, once again changing the target region/unit each time.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Here's all I changed:
  • Creep Spawn
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • Set CreepBug = (Center of Takim 1 Creep Re Mid <gen>)
      • Unit - Create 3 Captain for Player 11 (Dark Green) at CreepBug facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CreepBug)
      • Set CreepBug = (Center of Takim 1 Creep Re Alt <gen>)
      • Unit - Create 3 Captain for Player 11 (Dark Green) at CreepBug facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CreepBug)
      • Set CreepBug = (Center of Takim 1 Creep Re Ust <gen>)
      • Unit - Create 3 Captain for Player 11 (Dark Green) at CreepBug facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CreepBug)
      • Set CreepBug = (Center of Takim 1 Creep Re Mid <gen>)
      • Unit - Create 1 Sorceress for Player 11 (Dark Green) at CreepBug facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CreepBug)
      • Set CreepBug = (Center of Takim 1 Creep Re Mid <gen>)
      • Unit - Create 1 Sorceress for Player 11 (Dark Green) at CreepBug facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CreepBug)
      • Set CreepBug = (Center of Takim 1 Creep Re Alt <gen>)
      • Unit - Create 1 Sorceress for Player 11 (Dark Green) at CreepBug facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CreepBug)
      • Set CreepBug = (Center of Takim 2 Creep Re Mid <gen>)
      • Unit - Create 3 Skeleton for Player 12 (Brown) at CreepBug facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CreepBug)
      • Set CreepBug = (Center of Takim 2 Creep Re Alt <gen>)
      • Unit - Create 3 Skeleton for Player 12 (Brown) at CreepBug facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CreepBug)
      • Set CreepBug = (Center of Takim 2 Creep Re Ust <gen>)
      • Unit - Create 3 Skeleton for Player 12 (Brown) at CreepBug facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CreepBug)
      • Set CreepBug = (Center of Takim 2 Creep Re Ust <gen>)
      • Unit - Create 1 Necromencer for Player 12 (Brown) at CreepBug facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CreepBug)
      • Set CreepBug = (Center of Takim 2 Creep Re Alt <gen>)
      • Unit - Create 1 Necromencer for Player 12 (Brown) at CreepBug facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CreepBug)
      • Set CreepBug = (Center of Takim 2 Creep Re Mid <gen>)
      • Unit - Create 1 Necromencer for Player 12 (Brown) at CreepBug facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CreepBug)
And it works fine.

Please remember to use
  • Custom script: call RemoveLocation(udg_CreepBug)
after every time you use the variable, otherwise you'll have memory leaks, which are bad.

Also, you left out a few leak removals in one of the corner triggers!

I'll leave it there for you to find and remove; it's important that you learn to do this yourself.
 

Attachments

  • Akissel[Beta]~5.w3x
    553 KB · Views: 29
Status
Not open for further replies.
Top