Forum

> > CS2D > Maps/Editor > how to disapear outsid trigger doors in editor
Forums overviewCS2D overview Maps/Editor overviewLog in to reply

English how to disapear outsid trigger doors in editor

16 replies
To the start Previous 1 Next To the start

old how to disapear outsid trigger doors in editor

Persian_Arty
User Off Offline

Quote
how is it possible to disappear the outside trigger when u close the door from inside of a hause ?
im creating a map and currently ive a problem with doors! trigger stays outside after i close the doors from inside
im creating a map pls help and message me..

old Re: how to disapear outsid trigger doors in editor

Cure Pikachu
User Off Offline

Quote
Assuming both triggers are at their default active state and that the door entity is already open, what you do is make the trigger for the inside trigger not only the door itself but the outside trigger as well. That way when you close the door you disable the outside trigger as well.
edited 1×, last 07.06.21 01:17:52 pm

old Re: how to disapear outsid trigger doors in editor

Persian_Arty
User Off Offline

Quote
user Gaios has written
> youtube

serioulsly ? if i would find there i wouldnt ask here , i make doors but it wont be one way when ur in the home

user Cure Pikachu has written
Assuming both triggers are at their default active state and that the door entity is already open, what you do is make the trigger for the inside trigger not only the door itself but the outside trigger as well. That way when you close the door you disable the outside trigger as well.

thanks a lot , that was a amazinnng helppp!!!
how can i set automatic restart for game ? like every 2 hours a restart ?
and how can i restart just a part of map ? like i have a part in my map which one player can enter and if he survies the door will be again open when he exit from exit door by trigger but what if he dies in that part of map and cant make it til the end ?
edited 2×, last 07.06.21 05:16:12 pm

old Re: how to disapear outsid trigger doors in editor

Mami Tomoe
User Off Offline

Quote
@user Persian_Arty, I don't understand what "part of the map restart" means.

Restaring the game will restart the entire map, there's no way to restart a portion of the map, because that's a terrible way to approach mapping in general.

If you want something to persist after a map restart, you should use Lua or map triggers, depending on what it is, to persist it.

old Re: how to disapear outsid trigger doors in editor

Persian_Arty
User Off Offline

Quote
i meant to restart the whole map and everything inside it , ive done as uve said, it worked wonderful thanks a lot .

how is it about doors ? i want the trigger outside of homes disappears after someone closes the door from inside , how can i do that ?

old Re: how to disapear outsid trigger doors in editor

Persian_Arty
User Off Offline

Quote
ive done it but it wont work , is it possible ive done something wrong ??
im doing a happy town, and my lasts question is ive a lynux server ive uploaded that there buti dont see it in server lists , may i ask u pls to help me out ?
sorry i asked a lot

old Re: how to disapear outsid trigger doors in editor

Cure Pikachu
User Off Offline

Quote
So for example you have the inside trigger named X, a door entity (cs2d entity func_dynwall) named Y, and the outside trigger named Z.

1. Use cs2d entity trigger_start to trigger Y at the start to open the door on round start
(If you want the door closed on round start, use cs2d entity trigger_start to trigger Z instead)
2. Have X trigger Y and Z (Put
Y,Z
in the Trigger field) and Z trigger only Y

As for server issues, see if this FAQ helps you first.
edited 1×, last 09.06.21 01:07:28 am

old Re: how to disapear outsid trigger doors in editor

Persian_Arty
User Off Offline

Quote
im so happy for this great help !! i really appiciate it , i was going to give up , there was no rurorial on youtube at all, i really thank u
( it works )
___
but about lynux server after few hours being busy with it , i see it wont work for me as its written here in toturial , i need help with rnning the game and changing the map on my server to what ive created, woud u pls help me out ? if yes ill give u my contact we may be able to do a team viewer ? ill learn it also

------
an other question, how can i disapear a trigger when u push on it ? like a trap , u enter a room and push a trigger to open a door, suddenly the door will be open, an other door behind of u will be closed and the trigger u have pushed is gone so u cant push it again and exit door is locked , ive tried it different ways but it wont work as i want
edited 3×, last 09.06.21 02:39:42 pm

old Re: how to disapear outsid trigger doors in editor

Mami Tomoe
User Off Offline

Quote
user Persian_Arty has written
question, how can i disapear a trigger when u push on it ? like a trap , u enter a room and push a trigger to open a door, suddenly the door will be open, an other door behind of u will be closed and the trigger u have pushed is gone so u cant push it again and exit door is locked , ive tried it different ways but it wont work as i want


cs2d entity trigger_move gets triggered when someone walks over the tile it was placed on.

There's other trigger types, take a look at them!
https://cs2d.com/entities.php

old Re: how to disapear outsid trigger doors in editor

Persian_Arty
User Off Offline

Quote
thanks a lot , my other questions anyone has answer ? ive made the map now i dont know how to run it online

how can i see X and y in the game ? im writing in consule setpos player x and y but it wont bring me to the right position, maybe anyoe tell me how to find the right x and y ?
edited 1×, last 09.06.21 07:39:39 pm

old Re: how to disapear outsid trigger doors in editor

Mami Tomoe
User Off Offline

Quote
@user Persian_Arty:

In the console:

Pixel position:
lua print(player(1,'x'),player(1,'y'))


Tile position:
lua print(player(1,'tilex'),player(1,'tiley'))


You can also create a script to do that for you, but that's more complex.

P.S.: This is assuming you're player ID 1 (check besides your name in TAB), if you aren't; change the number 1 in the examples above (it occurs twice in each one).

old Re: how to disapear outsid trigger doors in editor

Persian_Arty
User Off Offline

Quote
thanks a lot , it worked!
but i needed it to check if im writing it correctly.
ive a problem in my server , i type the right position to be teleported as a server but it moves me in only 5 first Tile of my map , not beyond, what can be the problem ?
ive used these codes and found out ( setpos 1 196 168 ) will move me to the Pixel and not the Tile position
Pixel position:
lua print(player(1,'x'),player(1,'y'))

Tile position:
lua print(player(1,'tilex'),player(1,'tiley'))
edited 2×, last 09.06.21 09:33:35 pm

old Re: how to disapear outsid trigger doors in editor

Cure Pikachu
User Off Offline

Quote
user Persian_Arty has written
ive a problem in my server , i type the right position to be teleported as a server but it moves me in only 5 first Tile of my map , not beyond, what can be the problem ?
ive used these codes and found out ( setpos 1 196 168 ) will move me to the Pixel and not the Tile position

Correct, cs2d cmd setpos uses pixel positions. If you need an easy way to convert tile coordinates to pixel coordinates for the purposes of setpos and such, use this formula:
x = tilex * 32 + 16
y = tiley * 32 + 16

Either make a script to do the conversion process for you or have a calculator on standby.
user Persian_Arty has written
thanks a lot , my other questions anyone has answer ? ive made the map now i dont know how to run it online

Sorry, networking stuff isn't exactly my specialisation, especially since you said you use a Linux server.
edited 1×, last 15.08.21 08:05:01 am
To the start Previous 1 Next To the start
Log in to reply Maps/Editor overviewCS2D overviewForums overview