Tobias's Map Help

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

Tobias
Senior Member
Posts: 108
Joined: March 18th, 2008, 3:42 pm
Title: Map Maker
Location: Canadadadada

Tobias's Map Help

Post by Tobias »

I am making a map and I am going to have lots of questions, mods please don't delete this!

Human Spawn

Before:
Spoiler:

Code: Select all

Humans Spawn
    Events
        Map initialization
    Conditions
    Actions
        If ((Player 1 (Red) slot status) Equal to Is playing) then do (Unit - Create 1 Humans for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees) else do (Do nothing)
        If ((Player 2 (Blue) slot status) Equal to Is playing) then do (Unit - Create 1 Humans for Player 2 (Blue) at (Center of (Playable map area)) facing Default building facing degrees) else do (Do nothing)
        If ((Player 3 (Teal) slot status) Equal to Is playing) then do (Unit - Create 1 Humans for Player 3 (Teal) at (Center of (Playable map area)) facing Default building facing degrees) else do (Do nothing)
        If ((Player 4 (Purple) slot status) Equal to Is playing) then do (Unit - Create 1 Humans for Player 4 (Purple) at (Center of (Playable map area)) facing Default building facing degrees) else do (Do nothing)
        If ((Player 5 (Yellow) slot status) Equal to Is playing) then do (Unit - Create 1 Humans for Player 5 (Yellow) at (Center of (Playable map area)) facing Default building facing degrees) else do (Do nothing)
        If ((Player 6 (Orange) slot status) Equal to Is playing) then do (Unit - Create 1 Humans for Player 6 (Orange) at (Center of (Playable map area)) facing Default building facing degrees) else do (Do nothing)
        If ((Player 7 (Green) slot status) Equal to Is playing) then do (Unit - Create 1 Humans for Player 7 (Green) at (Center of (Playable map area)) facing Default building facing degrees) else do (Do nothing)
        If ((Player 8 (Pink) slot status) Equal to Is playing) then do (Unit - Create 1 Humans for Player 8 (Pink) at (Center of (Playable map area)) facing Default building facing degrees) else do (Do nothing)
        If ((Player 9 (Gray) slot status) Equal to Is playing) then do (Unit - Create 1 Humans for Player 9 (Gray) at (Center of (Playable map area)) facing Default building facing degrees) else do (Do nothing)
        If ((Player 10 (Light Blue) slot status) Equal to Is playing) then do (Unit - Create 1 Humans for Player 10 (Light Blue) at (Center of (Playable map area)) facing Default building facing degrees) else do (Do nothing)
        Unit Group - Add (Triggering unit) to HumanGroup[10]
After:
Spoiler:

Code: Select all

Humans Spawn
    Events
        Map initialization
    Conditions
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Player((Integer A))) slot status) Equal to Is playing
                        ((Player((Integer A))) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Humans for (Player((Integer A))) at (Center of (Playable map area)) facing Default building facing degrees
                        Unit Group - Add (Last created unit) to HumanGroup[10]
                    Else - Actions
                        Trigger - Run Human Skins <gen> (checking conditions)
Human skin trigger!
Before
Spoiler:

Code: Select all

Human
    Events
        Unit - A unit enters (Entire map)
    Conditions
        (Unit-type of (Triggering unit)) Equal to Humans
    Actions
        Game - Display to (All players) for 5.00 seconds the text: An admin has entere...
        Wait 5.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Name of (Triggering player)) Equal to Vampiric.Tobias
            Then - Actions
                Unit - Create 1 Vampiric.Tobias for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
                Unit Group - Add (Triggering unit) to HumanGroup[10]
            Else - Actions
                Do nothing
After
Spoiler:

Code: Select all

Human Skins
    Events
    Conditions
    Actions
        Unit Group - Pick every unit in HumanGroup[10] and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Name of (Owner of (Picked unit))) Equal to Vampiric.Tobias
                    Then - Actions
                        Unit - Replace (Picked unit) with a Vampiric.Tobias using The old unit's relative life and mana
                    Else - Actions


Props to Arabidnun for the triggers!
Last edited by Tobias on October 20th, 2008, 11:58 pm, edited 4 times in total.
User avatar
Xantan
Honorary wc3edit.net Traitor
Posts: 2507
Joined: February 1st, 2007, 4:11 pm
Location: NEVADA

Re: Trigger help

Post by Xantan »

1st trigger can be simplified

Pick every player in all players matching player is not a computer and player slot status = playing
and do Create 1 human or w/e that is for picked player.

Done

2nd trigger has a bug at the bottom (add triggering unit to this) use add (last created unit)
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Trigger help

Post by Arabidnun »

Trigger one: Map initialization
Spoiler:
Map initialization
Events
Map initialization
Conditions
Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player((Integer A))) slot status) Equal to Is playing
((Player((Integer A))) controller) Equal to User
Then - Actions
Unit - Create 1 Footman for (Player((Integer A))) at (Center of (Playable map area)) facing Default building facing degrees
Unit Group - Add (Last created unit) to Humans
Else - Actions
Trigger - Run Admin Models <gen> (checking conditions)
Trigger two: Admin Models
Spoiler:
Admin Models
Events
Conditions
Actions
Unit Group - Pick every unit in Humans and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Name of (Owner of (Picked unit))) Equal to Arabidnun
Then - Actions
Unit - Replace (Picked unit) with a Knight using The old unit's relative life and mana
Else - Actions
Tobias
Senior Member
Posts: 108
Joined: March 18th, 2008, 3:42 pm
Title: Map Maker
Location: Canadadadada

Re: Tobias's Map Help

Post by Tobias »

Okay, so I am trying to make a -kick trigger using Arabidnuns host system thing

trigger so far
Spoiler:

Code: Select all

Kick
    Events
        Player - Player 1 (Red) types a chat message containing -kick as A substring
        Player - Player 2 (Blue) types a chat message containing -kick as A substring
        Player - Player 3 (Teal) types a chat message containing -kick as A substring
        Player - Player 4 (Purple) types a chat message containing -kick as A substring
        Player - Player 5 (Yellow) types a chat message containing -kick as A substring
        Player - Player 6 (Orange) types a chat message containing -kick as A substring
        Player - Player 7 (Green) types a chat message containing -kick as A substring
        Player - Player 8 (Pink) types a chat message containing -kick as A substring
        Player - Player 9 (Gray) types a chat message containing -kick as A substring
        Player - Player 10 (Light Blue) types a chat message containing -kick as A substring
    Conditions
        (Triggering player) Equal to Host
        (Substring((Entered chat string), 1, 5)) Equal to -kick
    Actions
I want to kick using colors >.>

Help!
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Tobias's Map Help

Post by Arabidnun »

Try this:

Kick Trigger: host
Spoiler:

Code: Select all

Untitled Trigger 001
    Events
        Player - Player 1 (Red) types a chat message containing -kick as A substring
        Player - Player 2 (Blue) types a chat message containing -kick as A substring
        Player - Player 3 (Teal) types a chat message containing -kick as A substring
        Player - Player 4 (Purple) types a chat message containing -kick as A substring
        Player - Player 5 (Yellow) types a chat message containing -kick as A substring
        Player - Player 6 (Orange) types a chat message containing -kick as A substring
        Player - Player 7 (Green) types a chat message containing -kick as A substring
        Player - Player 8 (Pink) types a chat message containing -kick as A substring
        Player - Player 9 (Gray) types a chat message containing -kick as A substring
        Player - Player 10 (Light Blue) types a chat message containing -kick as A substring
        Player - Player 11 (Dark Green) types a chat message containing -kick as A substring
        Player - Player 12 (Brown) types a chat message containing -kick as A substring
    Conditions
        (Substring((Entered chat string), 1, 5)) Equal to -kick
        (Triggering player) Equal to Host
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Substring((Entered chat string), 7, 20)) Equal to blue
            Then - Actions
                Game - Defeat Player 2 (Blue) with the message: (You've Been Booted, Compliments Of:  + Player_Names[(Player number of (Triggering player))])
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Substring((Entered chat string), 7, 20)) Equal to teal
            Then - Actions
                Game - Defeat Player 3 (Teal) with the message: (You've Been Booted, Compliments Of:  + Player_Names[(Player number of (Triggering player))])
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Substring((Entered chat string), 7, 20)) Equal to purple
            Then - Actions
                Game - Defeat Player 4 (Purple) with the message: (You've Been Booted, Compliments Of:  + Player_Names[(Player number of (Triggering player))])
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Substring((Entered chat string), 7, 20)) Equal to yellow
            Then - Actions
                Game - Defeat Player 5 (Yellow) with the message: (You've Been Booted, Compliments Of:  + Player_Names[(Player number of (Triggering player))])
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Substring((Entered chat string), 7, 20)) Equal to orange
            Then - Actions
                Game - Defeat Player 6 (Orange) with the message: (You've Been Booted, Compliments Of:  + Player_Names[(Player number of (Triggering player))])
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Substring((Entered chat string), 7, 20)) Equal to pink
            Then - Actions
                Game - Defeat Player 8 (Pink) with the message: (You've Been Booted, Compliments Of:  + Player_Names[(Player number of (Triggering player))])
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Substring((Entered chat string), 7, 20)) Equal to gray
            Then - Actions
                Game - Defeat Player 9 (Gray) with the message: (You've Been Booted, Compliments Of:  + Player_Names[(Player number of (Triggering player))])
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Substring((Entered chat string), 7, 20)) Equal to light blue
            Then - Actions
                Game - Defeat Player 10 (Light Blue) with the message: (You've Been Booted, Compliments Of:  + Player_Names[(Player number of (Triggering player))])
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Substring((Entered chat string), 7, 20)) Equal to dark green
            Then - Actions
                Game - Defeat Player 11 (Dark Green) with the message: (You've Been Booted, Compliments Of:  + Player_Names[(Player number of (Triggering player))])
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Substring((Entered chat string), 7, 20)) Equal to brown
            Then - Actions
                Game - Defeat Player 12 (Brown) with the message: (You've Been Booted, Compliments Of:  + Player_Names[(Player number of (Triggering player))])
            Else - Actions
Tobias
Senior Member
Posts: 108
Joined: March 18th, 2008, 3:42 pm
Title: Map Maker
Location: Canadadadada

Re: Tobias's Map Help

Post by Tobias »

2 new triggers wewt.

Stop Attack!
Spoiler:

Code: Select all

HumanvsHuman
    Events
        Unit - A unit Is attacked
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Issued order) Equal to (Order(attack))) and ((((Attacked unit) is in HumanGroup) Equal to True) and (((Attacking unit) is in HumanGroup) Equal to True))
            Then - Actions
                Unit - Order (Attacking unit) to Stop
            Else - Actions

Slayers Leveling
Spoiler:

Code: Select all

LevelSlayer
    Events
        Time - Every 60.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in Slayer Level Up Point <gen>) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of (Picked unit)) Equal to Slayer
                    Then - Actions
                        Hero - Set (Picked unit) Hero-level to ((Hero level of (Picked unit)) + 1), Hide level-up graphics
                    Else - Actions
Thanks.
Also The level cap is 100 ;)
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Tobias's Map Help

Post by Arabidnun »

Prevent Human Attacking Vampire
Spoiler:

Code: Select all

Human Attack
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to Footman
        ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
    Actions
        Unit - Order (Attacking unit) to Stop

Prevent Tk(Team kill)
Spoiler:

Code: Select all

Prevent Tk
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacking unit) belongs to an ally of (Owner of (Attacked unit))) Equal to True
    Actions
        Unit - Order (Attacking unit) to Stop
Slayer Level Up(Seems the same)
Spoiler:

Code: Select all

Level Up
    Events
        Time - Every 10.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of (Picked unit)) Equal to Blood Mage
                    Then - Actions
                        Hero - Set (Picked unit) Hero-level to ((Hero level of (Picked unit)) + 1), Hide level-up graphics
                    Else - Actions
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: Tobias's Map Help

Post by Bartimaeus »

I believe there's a more efficient way to do the no TK thing, but it's only in JASS. It's like, UnitIssuedOrder,"Attack", or something, and then you do the checks, and if it's on an ally, you tell it to stop.

But, like I said, in JASS.
Tobias
Senior Member
Posts: 108
Joined: March 18th, 2008, 3:42 pm
Title: Map Maker
Location: Canadadadada

Re: Tobias's Map Help

Post by Tobias »

Spoiler:

Code: Select all

Vamp Spawn Timer
    Events
        Time - Elapsed game time is 0.20 seconds
    Conditions
    Actions
        Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 59.80 seconds
        Countdown Timer - Create a timer window for (Last started timer) with title Vampire Spawn
        Wait 59.00 game-time seconds
        Countdown Timer - Destroy (Last created timer window)
Spoiler:

Code: Select all

fifteen min timer
    Events
        Time - Elapsed game time is 0.10 seconds
    Conditions
    Actions
        Countdown Timer - Start (Last started timer) as a Repeating timer that will expire in 899.90 seconds
        Countdown Timer - Create a timer window for (Last started timer) with title 15 Minute Gold


Okay, so both timers are created but the 15 minute one is 59.8 seconds not 899.9 HELP MEEEE
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Tobias's Map Help

Post by Arabidnun »

You jew....Why don't you come to me first...lol
HERE!! Change the times to whatever you want.
Spoiler:

Code: Select all

Timer
    Events
        Time - Elapsed game time is 0.20 seconds
    Conditions
    Actions
        Countdown Timer - Create a timer window for Repeat_Timer with title Vampire Spawn:
        Set Timer_Window = (Last created timer window)
        Countdown Timer - Start Repeat_Timer as a One-shot timer that will expire in 6.00 seconds
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Countdown Timer - Show Timer_Window for (Picked player)
        Trigger - Turn off (This trigger)
        Trigger - Turn on Repeat Timer <gen>
Spoiler:

Code: Select all

Repeat Timer
    Events
        Time - Repeat_Timer expires
    Conditions
    Actions
        Countdown Timer - Start Repeat_Timer as a Repeating timer that will expire in 10.00 seconds