Forum

> > CS2D > Maps/Editor > Strip weapon gate
ForenübersichtCS2D-Übersicht Maps/Editor-ÜbersichtEinloggen, um zu antworten

Englisch Strip weapon gate

11 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: Strip weapon gate

_3yrus
User Off Offline

Zitieren
user Jededias hat geschrieben
user _3yrus hat geschrieben
@user Jededias: you know lua ?

I see one strip area script in the forum. but i want do it in map editor, without the script

you need to know lua if u want to do it through map editor !

alt Re: Strip weapon gate

Cure Pikachu
User Off Offline

Zitieren
@user Jededias: user _3yrus is right, you know. flame You actually need scripting experience to pull it off, as the map itself doesn't know who triggered any entity (Even the cs2d lua hook trigger hook doesn't either).
This is coming from a veteran, don't complain.

alt Re: Strip weapon gate

Vehk
User Off Offline

Zitieren
This script should (haven't tested it) let you define strip gates with the map editor by using Info_TeamGate entities. Copy the script to maps/<map name>.lua to have it automatically loaded.

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.

Mehr >

alt Re: Strip weapon gate

Cure Pikachu
User Off Offline

Zitieren
@user 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
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
Good luck telling user Jededias that it can't be done any other way.

alt Re: Strip weapon gate

_3yrus
User Off Offline

Zitieren
user Jededias hat geschrieben
If 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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Maps/Editor-ÜbersichtCS2D-ÜbersichtForenübersicht