You must be logged in to post messages.
Please login or register

AI & RM Scripting
Moderated by Leif Ericson

Hop to:    
Welcome! You are not logged in. Please Login or Register.3 replies
Age of Kings Heaven » Forums » AI & RM Scripting » notes on assign_to AT_TEAM
Bottom
Topic Subject:notes on assign_to AT_TEAM
local boi
Squire
(id: dragon14)
posted 05-08-18 03:48 AM CT (US)         
to use AT_TEAM put #const AT_TEAM 2 and direct_placement in player setup

The normal way to use it is in create_land, put the line assign_to AT_TEAM 1 0 0. This assigns a land to one player of the first team the game detects (not necessarily team 1)

For the next team, e.g. team 2, use assign_to AT_TEAM 2 0 0

Now, here's an important thing. You need to have as many create_land constructors as you have players on a team. So if you have 2 players on team 1, then you need to have two constructors using assign_to AT_TEAM 1 0 0

Which player gets placed first? Which player gets placed second? I do not know.

Does grouped_by_team work with direct_placement?

More note: the create_land constructors are read in order. If you have more constructors than players and are using assign_to AT_TEAM [1-4] 0 0...

Well, lets say you have 5 assign_to AT_TEAM commands. But you only have 4 players. The first 4 commands are used. The fifth seems to be discarded.

to randomize land position, I suggest to use the rnd(MIN,MAX) function. rnd is short for random. Do not confused rnd with md like I tend to..

land_position 0 0 starts at the left corner of the map. land_position 0 100 marks the bottom corner. so land_position 100 0 and land_position 100 100 are the top and right corners.

USA
katsup or mustard
AuthorReplies:
Chrazini
Squire
posted 05-08-18 04:25 AM CT (US)     1 / 3       
grouped_by_team does not work with direct placement. However, since you're using direct placement, you can move the spawns as close or far away from each other as you'd like. No restrictions there. You can simulate your own grouped_by_team.
Jineapple
Squire
posted 05-08-18 05:06 AM CT (US)     2 / 3       
Regarding the player order, if the second parameter after AT_TEAM is set to 0, players in the team are placed in random order.
If the parameter is set to -1, they are placed sequentially within the team (according to lobby slot, not player color)
local boi
Squire
(id: dragon14)
posted 05-11-18 04:59 PM CT (US)     3 / 3       
@chrazini: Is there a way to make team walls with direct_placement instead of grouped_by_team?

USA
katsup or mustard

[This message has been edited by local boi (edited 05-11-2018 @ 04:59 PM).]

You must be logged in to post messages.
Please login or register

Hop to:    

Age of Kings Heaven | HeavenGames