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

Need someone to edit this spawn systen

Status
Not open for further replies.
Level 4
Joined
Jul 4, 2010
Messages
31
Ap0calypse recently made an awesome spawn system for my map, only problem is he made it for only the FIRST navy team, and not for the other 3. Therefore, this makes my TD, kind of, a single player TD?

I need someone to set up his spawn system exactly like the first one for the other 3 teams. If this is possible for anyone to do, I would greatly appreciate it.

Thanks in advance.
 

Attachments

  • Navy Cross TD V1.35 - Editor's Version.w3x
    2 MB · Views: 43
Level 28
Joined
Jan 26, 2007
Messages
4,789
=_________=

Tthe solution is VERY simple.

Let me explain
The spawn system works like a charm, there is absolutely nothing wrong with it (at first sight).
What does NOT work, is the setup.

Basically, I did one little thing wrong so the NavyPlaying-variable returns false for all teams but the first.
If NavyPlaying is false, no creeps will spawn (exactly what you asked me to do :D).

How to fix this?

Category: Map Initialization
Trigger: Map Init.

Scroll all the way down until you find this loop:

  • For each (Integer LoopInt1) from 1 to 8, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Player(LoopInt1)) slot status) Equal to Is playing
        • Then - Actions
          • Set NavyPlaying[(((Player number of (Triggering player)) + 1) / 2)] = True
          • Set Point = ((Player(LoopInt1)) start location)
          • Unit - Create 1 Igloo for (Player(LoopInt1)) at Point facing 270.00 degrees
          • Custom script: call RemoveLocation(udg_Point)
          • Set Point = (Center of SpawnRects[LoopInt1])
          • Unit - Create 1 Navy Captain for (Player(LoopInt1)) at Point facing 270.00 degrees
          • Camera - Pan camera for (Player(LoopInt1)) to Point over 0.00 seconds
          • Custom script: call RemoveLocation(udg_Point)
        • Else - Actions
The problem lies in:
" Set NavyPlaying[(((Player number of (Triggering player)) + 1) / 2)] = True"

Since there is no "Triggering Player", it will automatically set it to 1 (and as we all know, 2/2 equals 1, this NavyPlaying[1] will be set to true, but that's the ONLY navy which will be set to true.
==> Creeps will only spawn for the first team (true) and not for all other teams (false).


THE SOLUTION:

Replace "((Player number of (Triggering player))" with "LoopInt1".
Done, it works (tested it).

("Set NavyPlaying[((LoopInt1 + 1) / 2)] = True")

It was really that simple... :p


Edit:

Also:
"problems with malfunctioning triggers must be posted in Triggers & Scripts".
(Wrong forum).
 
Status
Not open for further replies.
Top