Forum

> > CS2D > Scripts > check for doors and lasers
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch check for doors and lasers

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt check for doors and lasers

khaled1968
User Off Offline

Zitieren
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 ?

alt Re: check for doors and lasers

Mora
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht