Forum

> > CS2D > Scripts > Domination point spawn?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Domination point spawn?

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Domination point spawn?

Louie
User Off Offline

Zitieren
So when a player captures a Domination point then that player's team can spawn near that Domination point and also some turrets and walls will spawn around that domination point(the owner will be the capturing player,or the team of the player),how do i do those things?
EDIT:I tried this,when i captured a domination point it spawns a turret but i want it to spawn near the domination point.
1
2
3
4
5
6
addhook("dominate","a")
function a(id,team,x,y)
local turretX = 5
local turretY = 5
parse("spawnobject 8 "..turretX.." "..turretY.." 0 0 "..team.." "..id)
end
i want a few turrets and some walls to spawn on the Domination point,but i dont know how to do that anyone can help?
5× editiert, zuletzt 01.01.15 05:24:56

alt Re: Domination point spawn?

Joni And Friends
User Off Offline

Zitieren
This for spawn 1 object near flag dominate
1
2
3
4
5
6
7
8
9
addhook("dominate","a")
function a(id,team,x,y)
p={-1,1}
local turretX=(x+(p[math.random(1,#p)]))
local turretY=(y+(p[math.random(1,#p)]))
        if tile(turretX,turretY,"walkable") then
             parse("spawnobject 8 "..turretX.." "..turretY.." 0 0 "..team.." "..id)
        end
end
This for spawn multiple object near flag dominate
1
2
3
4
5
6
7
8
9
10
11
addhook("dominate","a")
function a(id,team,x,y)
p={{-1,1},{1,-1},{1,1},{-1,-1}}
     for i=1,#p do
          local turretX=x+p[i][1]
          local turretY=y+p[i][2]
        if tile(turretX,turretY,"walkable") then
             parse("spawnobject 8 "..turretX.." "..turretY.." 0 0 "..team.." "..id)
        end
     end
end
3× editiert, zuletzt 02.01.15 08:15:01

alt Re: Domination point spawn?

Louie
User Off Offline

Zitieren
Thank you very much you have helped me alot,now i will use this in my map
EDIT: tho,how do i do more buildings will spawn in a specific domination point? and how do i delay the spawn of the buildings for like 3s?Ah nevermind the delay thing i found it out by my self
3× editiert, zuletzt 02.01.15 10:06:00
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht