Game Start

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

Moderator: Cheaters

User avatar
qweasd011
Forum Addict
Posts: 451
Joined: November 21st, 2008, 9:36 am
Title: Coleen!

Game Start

Post by qweasd011 »

Im new to GUI So Arad or pro's could you teach me how to create a trigger like
If the game started the game will check the ingame players then create a hero on a certain region
like that!
Image
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Game Start

Post by Arabidnun »

Code: Select all

Untitled Trigger 001
    Events
        Map initialization
    Conditions
    Actions
        Set Region[1] = Region 000 <gen>(red's Starting position)
        Set Region[2] = Region 001 <gen>(blue's)
        Set Region[3] = Region 002 <gen>(teal's)
        Set Region[4] = Region 003 <gen>(purple's)
        ....Continue for each player......
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Player((Integer A))) controller) Equal to User
                        ((Player((Integer A))) slot status) Equal to Is playing
                    Then - Actions
                        Unit - Create 1 Footman for (Player((Integer A))) at (Center of Region[(Integer A)]) facing Default building facing degrees
                    Else - Actions
Only thing you need to do is set Region(array) variable = a region before hand, and set how many players you want to do this for.

For each (Integer A) from 1 to 4(1 as in red, 12 as in brown, and so forth in between)
User avatar
qweasd011
Forum Addict
Posts: 451
Joined: November 21st, 2008, 9:36 am
Title: Coleen!

Re: Game Start

Post by qweasd011 »

Arabidnun wrote:

Code: Select all

Untitled Trigger 001
        Set Region[1] = Region 000 <gen>(red's Starting position)
[/quote]

Variable??? what kind?? of variable? Like this?

Create variable
Name - Type

Region - Integer?
Image
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Game Start

Post by Arabidnun »

The Region variable is a Region variable, array.

You create the region on the map itself first of the starting hero point for the player, and then set each region to the players region.

AKA Reds starting region is = Region[1]
User avatar
qweasd011
Forum Addict
Posts: 451
Joined: November 21st, 2008, 9:36 am
Title: Coleen!

Re: Game Start

Post by qweasd011 »

Okay i've got it but mine does'nt work my map keeps spawn even i have 1 computer player
and can you teach me how to create some floating texts you could fix my game start trigger please (IT SPAWNS ALL THE PLAYERS EVEN I ONLY HAVE 1 ENEMY)

EDIT: Hey NVM Thx for helping me now i will create a Dota like game can you help me and tell all the triggers needed (names first)
Image