Help with a map plz!!!

daverave1212

New Member
Reaction score
0
Hey guys.I want to make a map but i need a trigger that idk how to use.
I need to make a trigger like to remove starting units only for player 1 red when starting the map.Plz help me!!
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Trigger:
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 2 to 12, do (Actions)
        • Loop - Actions
          • Set TempPoint[(Integer A)] = ((Player((Integer A))) start location)
          • Melee Game - Create (Race of (Player((Integer A)))) starting units for (Player((Integer A))) at TempPoint[(Integer A)] (Include Heroes)

TempPoint is a Point variable and an array.
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
good, cause I don't know how to remove points with an array...

like TempPoint[1]

I dont think you can. I was just trying and i even checked the tutorial it seems you cant =/ i thought it would be
Trigger:
  • Custom script: call RemoveLocation(udg_TempPoint[IntegerA])

But its not =/
Then i thought
Trigger:
  • Set TempInteger = (Integer A)
    • Custom script: call RemoveLocation(udg_TempPoint[TempInteger])

But again nope
Can someone please clarify this.
 

Nherwyziant

Be better than you were yesterday :D
Reaction score
96
good, cause I don't know how to remove points with an array...

like TempPoint[1]

Trigger:
  • Actions
    • Custom script: local integer i = 0
      • Do Multiple ActionsFor each (Integer A) from 2 to 12, do (Actions)
        • Loop - Actions
          • -------- etc --------
    • Custom script: loop
    • Custom script: set i = i+1
    • Custom script: call RemoveLocation(udg_TempPoint<i>)
    • Custom script: exitwhen i == 11
    • Custom script: endloop
    • </i>
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Ok so it must be done in Jass.

EDIT: If you were wondering a custom integer array will also not work.
Trigger:
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer i) from 2 to 12, do (Actions)
        • Loop - Actions
          • Set TempPoint<i> = ((Player(i)) start location)
          • Melee Game - Create (Race of (Player(i))) starting units for (Player(i)) at TempPoint<i> (Include Heroes)
          • Custom script: call RemoveLocation(udg_TempPoint<i>)
    • </i></i></i>
 

Ayanami

칼리
Reaction score
288
good, cause I don't know how to remove points with an array...

like TempPoint[1]

Trigger:
  • Custom script: call RemoveLocation(udg_TempPoint[1])


And to remove Integer A, it'll be:

Trigger:
  • Custom script: call RemoveLocation(udg_TempPoint[GetForLoopIndexA()])


Integer B will be:

Trigger:
  • Custom script: call RemoveLocation(udg_TempPoint[GetForLoopIndexB()])
 

Ayanami

칼리
Reaction score
288
this dont work. I tryied long ago.
I cant even save the map cause it says that this code is not right.

It does work. I did it many times. Are you sure you typed everything correctly? Why don't you go try now. I'll guarantee you that it works.
 

mapguy

New Member
Reaction score
46
It does work. I did it many times. Are you sure you typed everything correctly? Why don't you go try now. I'll guarantee you that it works.

yes, I will.

probably it was misswritten, cause I don't use TempLoc[number] in my map cause I though I coldn'tremove it.
 
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