Military group

» Siedler Map Source Forum » Siedler DEdK Script Forum » Military group

Seiten: 1

SH
#1
09.09.2018 21:23
Beiträge: 127

Military group

Is there a function like CreateMilitaryGroup that returns the group id? I mean, as it is from CreateEntity
(Like id = Logic.CreateEntity(...), but with military group).

____________________
Sorry for my German

Qba331PL
#2
09.09.2018 21:50
Beiträge: 102

I use this function:

local pos = GetPosition("pos1")
local t = {Logic.GetPlayerEntitiesInArea(3, Entities.PU_LeaderSword3, pos.X, pos.Y, 5000, 2)} -- max amount is 16, returns numberOfIds, id1, id2...
-- You just chose which units you want to take (for ex. Entities.PU_LeaderSword3)

table.remove(t, 1) 
for _,id in ipairs(t) do
   ChangePlayer(id, 1) -- you can use it to change player, move, etc.
return false
end
end

mcb
#3
09.09.2018 23:58
Beiträge: 1472

Just use Logic.CreateEntity and add the soldiers with Tools.CreateSoldiersForLeader(_LeaderID,_SoldierAmount) .

SH
#4
10.09.2018 16:20
Beiträge: 127

Thank you

____________________
Sorry for my German

Seiten: 1

SiteEngine v1.5.0 by nevermind, ©2005-2007
Design by SpiderFive (www.siedler-games.de) - English translation by juja

Impressum