HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help with Custom Race Map

10-06-2010, 05:56 AM#1
Viktory
I need help with a map made to test the Campaign Naga race's power against other races, but, because I wish to use this as a template for me to add my Murloc race, I have been working on putting normal (Melee) rules into the Map.
Here are the Triggers:
Trigger:
Collapse Variable Initialization
Collapse Events
Map initialization
Conditions
Collapse Actions
Set TownHallMessages[0] = |cffffcc00You will be revealed to your opponents unless you build a Town Hall.|r
Set TownHallMessages[1] = |cffffcc00You will be revealed to your opponents unless you build a Great Hall.|r
Set TownHallMessages[2] = |cffffcc00You will be revealed to your opponents unless you build a Necropolis.|r
Set TownHallMessages[3] = |cffffcc00You will be revealed to your opponents unless you build a Tree of Life.|r
Set TownHallMessages[4] = |cffffcc00You will be revealed to your opponents unless you build a Temple of Tides.|r
Set TownHallMessages[5] = |cffffcc00You are no longer in danger of being revealed to your opponents.|r
Set TownHallMessages[6] = |cffffcc00You are no longer revealed to your opponents.|r
Collapse Race Initialization
Collapse Events
Time - Elapsed game time is 10.00 seconds
Conditions
Collapse Actions
Trigger - Turn on DefeatBlue <gen>
Trigger - Turn on DefeatRed <gen>
Trigger - Turn on Victory <gen>
Trigger - Turn off NagaRed <gen>
Trigger - Turn off NagaBlue <gen>
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
NagaRed Equal to True
Collapse Then - Actions
Set RaceIntegerRed = 4
Melee Game - Create Human starting units for Player 1 (Red) at (Player 1 (Red) start location) (Include Heroes)
Collapse Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching (((Matching unit) is A peon-type unit) Equal to True)) and do (Actions)
Collapse Loop - Actions
Unit - Replace (Picked unit) with a Mur'gul Slave using The old unit's relative life and mana
Collapse Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching (((Matching unit) is A town-hall-type unit) Equal to True)) and do (Actions)
Collapse Loop - Actions
Unit - Replace (Picked unit) with a Temple of Tides using The old unit's relative life and mana
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player 1 (Red) slot status) Equal to Is playing
Collapse Then - Actions
Collapse Player Group - Pick every player in Player Group - Player 1 (Red) and do (Actions)
Collapse Loop - Actions
Melee Game - Create (Race of (Picked player)) starting units for (Picked player) at ((Picked player) start location) (Include Heroes)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Race of Player 1 (Red)) Equal to Human
Collapse Then - Actions
Set RaceIntegerRed = 0
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Race of Player 1 (Red)) Equal to Orc
Collapse Then - Actions
Set RaceIntegerRed = 1
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Race of Player 1 (Red)) Equal to Undead
Collapse Then - Actions
Set RaceIntegerRed = 2
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Race of Player 1 (Red)) Equal to Night Elf
Collapse Then - Actions
Set RaceIntegerRed = 3
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
NagaBlue Equal to True
Collapse Then - Actions
Set RaceIntegerBlue = 5
Melee Game - Create Human starting units for Player 2 (Blue) at (Player 2 (Blue) start location) (Include Heroes)
Collapse Unit Group - Pick every unit in (Units owned by Player 2 (Blue) matching (((Matching unit) is A peon-type unit) Equal to True)) and do (Actions)
Collapse Loop - Actions
Unit - Replace (Picked unit) with a Mur'gul Slave using The old unit's relative life and mana
Collapse Unit Group - Pick every unit in (Units owned by Player 2 (Blue) matching (((Matching unit) is A town-hall-type unit) Equal to True)) and do (Actions)
Collapse Loop - Actions
Unit - Replace (Picked unit) with a Temple of Tides using The old unit's relative life and mana
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player 2 (Blue) slot status) Equal to Is playing
Collapse Then - Actions
Collapse Player Group - Pick every player in Player Group - Player 2 (Blue) and do (Actions)
Collapse Loop - Actions
Melee Game - Create (Race of (Picked player)) starting units for (Picked player) at ((Picked player) start location) (Include Heroes)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Race of Player 2 (Blue)) Equal to Human
Collapse Then - Actions
Set RaceIntegerBlue = 0
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Race of Player 2 (Blue)) Equal to Orc
Collapse Then - Actions
Set RaceIntegerBlue = 1
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Race of Player 2 (Blue)) Equal to Undead
Collapse Then - Actions
Set RaceIntegerBlue = 2
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Race of Player 2 (Blue)) Equal to Night Elf
Collapse Then - Actions
Set RaceIntegerBlue = 3
Else - Actions
Melee Game - Use melee time of day (for all players)
Melee Game - Limit Heroes to 1 per Hero-type (for all players)
Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
Melee Game - Set starting resources (for all players)
Melee Game - Remove creeps and critters from used start locations (for all players)
Melee Game - Run melee AI scripts (for computer players)
Collapse Player Group - Pick every player in (All players matching (((Picked player) slot status) Equal to Is playing)) and do (Actions)
Collapse Loop - Actions
Player Group - Add (Picked player) to InitPlayerGroup
Collapse Player Group - Pick every player in InitPlayerGroup and do (Actions)
Collapse Loop - Actions
Set ForcesLeft = (ForcesLeft + 1)
Collapse Player Group - Pick every player in (All allies of (Picked player)) and do (Actions)
Collapse Loop - Actions
Player Group - Remove (Picked player) from InitPlayerGroup
Collapse NagaRed
Collapse Events
Player - Player 1 (Red) types a chat message containing -naga as An exact match
Conditions
Collapse Actions
Set NagaRed = True
Collapse NagaBlue
Collapse Events
Player - Player 2 (Blue) types a chat message containing -naga as An exact match
Conditions
Collapse Actions
Set NagaBlue = True
Collapse DefeatBlue
Collapse Events
Unit - A unit Cancels construction
Unit - A unit Dies
Collapse Conditions
((Dying unit) is A structure) Equal to True
Collapse Actions
Wait 2.50 seconds
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of units in (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to True) and (((Owner of (Matching unit)) is an ally of Player 2 (Blue)) Equal to True)))) Equal to 0
Collapse Then - Actions
Collapse Player Group - Pick every player in (All allies of Player 2 (Blue)) and do (Actions)
Collapse Loop - Actions
Game - Defeat (Picked player) with the message: Defeat!
Else - Actions
Collapse DefeatRed
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Dying unit) is A structure) Equal to True
Collapse Actions
Wait 2.50 seconds
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of units in (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to True) and (((Owner of (Matching unit)) is an ally of Player 1 (Red)) Equal to True)))) Equal to 0
Collapse Then - Actions
Collapse Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
Collapse Loop - Actions
Game - Defeat (Picked player) with the message: Defeat!
Else - Actions
Collapse Tiny Temple of Tides
Collapse Events
Unit - A unit Acquires an item
Collapse Conditions
(Unit-type of (Hero manipulating item)) Equal to Naga Sea Witch
(Item-type of (Item being manipulated)) Equal to Tiny Great Hall
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Owner of (Hero manipulating item)) Equal to Player 1 (Red)
NagaRed Equal to True
Collapse Then - Actions
Hero - Create Tiny Great Hall and give it to (Hero manipulating item)
Item - Remove (Item being manipulated)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Owner of (Hero manipulating item)) Equal to Player 2 (Blue)
NagaBlue Equal to True
Collapse Then - Actions
Hero - Create Tiny Great Hall and give it to (Hero manipulating item)
Item - Remove (Item being manipulated)
Else - Actions
Collapse Revert TToT
Collapse Events
Unit - A unit Loses an item
Collapse Conditions
(Item-type of (Item being manipulated)) Equal to Tiny Great Hall
Collapse Actions
Item - Create Tiny Great Hall at (Position of (Item being manipulated))
Collapse Redtimer
Collapse Events
Game - THRed becomes Equal to 0.00
Conditions
Collapse Actions
Game - Display to Player Group - Player 1 (Red) the text: TownHallMessages[RaceIntegerRed]
Countdown Timer - Start TimerRed as a One-shot timer that will expire in 120.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title You will be reveale...
Countdown Timer - Show (Last created timer window) for Player 1 (Red)
Countdown Timer - Hide (Last created timer window) for Player 2 (Blue)
Set TimerWindowRed = (Last created timer window)
Collapse Bluetimer
Collapse Events
Game - THBlue becomes Equal to 0.00
Conditions
Collapse Actions
Game - Display to Player Group - Player 2 (Blue) the text: TownHallMessages[RaceIntegerBlue]
Countdown Timer - Start TimerBlue as a One-shot timer that will expire in 120.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title You will be reveale...
Countdown Timer - Show (Last created timer window) for Player 2 (Blue)
Countdown Timer - Hide (Last created timer window) for Player 1 (Red)
Set TimerWindowBlue = (Last created timer window)
Collapse TimerNullifyBlue
Collapse Events
Unit - A unit Begins construction
Collapse Conditions
(Owner of (Constructing structure)) Equal to Player 2 (Blue)
((Constructing structure) is A town-hall-type unit) Equal to True
Collapse Actions
Game - Display to Player Group - Player 2 (Blue) the text: TownHallMessages[5]
Countdown Timer - Pause TimerBlue
Countdown Timer - Destroy TimerWindowBlue
Collapse TimerNullifyRed
Collapse Events
Unit - A unit Begins construction
Collapse Conditions
(Owner of (Constructing structure)) Equal to Player 2 (Blue)
((Constructing structure) is A town-hall-type unit) Equal to True
Collapse Actions
Game - Display to Player Group - Player 2 (Blue) the text: TownHallMessages[5]
Countdown Timer - Pause TimerBlue
Countdown Timer - Destroy TimerWindowBlue
Collapse RevealEndBlue
Collapse Events
Unit - A unit Begins construction
Collapse Conditions
((Constructing structure) is A town-hall-type unit) Equal to True
(Owner of (Constructing structure)) Equal to Player 2 (Blue)
Collapse Actions
Collapse Player Group - Pick every player in (All enemies of Player 2 (Blue)) and do (Actions)
Collapse Loop - Actions
Player - For Player 2 (Blue), turn Shared vision Off toward (Picked player)
Game - Display to Player Group - Player 2 (Blue) the text: TownHallMessages[6]
Collapse RevealEndRed
Collapse Events
Unit - A unit Begins construction
Collapse Conditions
((Constructing structure) is A town-hall-type unit) Equal to True
(Owner of (Constructing structure)) Equal to Player 2 (Blue)
Collapse Actions
Collapse Player Group - Pick every player in (All enemies of Player 2 (Blue)) and do (Actions)
Collapse Loop - Actions
Player - For Player 2 (Blue), turn Shared vision Off toward (Picked player)
Game - Display to Player Group - Player 2 (Blue) the text: TownHallMessages[6]
Collapse RevealBlue
Collapse Events
Time - TimerBlue expires
Conditions
Collapse Actions
Countdown Timer - Pause TimerBlue
Countdown Timer - Destroy TimerWindowBlue
Game - Display to (All enemies of Player 2 (Blue)) the text: (Revealing + (Name of Player 2 (Blue)))
Collapse Player Group - Pick every player in (All enemies of Player 2 (Blue)) and do (Actions)
Collapse Loop - Actions
Player - For Player 2 (Blue), turn Shared vision On toward (Picked player)
Collapse RevealRed
Collapse Events
Time - TimerRed expires
Conditions
Collapse Actions
Countdown Timer - Pause TimerRed
Countdown Timer - Destroy TimerWindowRed
Game - Display to (All enemies of Player 1 (Red)) the text: (Revealing + (Name of Player 1 (Red)))
Collapse Player Group - Pick every player in (All enemies of Player 1 (Red)) and do (Actions)
Collapse Loop - Actions
Player - For Player 1 (Red), turn Shared vision On toward (Picked player)
And I also have working Town Hall variables and triggers.
10-06-2010, 09:28 AM#2
Tot
where's your problem?
what do you want?

Tipp


Trigger:
Collapse Player Group - Pick every player in Player Group - Player 2 (Blue) and do (Actions)
Collapse Loop - Actions
Melee Game - Create (Race of (Picked player)) starting units for (Picked player) at ((Picked player) start location) (Include Heroes)
unoptimal, skip the loop

10-06-2010, 12:38 PM#3
Anitarf
The Custom Race System can handle all of that, I strongly encourage you to try it out. Other than that, I can't really help you unless you provide more information as Tot said.
10-06-2010, 08:26 PM#4
Viktory
Oops...
Okay, Defeat doesn't work.
Initialisation is fine, Town Hall Reveal is fine, but it doesn't Defeat players for some reason

Oh, I also forgot to say that I use an unmodified WE.
Thus the CRS won't work for me. (sadly)
10-07-2010, 08:49 AM#5
Tot
Quote:
Originally Posted by Viktory
Oops...
Okay, Defeat doesn't work.
Initialisation is fine, Town Hall Reveal is fine, but it doesn't Defeat players for some reason

Oh, I also forgot to say that I use an unmodified WE.
Thus the CRS won't work for me. (sadly)

use jngp and newest jasshelper...

Trigger:
Collapse DefeatBlue
Collapse Events
Unit - A unit Cancels construction
Unit - A unit Dies
Collapse Conditions
((Dying unit) is A structure) Equal to True
Collapse Actions
Wait 2.50 seconds
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of units in (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to True) and (((Owner of (Matching unit)) is an ally of Player 2 (Blue)) Equal to True)))) Equal to 0
Collapse Then - Actions
Collapse Player Group - Pick every player in (All allies of Player 2 (Blue)) and do (Actions)
Collapse Loop - Actions
Game - Defeat (Picked player) with the message: Defeat!
Else - Actions

try

Trigger:
Collapse DefeatBlue
Collapse Events
Unit - A unit Cancels construction
Unit - A unit Dies
Collapse Conditions
Collapse Or
((Dying unit) is A structure) Equal to True
((Canceled unit) is A structure) Equal to True
Collapse Actions
Wait 2.50 seconds
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of units in (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to True) and (((Owner of (Matching unit)) is an ally of Player 2 (Blue)) Equal to True)))) Equal to 0
Collapse Then - Actions
Collapse Player Group - Pick every player in (All allies of Player 2 (Blue)) and do
Else - Actions

if it still doesn't work add some debug messages like "DefeatBlue fired" as first action to your trigger an see if it's shown ingame. if not your events aren't firing or your conditions are bad, else your actions are buggy