English how to disapear outsid trigger doors in editor

16 replies
Goto Page
To the start Previous 1 Next To the start
Up
Persian_Arty
User
Offline Off
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..
Persian empire will once again come to cross the world
07.06.21 10:42:54 am
Up
Gaios
Security Supporter
Offline Off
07.06.21 12:18:02 pm
Up
Cure Pikachu
User
Offline Off
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
IMG:https://i.imgur.com/uUrye71.png
IMG:https://i.imgur.com/xpsyQRX.png
07.06.21 04:41:34 pm
Up
Persian_Arty
User
Offline Off
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
Persian empire will once again come to cross the world
07.06.21 09:55:55 pm
Up
Mami Tomoe
User
Offline Off
@user Persian_Arty ignore @user Gaios.

Also, you can use the cs2d entity trigger_start on a cs2d entity trigger_delay with a cs2d entity func_gameaction.
07.06.21 10:14:05 pm
Up
Persian_Arty
User
Offline Off
thanks a lot for ur attetion, does this work for game restart or a part of the map restart ?
Persian empire will once again come to cross the world
07.06.21 10:41:38 pm
Up
Mami Tomoe
User
Offline Off
@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.
08.06.21 12:16:11 am
Up
Persian_Arty
User
Offline Off
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 ?
Persian empire will once again come to cross the world
08.06.21 12:19:54 am
Up
Mami Tomoe
User
Offline Off
Use the inner button to trigger both the door and the outer button.
08.06.21 10:29:13 am
Up
Persian_Arty
User
Offline Off
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
Persian empire will once again come to cross the world
08.06.21 11:07:56 am
Up
Cure Pikachu
User
Offline Off
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
IMG:https://i.imgur.com/uUrye71.png
IMG:https://i.imgur.com/xpsyQRX.png
08.06.21 09:48:11 pm
Up
Persian_Arty
User
Offline Off
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
Persian empire will once again come to cross the world
09.06.21 03:04:13 pm
Up
Mami Tomoe
User
Offline Off
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
09.06.21 07:28:28 pm
Up
Persian_Arty
User
Offline Off
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
Persian empire will once again come to cross the world
09.06.21 08:15:51 pm
Up
Mami Tomoe
User
Offline Off
@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).
09.06.21 09:06:55 pm
Up
Persian_Arty
User
Offline Off
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
Persian empire will once again come to cross the world
10.06.21 12:40:23 pm
Up
Cure Pikachu
User
Offline Off
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:
Code:
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
IMG:https://i.imgur.com/uUrye71.png
IMG:https://i.imgur.com/xpsyQRX.png
To the start Previous 1 Next To the start