Forum
CS2D General Backstabbing in CS2D?Backstabbing in CS2D?
9 replies 1
Poll
Do you want backstabbing system in CS2D?
Only registered users are allowed to vote
Yes. | 45.83% (11) | |
I don't care... | 25.00% (6) | |
No. | 29.17% (7) |
24 votes cast
yes it is possible with Lua and there are already scripts for that.
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("hit","backstab") function backstab(id,s,w) if w==50 and player(id,"rot")>=player(s,"rot")-90 and player(id,"rot")<=player(s,"rot")+90 and player(id,"team")~=player(s,"team") then 		parse("customkill "..s.." BACKSTAB "..id) 		return 1 	end end
EDIT: ninjas without lua =/
EDIT 2: Oh, and you get to weaponless state if you don't write "return 1"
mat5b has written
Yes, I was able to simulate such thing in Lua.
EDIT: ninjas without lua =/
EDIT 2: Oh, and you get to weaponless state if you don't write "return 1"
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("hit","backstab") function backstab(id,s,w) if w==50 and player(id,"rot")>=player(s,"rot")-90 and player(id,"rot")<=player(s,"rot")+90 and player(id,"team")~=player(s,"team") then 		parse("customkill "..s.." BACKSTAB "..id) 		return 1 	end end
EDIT: ninjas without lua =/
EDIT 2: Oh, and you get to weaponless state if you don't write "return 1"
Eww that code is awful.
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
function hit(plr,splr,weapon,health,armour) 	if weapon == 50 then 		local plDir = player(plr,"rot") 		local splDir = player(splr,"rot") 		if math.abs(plDir-splDir) < 90 or math.abs(plDir-splDir) > 290 then 			parse("customkill "..splr.." Backstabbed "..plr) 			parse("killplayer "..plr) 			--return 0 		end 	end end addhook("hit","hit")
Never forget to tab, kids!
Flacko has written
You can't really back-stab someone in a top-down 2D game since there isn't any "behind" unless you're playing with FOW.
Agreed. Also, not many people prefer to play with Fog of War so theres not much point on the whole 'backstabbing' idea.
Shanghaimi -Chet- Chen has written
Perhaps the Reason for a Backstab Script was That the OP wanted to Face-chain-stab Everybody
Oh look a TF2 spy pro.
Naw seriously, Backstabbing in Cs2d isn't a good idea, because there are rarely any servers with FOW online.
Which is actually pretty sad.
Leiche has written
Oh look a TF2 spy pro.
Naw seriously, Backstabbing in Cs2d isn't a good idea, because there are rarely any servers with FOW online.
Which is actually pretty sad.
All competetive matches such as mixteams, clanwars, league matches, are played with FoW, most skilled players play with FoW. you are only seeing public servers, with $16000, designed for normal play.. Shanghaimi -Chet- Chen has written
Perhaps the Reason for a Backstab Script was That the OP wanted to Face-chain-stab Everybody
Oh look a TF2 spy pro.
Naw seriously, Backstabbing in Cs2d isn't a good idea, because there are rarely any servers with FOW online.
Which is actually pretty sad.
even tough, backstabbing is a bad idea. would just please the the TF2 fanboys. besides, with FoW on, there's alot more other options of tactical gameplay, you don't need things such as a "backstab".
1