Forum

> > CS2D > Scripts > How to do this script?
Forums overviewCS2D overview Scripts overviewLog in to reply

English How to do this script?

1 reply
To the start Previous 1 Next To the start

old How to do this script?

Louie
User Off Offline

Quote
So heres what i want to do:
When a player captures a domination point then a machinegun turret nearby will be in his control but if an enemy player captures the domination point then it will be in his control.How do i do that script?(iam very inexperienced in this scripting stuff

old Re: How to do this script?

Rainoth
Moderator Off Offline

Quote
A machine gun script as in a custom scripted turret or just a simple turret?

You could just do

1
2
3
4
5
6
addhook("dominate","a")
function a(id,team,x,y)
local turretX = 10
local turretY = 11
	parse("spawnobject 8 "..turretX.." "..turretY.." 0 0 "..team.." "..id)
end
That's the simplest way, there's also extra conditions if there's already a building in place. Anyways, you'll find it out urself.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview