• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Enemy Units won't attack with Human Transport Ships

Level 12
Joined
Aug 3, 2021
Messages
454
Hello it's Pekisa7. I have recently put human zeppelins or human transport ships as I called them on my map and when the runner enters the kings throne room he alerts the king and the ai starts producing units and after some time the enemies wont attack the player with human transport ships. They won't load units. When Arthas destroys the gate and enters a specific region it fires the ai they build units and attack with Human Transport Ships just fine. Also they won't build human transport ships when runner enters the throne room. Can you guys help me fix this? Best regards from Pekisa7.
  • AI 02 Capital Knows
    • Events
      • Unit - A unit enters RunnerToKing <gen>
    • Conditions
      • (Entering unit) Equal to Runner
    • Actions
      • Trigger - Turn off AI 02 Capital Knows <gen>
      • AI - Start campaign AI script for Player 2 (Blue): HumanBlue AI.ai
      • Player - Limit training of Illias the Great to 1 for Player 2 (Blue)
      • Visibility - Create an initially Enabled visibility modifier for Player 2 (Blue) emitting Visibility across (Entire map)
      • AI - Start campaign AI script for Player 1 (Red): HumanRedAI.ai
      • Unit Group - Order (Units in ScarletChop <gen>) to Harvest Summer Tree Wall 12160 <gen>
      • Player - Limit training of Mardak the Axeslicer to 1 for Player 1 (Red)
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Entire map)
      • AI - Start campaign AI script for Player 16 (Violet): HumanVioletAI.ai
      • Player - Limit training of Haros the Magnificent to 1 for Player 16 (Violet)
      • Visibility - Create an initially Enabled visibility modifier for Player 16 (Violet) emitting Visibility across (Entire map)
      • AI - Start campaign AI script for Player 21 (Coal): HumanBlack AI.ai
      • Player - Limit training of Targon Wolfclaw to 1 for Player 21 (Coal)
      • Visibility - Create an initially Enabled visibility modifier for Player 21 (Coal) emitting Visibility across (Entire map)
      • AI - Start campaign AI script for Player 11 (Dark Green): HumanDarkGreen AI.ai
      • Player - Limit training of Kalar Seabright to 1 for Player 11 (Dark Green)
      • Visibility - Create an initially Enabled visibility modifier for Player 11 (Dark Green) emitting Visibility across (Entire map)
      • AI - Start campaign AI script for Player 3 (Teal): ElfTeal AI.ai
      • Unit Group - Order (Units in ElfChopWood <gen>) to Harvest Summer Tree Wall 13072 <gen>
      • Player - Limit training of Elden Sunreaver to 1 for Player 3 (Teal)
      • Visibility - Create an initially Enabled visibility modifier for Player 3 (Teal) emitting Visibility across (Entire map)
      • AI - Start campaign AI script for Player 9 (Gray): DwarfGray AI.ai
      • Player - Limit training of Bron the Mighty to 1 for Player 9 (Gray)
      • Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility across (Entire map)
      • Custom script: set bj_wantDestroyGroup = true
  • Send AI 02
    • Events
      • Unit - A unit enters RunnerToKing <gen>
    • Conditions
      • (Entering unit) Equal to Runner
    • Actions
      • Trigger - Turn off Send AI 02 <gen>
      • AI - Send Player 2 (Blue) the AI Command (0, 0)
      • AI - Send Player 1 (Red) the AI Command (0, 0)
      • AI - Send Player 3 (Teal) the AI Command (0, 0)
      • AI - Send Player 9 (Gray) the AI Command (0, 0)
      • AI - Send Player 11 (Dark Green) the AI Command (0, 0)
      • AI - Send Player 21 (Coal) the AI Command (0, 0)
      • Set AICapitalCityActive = True
      • Custom script: call RemoveLocation(udg_Point_Capital_City_Active)
 
Hello it's Pekisa7. I have recently put human zeppelins or human transport ships as I called them on my map and when the runner enters the kings throne room he alerts the king and the ai starts producing units and after some time the enemies wont attack the player with human transport ships. They won't load units. When Arthas destroys the gate and enters a specific region it fires the ai they build units and attack with Human Transport Ships just fine. Also they won't build human transport ships when runner enters the throne room. Can you guys help me fix this? Best regards from Pekisa7.

The Trigger Send AI 02 is occurring at the same time as the Trigger AI 02 Capital Knowns. I think it should run afterward. In this case, you could do the following in the first trigger:

  • Trigger - Turn off AI 02 Capital Knows <gen>
  • AI - Start campaign AI script for Player 2 (Blue): HumanBlue AI.ai
  • Player - Limit training of Illias the Great to 1 for Player 2 (Blue)
  • Visibility - Create an initially Enabled visibility modifier for Player 2 (Blue) emitting Visibility across (Entire map)
  • AI - Start campaign AI script for Player 1 (Red): HumanRedAI.ai
  • Unit Group - Order (Units in ScarletChop <gen>) to Harvest Summer Tree Wall 12160 <gen>
  • Player - Limit training of Mardak the Axeslicer to 1 for Player 1 (Red)
  • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Entire map)
  • AI - Start campaign AI script for Player 16 (Violet): HumanVioletAI.ai
  • Player - Limit training of Haros the Magnificent to 1 for Player 16 (Violet)
  • Visibility - Create an initially Enabled visibility modifier for Player 16 (Violet) emitting Visibility across (Entire map)
  • AI - Start campaign AI script for Player 21 (Coal): HumanBlack AI.ai
  • Player - Limit training of Targon Wolfclaw to 1 for Player 21 (Coal)
  • Visibility - Create an initially Enabled visibility modifier for Player 21 (Coal) emitting Visibility across (Entire map)
  • AI - Start campaign AI script for Player 11 (Dark Green): HumanDarkGreen AI.ai
  • Player - Limit training of Kalar Seabright to 1 for Player 11 (Dark Green)
  • Visibility - Create an initially Enabled visibility modifier for Player 11 (Dark Green) emitting Visibility across (Entire map)
  • AI - Start campaign AI script for Player 3 (Teal): ElfTeal AI.ai
  • Unit Group - Order (Units in ElfChopWood <gen>) to Harvest Summer Tree Wall 13072 <gen>
  • Player - Limit training of Elden Sunreaver to 1 for Player 3 (Teal)
  • Visibility - Create an initially Enabled visibility modifier for Player 3 (Teal) emitting Visibility across (Entire map)
  • AI - Start campaign AI script for Player 9 (Gray): DwarfGray AI.ai
  • Player - Limit training of Bron the Mighty to 1 for Player 9 (Gray)
  • Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility across (Entire map)
  • Custom script: set bj_wantDestroyGroup = true
  • Trigger - Run Send AI 02 <gen> (ignore conditions)

The only change was the last line.

Remember to remove the Event and Condition from the second trigger.
 
The Trigger Send AI 02 is occurring at the same time as the Trigger AI 02 Capital Knowns. I think it should run afterward. In this case, you could do the following in the first trigger:

  • Trigger - Turn off AI 02 Capital Knows <gen>
  • AI - Start campaign AI script for Player 2 (Blue): HumanBlue AI.ai
  • Player - Limit training of Illias the Great to 1 for Player 2 (Blue)
  • Visibility - Create an initially Enabled visibility modifier for Player 2 (Blue) emitting Visibility across (Entire map)
  • AI - Start campaign AI script for Player 1 (Red): HumanRedAI.ai
  • Unit Group - Order (Units in ScarletChop <gen>) to Harvest Summer Tree Wall 12160 <gen>
  • Player - Limit training of Mardak the Axeslicer to 1 for Player 1 (Red)
  • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Entire map)
  • AI - Start campaign AI script for Player 16 (Violet): HumanVioletAI.ai
  • Player - Limit training of Haros the Magnificent to 1 for Player 16 (Violet)
  • Visibility - Create an initially Enabled visibility modifier for Player 16 (Violet) emitting Visibility across (Entire map)
  • AI - Start campaign AI script for Player 21 (Coal): HumanBlack AI.ai
  • Player - Limit training of Targon Wolfclaw to 1 for Player 21 (Coal)
  • Visibility - Create an initially Enabled visibility modifier for Player 21 (Coal) emitting Visibility across (Entire map)
  • AI - Start campaign AI script for Player 11 (Dark Green): HumanDarkGreen AI.ai
  • Player - Limit training of Kalar Seabright to 1 for Player 11 (Dark Green)
  • Visibility - Create an initially Enabled visibility modifier for Player 11 (Dark Green) emitting Visibility across (Entire map)
  • AI - Start campaign AI script for Player 3 (Teal): ElfTeal AI.ai
  • Unit Group - Order (Units in ElfChopWood <gen>) to Harvest Summer Tree Wall 13072 <gen>
  • Player - Limit training of Elden Sunreaver to 1 for Player 3 (Teal)
  • Visibility - Create an initially Enabled visibility modifier for Player 3 (Teal) emitting Visibility across (Entire map)
  • AI - Start campaign AI script for Player 9 (Gray): DwarfGray AI.ai
  • Player - Limit training of Bron the Mighty to 1 for Player 9 (Gray)
  • Visibility - Create an initially Enabled visibility modifier for Player 9 (Gray) emitting Visibility across (Entire map)
  • Custom script: set bj_wantDestroyGroup = true
  • Trigger - Run Send AI 02 <gen> (ignore conditions)

The only change was the last line.

Remember to remove the Event and Condition from the second trigger.
Thanks it worked. But as i have seen the gray dwarfs and teal elfs and red humans won't load there zeppelins. How do I fix this? Also I tried writting a script for them to unload to the players base using jass. Is this alright?
// Assuming 'zep' is your Zeppelin unit and 'p' is the player whose base is the target
local real targetX = GetPlayerStartLocationX(p)= 6091
local real targetY = GetPlayerStartLocationY(p)= -193104
call IssuePointOrder(zep, "unloadall", targetX, targetY)
Cause it said there is something wrong near local and I don't know what.
 
Last edited:
Thanks it worked. But as i have seen the gray dwarfs and teal elfs and red humans won't load there zeppelins. How do I fix this? Also I tried writting a script for them to unload to the players base using jass. Is this alright?
// Assuming 'zep' is your Zeppelin unit and 'p' is the player whose base is the target
local real targetX = GetPlayerStartLocationX(p)= 6091
local real targetY = GetPlayerStartLocationY(p)= -193104
call IssuePointOrder(zep, "unloadall", targetX, targetY)
Cause it said there is something wrong near local and I don't know what.

There are some important considerations in your case:


1) Syntax Error

I copy-paste the code you provided into my test map. The following error message was displayed:

zep - syntax errors.png

The error was caused because the GetPlayerStartLocationX and GetPlayerStartLocationY functions accept only one argument (player). The "=" sign does not apply in this situation.

Something to also note is that these functions are redundant, as they return the value of other functions (GetStartLocationX and GetStartLocationY)

JASS:
function GetPlayerStartLocationX takes player whichPlayer returns real
return GetStartLocationX(GetPlayerStartLocation(whichPlayer))
endfunction

JASS:
GetStartLocationX(GetPlayerStartLocation(whichPlayer))

To avoid syntax errors and to quickly find useful functions, use tools like Better Triggers (Custom Trigger Editor) and YDWE PK (World Editor).

I rewrote your trigger in my test map as follows:

JASS:
function Trig_Unload_Zep_Actions takes nothing returns nothing
    local integer unloadall = 852048
    local player p = WhichPlayer
    local real targetX = GetStartLocationX(GetPlayerStartLocation(p))
    local real targetY = GetStartLocationY(GetPlayerStartLocation(p))
    local unit zep = MyUnit
    call IssuePointOrderById(zep, unloadall, targetX, targetY)
endfunction

//===========================================================================
function InitTrig_Unload_Zep takes nothing returns nothing
    local trigger trg = CreateTrigger()
    call TriggerRegisterPlayerChatEvent(trg, Player(0), "unload", true)
    call TriggerAddAction(trg, function Trig_Unload_Zep_Actions)
    set trg = null
endfunction

To make this work on your map you need to create a trigger called Unload Zep, convert the trigger to custom text, paste that code inside the trigger and correct the variables "zep" and "p" according to what you have on your map that fits these variables.

*Here is a list with the orders ids


2) Debugging

A good habit we can acquire when creating maps is finding ways to get feedback in-game about what we need. These feedbacks can be visual, sonorous etc.

An example of what I mean is the following:

JASS:
function Trig_Debugging_Unload_Zep_Conditions takes nothing returns boolean
    local integer unloadall = 852048
    return GetUnitTypeId(GetTriggerUnit()) == 'nzep' and GetIssuedOrderId() == unloadall
endfunction

function Trig_Debugging_Unload_Zep_Actions takes nothing returns nothing
    local real targetX = GetOrderPointX()
    local real targetY = GetOrderPointY()
    local string message = "(" + R2S(targetX) + " , " + R2S(targetY) + ")"
    call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 5.00, message)
    call PingMinimap(targetX, targetY, 1.00)
    call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", targetX, targetY))
endfunction

//===========================================================================
function InitTrig_Debugging_Unload_Zep takes nothing returns nothing
    local trigger trg = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
    call TriggerAddCondition(trg, Condition(function Trig_Debugging_Unload_Zep_Conditions))
    call TriggerAddAction(trg, function Trig_Debugging_Unload_Zep_Actions)
    set trg = null
endfunction

What this trigger does is send a text message with the coordinates of the unload orders of Zeppelin-type units on the map, ping the coordinates on the minimap and create a special effect at those coordinates. This way it is easier to know whether the order sent via trigger or not is working properly.

To make this work on your map you need to create a trigger called Debugging Unload Zep, convert the trigger to custom text, paste that code inside the trigger.

3) Blizzard's default AI scripts do not tend to work well in non-melee maps in the test environment (when the Test Map button is clicked). Prefer to test your map on the Local Area Network.

4) Blizzard's default AI scripts also don't tend to work well in non-melee maps when the computer's difficulty is set to insane, use normal difficulty instead.

5) Creating your own AI scripts in GUI/Jass/vJass/Lua/etc in the Trigger Editor is laborious, but the end result is always better than depending on luck with the Blizzard's default AI scripts.
 
Last edited:
There are some important considerations in your case:


1) Syntax Error

I copy-paste the code you provided into my test map. The following error message was displayed:


The error was caused because the GetPlayerStartLocationX and GetPlayerStartLocationY functions accept only one argument (player). The "=" sign does not apply in this situation.

Something to also note is that these functions are redundant, as they return the value of other functions (GetStartLocationX and GetStartLocationY)

JASS:
function GetPlayerStartLocationX takes player whichPlayer returns real
return GetStartLocationX(GetPlayerStartLocation(whichPlayer))
endfunction

JASS:
GetStartLocationX(GetPlayerStartLocation(whichPlayer))

To avoid syntax errors and to quickly find useful functions, use tools like Better Triggers (Custom Trigger Editor) and YDWE PK (World Editor).

I rewrote your trigger in my test map as follows:

JASS:
function Trig_Unload_Zep_Actions takes nothing returns nothing
    local integer unloadall = 852048
    local player p = WhichPlayer
    local real targetX = GetStartLocationX(GetPlayerStartLocation(p))
    local real targetY = GetStartLocationY(GetPlayerStartLocation(p))
    local unit zep = MyUnit
    call IssuePointOrderById(zep, unloadall, targetX, targetY)
endfunction

//===========================================================================
function InitTrig_Unload_Zep takes nothing returns nothing
    local trigger trg = CreateTrigger()
    call TriggerRegisterPlayerChatEvent(trg, Player(0), "unload", true)
    call TriggerAddAction(trg, function Trig_Unload_Zep_Actions)
    set trg = null
endfunction

To make this work on your map you need to create a trigger called Unload Zep, convert the trigger to custom text, paste that code inside the trigger and correct the variables "zep" and "p" according to what you have on your map that fits these variables.

*Here is a list with the orders ids


2) Debugging

A good habit we can acquire when creating maps is finding ways to get feedback in-game about what we need. These feedbacks can be visual, sonorous etc.

An example of what I mean is the following:

JASS:
function Trig_Debugging_Unload_Zep_Conditions takes nothing returns boolean
    local integer unloadall = 852048
    return GetUnitTypeId(GetTriggerUnit()) == 'nzep' and GetIssuedOrderId() == unloadall
endfunction

function Trig_Debugging_Unload_Zep_Actions takes nothing returns nothing
    local real targetX = GetOrderPointX()
    local real targetY = GetOrderPointY()
    local string message = "(" + R2S(targetX) + " , " + R2S(targetY) + ")"
    call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 5.00, message)
    call PingMinimap(targetX, targetY, 1.00)
    call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", targetX, targetY))
endfunction

//===========================================================================
function InitTrig_Debugging_Unload_Zep takes nothing returns nothing
    local trigger trg = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
    call TriggerAddCondition(trg, Condition(function Trig_Debugging_Unload_Zep_Conditions))
    call TriggerAddAction(trg, function Trig_Debugging_Unload_Zep_Actions)
    set trg = null
endfunction

What this trigger does is send a text message with the coordinates of the unload orders of Zeppelin-type units on the map, ping the coordinates on the minimap and create a special effect at those coordinates. This way it is easier to know whether the order sent via trigger or not is working properly.

To make this work on your map you need to create a trigger called Debugging Unload Zep, convert the trigger to custom text, paste that code inside the trigger.

3) Blizzard's default AI scripts do not tend to work well in non-melee maps in the test environment (when the Test Map button is clicked). Prefer to test your map on the Local Area Network.

4) Blizzard's default AI scripts also don't tend to work well in non-melee maps when the computer's difficulty is set to insane, use normal difficulty instead.

5) Creating your own AI scripts in GUI/Jass/vJass/Lua/etc in the Trigger Editor is laborious, but the end result is always better than depending on luck with the Blizzard's default AI scripts.
Thanks for the help. But enemy units get stuck on a mountain and the zeppelin drops them off here. Also teal gray and red don't load zeppelins and get stuck.
 

Attachments

  • WC3ScrnShot_042326_184013_01.png
    WC3ScrnShot_042326_184013_01.png
    3.7 MB · Views: 14
But enemy units get stuck on a mountain and the zeppelin drops them off here.
You need to be clearer on your requests.

Does this behavior of unloading units on the mountain happen because you issue the order for the zeppelins to do so, or not?

Please, send video instead of images if possible.
 
You need to be clearer on your requests.

Does this behavior of unloading units on the mountain happen because you issue the order for the zeppelins to do so, or not?

Please, send video instead of images if possible.

vJASS:
function Trig_Unload_Zep_Actions takes nothing returns nothing
    local integer unloadall = 852048
    local player p = PlayerEx(4)
    local real targetX = GetStartLocationX(GetPlayerStartLocation(p))
    local real targetY = GetStartLocationY(GetPlayerStartLocation(p))
    local unit zep = GetTriggerUnit()
    call IssuePointOrderById(GetTriggerUnit(), 852048, 6091, -193104)
endfunction
//===========================================================================
function InitTrig_Unload_Zep takes nothing returns nothing
    local trigger trg = CreateTrigger()
    call TriggerRegisterPlayerChatEvent(trg, PlayerEx(9), "unload", true)
    call TriggerAddAction(trg, function Trig_Unload_Zep_Actions)
    set trg = null
I just set the issuepointOrderById to these numbers .
 
These numbers (6091, -193104) are the coordinates of the mountain, not the players' starting location.

As I said before, for now you should only change the event and the zep and p variables.
No these 6091, -193104 numbers are from the purple player start location . I needed these numbers for other players to attack the player 4. When I wanted to change zep there were a lot of syntax errors . It won't let me write Human Transport ship at all. It wanted me to write the x and y cordinates too. I again did what you have written in jass code. I just changed my zep to GetTriggerUnit() because that is what jass let me do and they still get stuck on a mountain . Btw I am using patch 1.31.1.
 
Last edited:
If these numbers represent the starting location of the purple player, then you placed the purple player's starting location on or very close to the mountain. In that case, you should move the purple player's starting location to a safer location.

The GetTriggerUnit function returns the unit that triggered the trigger in a unit event. The trigger event I wrote is a player event.

Place the Zeppelin on your map and store it in a global variable, then set the local variable zep to the global variable that is storing the Zeppelin unit.

For example:
local unit zep = udg_MyUnitZep

You shouldn't change the arguments of the IssuePointOrderById function in the trigger, but rather the local variables. Otherwise, the use of local variables becomes meaningless.

The local variables targetX and targetY are responsible for storing the coordinates of the target player's starting location. You don't need to manually set the coordinates of the target player's starting location; instead, you need to change the target player's starting location on your map.

And it seems you ignored what I wrote about debugging. Without that, it will take you a long time to understand the problems that are occurring.

I will send you a example map when possible so you can understand better.
 
If these numbers represent the starting location of the purple player, then you placed the purple player's starting location on or very close to the mountain. In that case, you should move the purple player's starting location to a safer location.

The GetTriggerUnit function returns the unit that triggered the trigger in a unit event. The trigger event I wrote is a player event.

Place the Zeppelin on your map and store it in a global variable, then set the local variable zep to the global variable that is storing the Zeppelin unit.

For example:
local unit zep = udg_MyUnitZep

You shouldn't change the arguments of the IssuePointOrderById function in the trigger, but rather the local variables. Otherwise, the use of local variables becomes meaningless.

The local variables targetX and targetY are responsible for storing the coordinates of the target player's starting location. You don't need to manually set the coordinates of the target player's starting location; instead, you need to change the target player's starting location on your map.

And it seems you ignored what I wrote about debugging. Without that, it will take you a long time to understand the problems that are occurring.

I will send you a example map when possible so you can understand better.
I didn't put the player start location on a mountain its right on top of the Tomb Citadel. So I need to put it somwhere safer . Like in the middle of the road where the runner walks? I have the human transport ship variables in my initilization. Do I have to do it in jass as well? I didn't ignore anything about debunging I just put it in my map. Is this ok? Btw my map has two difficulties normal and hard.
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Trigger - Run Elevators <gen> (checking conditions)
      • Trigger - Run Cinematic Delete Units <gen> (checking conditions)
      • Trigger - Run Vrykul Spawn <gen> (checking conditions)
      • Trigger - Run Barrels and Barricades Death <gen> (checking conditions)
      • Trigger - Run Ivunreable Barrels and Barricades <gen> (checking conditions)
      • Trigger - Run Visibillty <gen> (checking conditions)
      • Trigger - Run Barrels <gen> (checking conditions)
      • Trigger - Run Disabled Expirience <gen> (checking conditions)
      • Trigger - Run Animations <gen> (checking conditions)
      • Trigger - Run Player Propreties <gen> (checking conditions)
      • Trigger - Run Disabled Expirience <gen> (checking conditions)
      • Set Arthas_TheLichKing = Arthas 0023 <gen>
      • Set BlueHorsman = Illias the Great 2616 <gen>
      • Set BlackHorseman = Targon Wolfclaw 2723 <gen>
      • Set GreenPaladin = Kalar Seabright 2722 <gen>
      • Set TealElder = Elden Sunreaver 2657 <gen>
      • Set GrayDwarf = Bron the Mighty 2662 <gen>
      • Set VioletArchmage = Haros the Magnificent 2641 <gen>
      • Set RedKnight = Mardak the Axeslicer 2623 <gen>
      • Set LightBlueWarrior = Gregory the Wise 1158 <gen>
      • Set Barrels = (Matching destructible)
      • Set Commander_Omadas = Commander Omadas 2631 <gen>
      • Set Commander_Zolas = Commander Zolas 3684 <gen>
      • Set Commander_Gartak = Commander Gar'tak 0513 <gen>
      • Set Uogonnash_DoomLord = Uogonnash 0218 <gen>
      • Set ZombieMaster = (Casting unit)
      • Set Villager = (Attacked unit)
      • Set Brute = (Trained unit)
      • Set SummoningSpire = (Constructed structure)
      • Set Zombies = (Ownership-changed unit)
      • Set Normal = DialogButtonArray[0]
      • Set Hard = DialogButtonArray[1]
      • Set Abomination = (Dying unit)
      • Set Vrykul = (Triggering unit)
      • Set RunnerSpawnBuilding = Farm 2661 <gen>
      • Set RunnerVariableTarget = RedirectWest <gen>
      • Set Villager = (Picked unit)
      • Set DeathTower = (Casting unit)
      • Set PlagueSpreader = Plague Spreader 3678 <gen>
      • Set Loarderon_Key = Loarderon Throne Room Key 2482 <gen>
      • Set BloodKey = Blood Key 3709 <gen>
      • Set MoonKey = Moon Key 3710 <gen>
      • Set SunKey = Sun Key 3711 <gen>
      • Set HumanTransportShip = (Trained unit)
      • Set TransportShip01 = Human Transport Ship 0845 <gen>
      • Set TransportShip02 = Human Transport Ship 0846 <gen>
      • Set TransportShip03 = Human Transport Ship 3686 <gen>
      • Set TransportShip04 = Human Transport Ship 0844 <gen>
      • Set TransportShip05 = Human Transport Ship 0842 <gen>
      • Set TransportShip06 = Human Transport Ship 0843 <gen>
      • Set TransportShip07 = Human Transport Ship 3701 <gen>
      • Set TransportShip08 = Human Transport Ship 3700 <gen>
      • Set TransportShip09 = Human Transport Ship 3699 <gen>
      • Set TransportShip010 = Human Transport Ship 3691 <gen>
      • Set TransportShip011 = Human Transport Ship 3690 <gen>
      • Set TransportShip012 = Human Transport Ship 3692 <gen>
      • Set TransportShip013 = Human Transport Ship 3687 <gen>
      • Set TransportShip014 = Human Transport Ship 3688 <gen>
      • Set TransportShip015 = Human Transport Ship 3689 <gen>
      • Set TransportShip016 = Human Transport Ship 3695 <gen>
      • Set TransportShip017 = Human Transport Ship 3694 <gen>
      • Set TransportShip018 = Human Transport Ship 3693 <gen>
      • Set TransportShip019 = Human Transport Ship 3698 <gen>
      • Set TransportShip020 = Human Transport Ship 3697 <gen>
      • Set TransportShip021 = Human Transport Ship 3696 <gen>
      • Quest - Create a Optional, undiscovered quest titled Magic Valutes with the description Gregory's forces ha..., using icon path ReplaceableTextures\CommandButtons\BTNMagicVault.blp
      • Set MagicValuts = (Last created quest)
      • Quest - Create a quest requirement for MagicValuts with the description - Destroy the magic...
      • Set MagicValutsReq1 = (Last created quest requirement)
      • Unit Group - Pick every unit in (Units of type Magic Vault) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to MagicValutGroup
          • Set TotalValuts = (Number of units in MagicValutGroup)
      • -------- Selected Unit and Invunreable Units --------
      • Selection - Select Arthas_TheLichKing
      • Unit - Make Arcane Vault (Netrual Shop) 0779 <gen> Invulnerable
      • Unit - Make Fruit Stand 1513 <gen> Invulnerable
      • Unit - Make Fruit Stand 1512 <gen> Invulnerable
      • Unit - Make Fruit Stand 1613 <gen> Invulnerable
      • Unit - Make Fruit Stand 0073 <gen> Invulnerable
      • -------- Player Color --------
      • Game - Disable ally color button and Disable creep camp button
      • Custom script: call DisableTrigger(bj_cineSceneBeingSkipped)
JASS:
function Trig_Debugging_Unload_Zep_Conditions takes nothing returns boolean
    local integer unloadall = 852048
    return GetUnitTypeId(GetTriggerUnit()) == 'nzep' and GetIssuedOrderId() == unloadall
endfunction

function Trig_Debugging_Unload_Zep_Actions takes nothing returns nothing
    local real targetX = GetOrderPointX()
    local real targetY = GetOrderPointY()
    local string message = "(" + R2S(targetX) + " , " + R2S(targetY) + ")"
    call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 5.00, message)
    call PingMinimap(targetX, targetY, 1.00)
    call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", targetX, targetY))
endfunction

//===========================================================================
function InitTrig_Debugging_Unload_Zep takes nothing returns nothing
    local trigger trg = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
    call TriggerAddCondition(trg, Condition(function Trig_Debugging_Unload_Zep_Conditions))
    call TriggerAddAction(trg, function Trig_Debugging_Unload_Zep_Actions)
    set trg = null
endfunction
 

Attachments

  • WC3ScrnShot_042226_125224_01.png
    WC3ScrnShot_042226_125224_01.png
    3.7 MB · Views: 13
  • Screenshot (47).png
    Screenshot (47).png
    609.3 KB · Views: 16
Last edited:
I didn't put the player start location on a mountain its right on top of the Tomb Citadel. So I need to put it somwhere safer . Like in the middle of the road where the runner walks?
Then this is another issue related to collision. What happened was that the unloaded units were knockbacked to new coordinates, since the currently coordinates of the unloadall order are not walkable by ground units.

I have the human transport ship variables in my initilization.
The way you used global variables in the initialization trigger is partially wrong. The first reason is that casting unit, attacked unit, trained unit, dying unit, etc., are functions that return a unit if the event that triggered the trigger is a unit event. Therefore, the value stored in the global variables that use these functions in this trigger will be Null.

The second reason is that the values of global variables may not be stored correctly if the event that triggered the trigger is Map Initialization. The safest way is to use Elapsed Time = 0.00.

The global variables TransportShip can be used for the debugging purpose I mentioned before:

local unit zep = udg_TransportShip???

Do I have to do it in jass as well?
If you're using GUI, you're using Jass. GUI is just a cover for the default WC3 language. Therefore, you can create your triggers in whatever way you think is best. An important point I did earlier was about using special tools to create triggers, as they are superior to the standard GUI.

Btw my map has two difficulties normal and hard.
For now, it's best for you to create a map with only one difficult. Preferable normal.
 
Then this is another issue related to collision. What happened was that the unloaded units were knockbacked to new coordinates, since the currently coordinates of the unloadall order are not walkable by ground units.


The way you used global variables in the initialization trigger is partially wrong. The first reason is that casting unit, attacked unit, trained unit, dying unit, etc., are functions that return a unit if the event that triggered the trigger is a unit event. Therefore, the value stored in the global variables that use these functions in this trigger will be Null.

The second reason is that the values of global variables may not be stored correctly if the event that triggered the trigger is Map Initialization. The safest way is to use Elapsed Time = 0.00.

The global variables TransportShip can be used for the debugging purpose I mentioned before:

local unit zep = udg_TransportShip???


If you're using GUI, you're using Jass. GUI is just a cover for the default WC3 language. Therefore, you can create your triggers in whatever way you think is best. An important point I did earlier was about using special tools to create triggers, as they are superior to the standard GUI.


For now, it's best for you to create a map with only one difficult. Preferable normal.
Hmmm.... They get new coordinates. Well if I ever fix them attacking into the players base it is walkable. I created a new trigger in the editor with elapsed time = 0.00 and all the transport variables. Local unit zep in the jass dosn't work. It wants GetTriggeredUnit() . I tried with normal difficulty as well . It all the same they get stuck on a mountain some enemy players don't even load the transport ships. I don't want to delete the hard difficulty of my map I need it. Hello?
 
Last edited:
Back
Top