• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Command+Spawn for map :(

Status
Not open for further replies.
Level 3
Joined
Oct 18, 2009
Messages
51
Hi, im making a map (Dungeoneers) and i made some commands that dont work..:

-out (exit dungeons)
Trigger:
  • ComOut
    • Events
      • Player - Player 1 (Red) types a chat message containing -out as An exact match
      • Player - Player 2 (Blue) types a chat message containing -out as An exact match
      • Player - Player 3 (Teal) types a chat message containing -out as An exact match
      • Player - Player 4 (Purple) types a chat message containing -out as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -out as An exact match
      • Player - Player 6 (Orange) types a chat message containing -out as An exact match
      • Player - Player 7 (Green) types a chat message containing -out as An exact match
      • Player - Player 8 (Pink) types a chat message containing -out as An exact match
      • Player - Player 9 (Gray) types a chat message containing -out as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Entire map) owned by (Matching player)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (dung1ComOut <gen> contains (Picked unit)) Equal to True
            • Then - Actions
              • Unit - Move (Picked unit) instantly to (Center of Town2 <gen>)
            • Else - Actions
      • Unit Group - Pick every unit in (Units in (Entire map) owned by (Matching player)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dung1ComOut2 <gen> contains (Picked unit)) Equal to True
            • Then - Actions
              • Unit - Move (Picked unit) instantly to (Center of Town2 <gen>)
            • Else - Actions
and the respawn:
Trigger:
  • TrigSpawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
      • (Custom value of (Triggering unit)) Greater than 0
    • Actions
      • Custom script: local integer i = GetUnitTypeId(GetTriggerUnit())
      • Custom script: local integer ii = GetUnitUserData(GetTriggerUnit())
      • Wait RespawnTime game-time seconds
      • Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
What is happening?
The script
  • call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
which is
JASS:
call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
Makes an error of 'Expected a name'

Thank you, +rep to helpfullness.
I appreciate your help :)
 
Last edited:
Level 3
Joined
Oct 18, 2009
Messages
51
it still does 'Expected a name'

JASS:
SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)

maybe it should be like
JASS:
SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[i]),ii,GetLocationY(udg_Creep_Point[ii]),270),ii)

for the
it is on the outermost brackets...
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Does that actually work? I think you should use triggering player, not matching player.

  • Actions
    • Custom Script: bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Entire map) owned by (Triggering player)) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • OR
              • (dung1ComOut <gen> contains (Picked unit)) Equal to True
              • (Dung1ComOut2 <gen> contains (Picked unit)) Equal to True
          • Then - Actions
            • Unit - Move (Picked unit) instantly to (Center of Town2 <gen>)
          • Else - Actions
Do you have a variable called Creep_Point in your variable editor? Have you set it to array?
 
Level 3
Joined
Oct 18, 2009
Messages
51
It works! thanks!

i got this:
  • ComOut
    • Events
      • Player - Player 1 (Red) types a chat message containing -out as An exact match
      • Player - Player 2 (Blue) types a chat message containing -out as An exact match
      • Player - Player 3 (Teal) types a chat message containing -out as An exact match
      • Player - Player 4 (Purple) types a chat message containing -out as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -out as An exact match
      • Player - Player 6 (Orange) types a chat message containing -out as An exact match
      • Player - Player 7 (Green) types a chat message containing -out as An exact match
      • Player - Player 8 (Pink) types a chat message containing -out as An exact match
      • Player - Player 9 (Gray) types a chat message containing -out as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Entire map) owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Dung1Out <gen> contains (Picked unit)) Equal to True) or ((Dung1ComOut2 <gen> contains (Picked unit)) Equal to True)
            • Then - Actions
              • Unit - Move (Picked unit) instantly to (Center of Town2 <gen>)
            • Else - Actions
WORKS!
And another thing... ive got these quest trigger... and everything works except the EXP.. :(
first:
  • QuestTrollsStart
    • Events
      • Dialog - A dialog button is clicked for DialogQuests
    • Conditions
      • (Clicked dialog button) Equal to DialogQuest2
    • Actions
      • Quest - Display to (All players) the Quest Update message: The swarming Troll ...
      • Quest - Create a Required quest titled Troll Hunter with the description Those annoying Trol..., using icon path ReplaceableTextures\CommandButtons\BTNHeadhunter.blp
      • Set Quests[2] = (Last created quest)
      • Trigger - Turn off (This trigger)
  • QuestTrolls
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Quests[2] is enabled) Equal to True
      • (Unit-type of (Dying unit)) Equal to Snow Troll
    • Actions
      • Set TrollsKilled = (TrollsKilled + 1)
      • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to (Owner of (Triggering unit)))) the text: (Trolls Killed: + (String(TrollsKilled)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TrollsKilled Greater than or equal to 5
        • Then - Actions
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to (Owner of (Triggering unit)))) the text: Quest Requirement h...
          • Quest - Mark Quests[2] as Completed
          • Trigger - Turn on QuestTrollsComplete <gen>
        • Else - Actions
  • QuestTrollsComplete
    • Events
      • Unit - A unit comes within 200.00 of Questeer 0075 <gen>
    • Conditions
      • (Quests[2] is completed) Equal to True
    • Actions
      • Game - Display to (All players) the text: ((All players have recieved 300 XP because of + (Name of (Triggering player))) + awesomeness!)
      • Quest - Display to (All players) the Quest Update message: They shall not dist...
      • Player - Add 100 to (Owner of (Triggering unit)) Current gold
      • Unit Group - Pick every unit in (Units in (Entire map) matching ((Unit-type of (Picked unit)) Equal to Dungeoneer)) and do (Actions)
        • Loop - Actions
          • Hero - Add 300 experience to (Picked unit), Show level-up graphics -----this doesnt work -----
      • Quest - Destroy Quests[2]
      • Trigger - Turn on QuestTrollsStart <gen>
      • Trigger - Turn off (This trigger)
 
Level 3
Joined
Oct 18, 2009
Messages
51
what? could you use that in a trigger plox?

and why doesnt this work?
  • Game - Display to (All players) the text: ((All players have recieved 300 XP because of + (Name of (Triggering player))) + awesomeness!)
it just says All players have recieved 300 XP because ofawesomeness
exactly.. no space between OF and AWESOMENESS... its like my name is blank.. im gonna try it in LAN.. :(
LAN doesnt show the maps.. prolyl cos its 1.24.2 for some reason!!!!!!!!
omg.. editor opens in 1.24.2 but warcraft opens in 1.24.4... is it cos im opening through pc and usb?
SOLVED (world edit sucks)

How do i make the computers fixed in the place of the enemies? (like.. Dungeoneers then Monsters (Computer Easy) then Anti-Dungeoneers(Computer Easy) ??

this has been a problem...
The exp still does not work...
look:
I had 700 exp
attachment.php
STILL 700 EXP!!!
 

Attachments

  • Untitled.jpeg
    Untitled.jpeg
    708.5 KB · Views: 137
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • QuestTrollsComplete
    • Events
      • Unit - A unit comes within 200.00 of Questeer 0075 <gen>
    • Conditions
      • (Quests[2] is completed) Equal to True
    • Actions
      • Game - Display to (All players) the text: ((All players have recieved 300 XP because of + (Name of (Owner of (Triggering Unit))))) + awesomeness!)
      • Quest - Display to (All players) the Quest Update message: They shall not dist...
      • Player - Add 100 to (Owner of (Triggering unit)) Current gold
      • Custom Script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Entire map) matching ((Unit-type of (Matching unit)) Equal to Dungeoneer)) and do (Actions)
        • Loop - Actions
          • Hero - Add 300 experience to (Picked unit), Show level-up graphics -----this doesnt work -----
      • Quest - Destroy Quests[2]
      • Trigger - Turn on QuestTrollsStart <gen>
      • Trigger - Turn off (This trigger)
 
Level 3
Joined
Oct 18, 2009
Messages
51
thanks :) ill try it... (i got to go..) and ill post the result! thanks for everyones help!!! +repped

It works!!! Thank you!!!
 
Last edited:
Status
Not open for further replies.
Top