Creating a new map

sensesxfailx

New Member
Reaction score
0
Alrite i need some help with this, i want to make a map that ounce you destroy a computer player it will make another computer player with all the same starting resources at another place so its pretty much like an endless melee map with computers can someone plz help me!!
 
Just make an event that detects when a player is defeated and removes all of his units before creating a new tow hall at a random position.
 
OK! I got a trigger for it!
Computers
Events
Player - Player 2 (Blue) leaves the game with a defeat
Conditions
Actions

Melee Game - Create Human starting units for Player 2 (Blue) at ((Picked player) start location) (Exclude Heroes)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Matching player) Equal to Player 2 (Blue)
Then - Actions
Player - Set Player 2 (Blue) Current gold to 500
Player - Set Player 2 (Blue) Current lumber to 150
Else - Actions
Do nothing
I think this works!
 
ok lets see...
silver-crick said:
Computers
Events
Player - Player 2 (Blue) leaves the game with a defeat
Conditions
Actions

Melee Game - Create Human starting units for Player 2 (Blue) at ((Picked player) start location) (Exclude Heroes)
there is no picked player here. use player 2 or triggering player
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Matching player) Equal to Player 2 (Blue)
there is no matching player here. as a matter of fact you dont need the if..then statement at all since you only have 1 event.
Then - Actions
Player - Set Player 2 (Blue) Current gold to 500
Player - Set Player 2 (Blue) Current lumber to 150
Else - Actions
Do nothing
you dont need this action, it already does nothing.
 
LOL WOW! Thanks SFilip... And I thought you were cool. :p The trigger is still gonna work.
 
Also it created the computer at the same exact spot which wont work can i make it so it creates it at another location
 
Another random location or in a random region?
 
Here's some pseudocode for yah:
Code:
Computer Defeat
    Events
        Player - Player 1 leaves the game with a defeat
        Player - Player 2 leaves the game with a defeat
        Player - Player 3 leaves the game with a defeat
        Player - Player 4 leaves the game with a defeat
        Player - Player 5 leaves the game with a defeat
        ...etc.
    Conditions
        ((Triggering Player) is controlled by a computer) equal to (True)
    Actions
        Set (PlayerRemake) = (Triggering Player)
        Set (PlayerRemake) gold to ([b]starting gold[/b])
        Set (PlayerRemake) lumber to ([b]starting lumber[/b])
        Run (Create Mine)
Code:
Create Mine
    Events
    Conditions
    Actions
        Set (Region) = (region at (random point) sized ([B]size of a gold mine[/B])
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Region) contains (anything) equal to False    //Not sure how you would do this, but I'm sure it's possible. Maybe just have a seperate condition for each type of thing (unit, destructible, cliff, water, etc.)
            Then - Actions
                Create a (Gold Mine) at (center of (Region))
                Set (GoldMine) = (Last Created Unit)
                Run (Create Hall)
            Else - Actions
                Run (This Trigger)
Code:
Create Hall
    Events
    Conditions
    Actions
        For Loop (Integer A) From (0) to (7) Do -
            Loop - (Actions)
                Set (Region) = (Point ([B]distance a hall needs to be to mine gold plus some safety distance[/B]) from (GoldMine) at ((Integer A) * (45)) degrees with size ([b]size a hall takes up[/b]).
                    If - Conditions
                        (Region) contains (anything) equal to False    //Not sure how you would do this, but I'm sure it's possible. Maybe just have a seperate condition for each type of thing (unit, destructible, cliff, water, etc.)
                    Then - Actions
                        Create Starting Units at (center of (Region)) for player (PlayerRemake)
                        (Skip Remaining Actions)
                    Else - Actions
        Run (Create Mine)
 
random race...hmmm
something like
Code:
set integer = random integer from 1 to 4
if integer = 1 then
create human starting units for...
if integer = 2 then
create orc starting units for...
if integer = 3 then
create night elf starting units for...
if integer = 4 then
create undead starting units for...
oh and since you said its a melee map...wouldn't it be easier if you simply add all gold mines to a group, pick one random and create the starting units next to it?
now in that case you would probably also have to make the gold in them very high (or infinite).
also there is one more problem. i am not sure how will the ai "accept" his new units. usually if he gets defeated the ai just wont do anything (if he has a worker for example, he wont use it to recreate his base).
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top