Forum

> > CS2D > Scripts > Simple ctf mod request.
Forums overviewCS2D overview Scripts overviewLog in to reply

English Simple ctf mod request.

2 replies
To the start Previous 1 Next To the start

old Simple ctf mod request.

Chex
User Off Offline

Quote
I realized in my ventures to make reversed ctf maps that a major problem would be someone taking the flag and camping with it so that the capping of the flag doesn't work, so I have a request to stop that.

I used to be decent at lua, and the basic gist is that I want X team to win when they get their flag to Y team's flag point, even if the flag isn't there. HALP!

old Re: Simple ctf mod request.

Blighted Song
User Off Offline

Quote
This isn't that difficult, just check for the flag on a player and the tile type.

1
2
3
4
5
6
7
8
9
10
addhook("movetile","CapFlag")
function CapFlag(id,tilex,tiley)
	if(player(id,"flag") == true) then
		if(entity(tilex,tiley,"type") == 15) then
			if(entity(tilex,tiley,"var0") ~= player(id,"team")) then
				parse("sv_restart 0");
			end
		end
	end
end

Ok, this works if you want to take your enemy's flag to your enemy's base, I might fix it to go either way later.
edited 4×, last 26.03.12 12:34:14 am
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview