Forum

> > CS2D > Maps/Editor > trigger_if weapons striping
Forums overviewCS2D overview Maps/Editor overviewLog in to reply

English trigger_if weapons striping

3 replies
To the start Previous 1 Next To the start

old trigger_if weapons striping

crazy junkman Wolfgang
User Off Offline

Quote
I searched for similar thread but didnt find anything...
     I want to know if there is some form of trigger_if that one could use to disarm player?
What i mean is this: you walk around map, everything is cool, you step on trigger_move (which is conected to trigger_if) and boom, you have no weapon.

Is this even posible? If it is, what do i need to write in trigger_if?

old Re: trigger_if weapons striping

_oops
User Off Offline

Quote
thread cs2d Teleporting Players with Trigger_If


DC has written
cs2d entity trigger_if is designed to be used for simple conditions / evaluations. It's not designed to run complex Lua scripts or scripts which actually do something. That's why it is called trigger_if and not trigger_lua or whatever. That's also why the text box is so small.


also you can't make it by using Trigger_if, here is reason
DC has written
cs2d entity trigger_if doesn't know who used the cs2d entity trigger_use! That's a big problem because we need that info!

You can just write script for it
1
2
3
4
5
6
7
8
9
10
11
12
MX = 1 -- write Trigger_move's x coordinate
MY = 2 -- write Trigger_move's y coordinate

addhook("movetile","cleanbutt")
function cleanbutt(id,x,y)
	if ( x == MX and y == MY ) then 
	parse("explosion "..(x*32+16).." "..(y*32+16).." 100 0")
		for _,w in pairs(playerweapons(id)) do
		parse("strip "..id.." "..w)
		end
	end
end
To the start Previous 1 Next To the start
Log in to reply Maps/Editor overviewCS2D overviewForums overview