Forum

> > CS2D > Scripts > check for doors and lasers
Forums overviewCS2D overview Scripts overviewLog in to reply

English check for doors and lasers

2 replies
To the start Previous 1 Next To the start

old check for doors and lasers

khaled1968
User Off Offline

Quote
Hey, I'm making house script and I encountered some problems when player leaves...

I want to know how to check for doors and lasers if player left the server. For example: Let's say that player has a house (house[id] == 1) and that house's door tilex is 15 and tiley is 20, and when player leaves, the script checks that specific tile to see if there was a wall there or not. If there was no wall then It won't do anything, If there was a wall then it will be removed!

If that was possible which I believe it is, will it be done in the same way for lasers & team gates ?

old Re: check for doors and lasers

Mora
User Off Offline

Quote
Use @cs2d cmd triggerposition
Check with @cs2d lua cmd entity
1
2
3
4
5
if house[id] == 1 then
 if entity(15,20,'state') then
 parse('triggerposition 15 20')
 end
end
Keep in mind that false in 'state' means Visible(wall or image), true in 'state' means it closed.
The same way You can trigger lasers depending on house, but also, if Your trigger has nickname use @cs2d cmd trigger
parse('trigger laservip1')


/Write it with my phone so excuse for bad explanation
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview