Forum
Maps/Editor
Strip weapon gate
Strip weapon gate
11 replies
1

strip - command
Jededias: you know lua ? I see one strip area script in the forum. but i want do it in map editor, without the script
Jededias has writtenyou need to know lua if u want to do it through map editor !
Admin/mod comment
Watch your language buddy. /Borealis
§3.1 - No posts which offend/provoke/insult (flame)
Jededias:
_3yrus is right, you know.
You actually need scripting experience to pull it off, as the map itself doesn't know who triggered any entity (Even the
trigger hook doesn't either).This is coming from a veteran, don't complain.
To add a strip gate create an Info_TeamGate entity and name it STRIPGATE. You will want to add an entity Trigger_Start to trigger all entities named STRIPGATE (so they don't kill players).
The trigger for the strip gate will define what weapons to strip (or 0 for all). It should be a comma separated list of weapon IDs or names to strip.
The "Let Pass" field will determine if players of any team (Nobody) should be stripped or only a specific team.
Vehk: If a piece of code is only going to be run once, you can just put it like so:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
MAP = {strip = {}}
local GATENAME = "STRIPGATE"
-- load all entities
-- 20 is Info_TeamGate
for _, e in ipairs(entitylist(20)) do
	if entity(e.x, e.y, "name") == GATENAME then
		-- strip gate entity
		local g = {x = e.x, y = e.y,
		width = tonumber(entity(e.x, e.y, "int0")),
		height = tonumber(entity(e.x, e.y, "int1")),
		team = tonumber(entity(e.x, e.y, "int2")),
		strip = {}}
		-- read weapon strip list
		strip = entity(e.x, e.y, "trigger")
		for w in string.gmatch(strip, "([%a%d]+),?") do
			g.strip[#g.strip + 1] = w
		end
		MAP.strip[#MAP.strip + 1] = g
	end
end
Jededias that it can't be done any other way.
Jededias has writtenIf you don't help, don't say shit, you uploaded a piece of shit in the forum and think Is someone, you is a shit. Help or leave.
Im not gonna argu with you, one day u will learn lua and undrastand wat a shit u asked in froum.
1

Offline
