Door with a button/switch.


(pizza) #1

Hello guys im a verry new mapper in gtkradiant and i have a request. Please do NOT lock this topic because it already exists. I have saw the other door tutorials but thats not what i need. What i need is two doors that They are closed and when u press the switch/button they stay opened untill you press it again. Or if anybody can make my a nice door that already works by a switch/button i would say thanks. If you lock this topic with reason already exists this is not the same.


(pizza) #2

so i guess nobody can answer me :(?


(Avoc) #3

You cant demand an answer in 30 minutes :slight_smile:

If you are new at mapping, I suggest you make yourself a warm cup of tea, and read this tutorial from begining to end:
http://www.pythononline.co.uk/et/tutorial.htm

After that, you can start asking questions! :smiley:


(pizza) #4

im not new mapper, i started a new map xd and i finished those tutorials ages ago…


(nukits) #5

Ah i see ^^

But do you have any experience with scripting?


(pizza) #6

yes i got a bit how to make dynamitable objects stuff like that xd and i did wrong in my first reply , my english is rubish. wt i meant is that i started a new map


(ronboy) #7

I started mapping late last year, and I know how to get a door to open with a switch. But since you’re mapping for et, the rtcw method might not work.
I’m sure someone here can help you. :slight_smile:


(pizza) #8

[QUOTE=ronboy;235331]I started mapping late last year, and I know how to get a door to open with a switch. But since you’re mapping for et, the rtcw method might not work.
I’m sure someone here can help you. :)[/QUOTE]

If you dont mind could you make a short tutorial or an example, if im lucky it may work.


(ronboy) #9

Do you have Return to Castle Wolfenstein? I can see you have Gtk Radiant. If you have rtcw, open the map Escape1. There are plenty of doors and gates that open with buttons/switches. That’s how I learned it. :penguin:


(pizza) #10

i got wolfenstein enemy territory not return to castle…


(ronboy) #11

Well, since et differs from rtcw, the switch—>door method is probably different. Sorry I couldn’t help you.


(nukits) #12

Well i made a little prefab and its done with elevator script lol xd

download:
http://www.speedyshare.com/files/23713837/download/d%20prefab.zip


(pizza) #13

[QUOTE=nukits;235345]Well i made a little prefab and its done with elevator script lol xd

download:
http://www.speedyshare.com/files/23713837/download/d%20prefab.zip[/QUOTE]

Wow man i love you :slight_smile: thanks That absolutly perfect :slight_smile:


(BackSnip3) #14

I think using a func_button can save your life with this,you just need thefunc_button to target the doors.
Then you set stayopen spawnflag for the doors and it should work.The doors need to have the same “team” key.
But ET with gtk 1.5 doesn’t feature the func_button.
To add it you should look in your gtkradiant folder/et.game/etmain/et_entities.ent.
In this file you should add the following lines:

-->

<group name="func_button" color="0 .5 .8">
When a button is touched by a player, it moves in the direction set by the "angle" key, triggers all its targets, stays pressed by an amount of time set by the "wait" key, then returns to it's original position where it can be operated again.
-------- KEYS --------
<direction key="angle" name="Direction">determines the direction in which the button will move (up = -1, down = -2).</direction>
<target key="target" name="Target">all entities with a matching targetname will be triggered.</target>
<real key="speed" name="Move Speed">speed of button's displacement (default 40).</real>
<real key="wait" name="Return Delay">number of seconds button stays pressed (default 1, -1 = return immediately).</real>
<real key="lip" name="Lip">lip remaining at end of move (default 4 units).</real>
<real key="health" name="Activate On Damage">(default 0) if set to any non-zero value, the button must take damage (any amount) to activate.</real>
<real key="light" name="Model Light Intensity">constantLight radius of .md3 model included with entity. Has no effect on the entity's brushes (default 0).</real>
<color key="color" name="Model Light Color">constantLight color of .md3 model included with entity. Has no effect on the entity's brushes (default 1 1 1).</color>
<model key="model2" name="Model File">path/name of model to include (eg: models/mapobjects/pipe/pipe02.md3).</model>
<real3 key="origin" name="World Origin">alternate method of setting XYZ origin of .md3 model included with entity (See Notes).</real3>
<boolean key="notfree" name="Hidden For FFA">when set to 1, entity will not spawn in "Free for all" and "Tournament" modes.</boolean>
<boolean key="notteam" name="Hidden For Teamplay">when set to 1, entity will not spawn in "Teamplay" and "CTF" modes.</boolean>
<boolean key="notsingle" name="Hidden For SP">when set to 1, entity will not spawn in Single Player mode (bot play mode).</boolean>
-------- Q3MAP2 KEYS --------
<targetname key="_targetname" name="Target Name">Used to attach a misc_model entity to this entity.</targetname>
<real key="_lightmapscale" name="Lightmap Scale">Floating point value scaling the resolution of lightmaps on brushes/patches in this entity (default 1.0).</real>
<integer key="_castshadows;_cs" name="Shadow Caster Level">Allows per-entity control over shadow casting. Defaults to 0 on entities, 1 on world. 0 = no shadow casting. 1 = cast shadows on world. > 1 = cast shadows on entities with _rs (or _receiveshadows) with the corresponding value, AND world. Negative values imply same, but DO NOT cast shadows on world.</integer>
<integer key="_receiveshadows;_rs" name="Shadow Reciever Level">Allows per-entity control over shadow reception. Defaults to 1 on everything (world shadows). 0 = receives NO shadows. > 1 = receive shadows only from corresponding keyed entities (see above) and world. < 1 = receive shadows ONLY from corresponding keyed entities.</integer>
<texture key="_celshader" name="Cel Shader">Sets the cel shader used for this geometry. Note: omit the "textures/" prefix.</texture>
-------- Q3MAP2 TERRAIN KEYS --------
<texture key="_indexmap;alphamap" name="Terrain Blending Map">Path/name for the art file used to guide the mapping of textures on the terrain surface.</texture>
<integer key="_layers;layers" name="Terrain Layers">Integer value is the number unique root shaders that will be use on the terrain.</integer>
<texture key="_shader;shader" name="Terrain MetaShader">Path to the metashader used to assign textures to the terrain entity. Note: Omit the "textures/" prefix.</texture>
-------- NOTES --------
Setting the origin key is simply an alternate method to using an origin brush. When using the model2 key, the origin point of the model will correspond to the origin point defined by either the origin brush or the origin coordinate value.

Target this entity with a misc_model to have the model attached to the entity (set the model's "target" key to the same value as this entity's "targetname").
</group>

<!--

Now restart radiant if it was opened…

EDIT:oopsie nukits was faster :smiley: But this is useful still ^^


(brianwonka) #15

I know this is a very old thread, but I’ve started to play around with mapping in my vast amounts of unwarranted, sad free time… I’m mapping in ET and there is no func_button and I’m having a hard time finding it in my ET directories.

Are any of these files still available anywhere? Any prefabs still exist?


(WuTangH) #16

Hello there,

Ive searched for some prefabs with button functions, and I found only Elevator prefab: http://www.thewolfteam.org/cmdownloads/elevator2/
But you might look into map-sources to find prefabs, too. For example MLB maps released many mapsources and they used buttons a lot. :slight_smile:

Overall in ET, buttons are made with entity called “func_invisible_user” that is connected to "target_script_trigger".
Func_invisible_user is the invisible part of the button that you press. Apply common/trigger texture on it, and connect it to target_script_trigger.
Target_script_trigger will run all events through its script after you press the button.
The button itself can be just worldspawn brush. (or in case you want it animated, it is some kind entity…)

The whole step-by-step would be longer. I can make a simple prefab later, if you wont deal it :wink:


(brianwonka) #17

ET people are so friendly. They are like boat people. I’m working on a Temple of Doom project.

Remember the scene here Indy pushes on the statues boobs and the statue moves backwards into the wall to reveal a secret passage. That’s what I need to script.

I figured this might be a good way to go about that. I’ll try monkey with it but truth be told I love looking at scripts and prefabs already designed, easier to learn and as a beginner easier for me to get work done.

Any help is always appreciated. I’ve gotten so much support already from the mapping community. The scripting involved for a project like this is daunting so I should learn how to do scripts to some extent but any help is appreciated and I don’t feel less accomplished for it.

I’m enjoying the modeling , mapping process. The scripting I haven’t really dug into yet.

Thank you for your help. I’ll see what I can do. But, I doubt I’ll have it figured out soon. I’m a beginner. Thanks.


(WuTangH) #18

Okay, here is a prefab exported from my map.
It is a button that will start move things if you press it… So it should be the same system as you need. :wink:

p.s.: it is for allies only.


(brianwonka) #19

[QUOTE=WuTangH;565069]Okay, here is a prefab exported from my map.
It is a button that will start move things if you press it… So it should be the same system as you need. :wink:

p.s.: it is for allies only.[/QUOTE]

WOW

That’s fantastic! Thank you, I did monkey with it, but it was late, like 1 AM and I stopped. This is GREAT. Thank you so much. this is a very supportive mapping community, seriously. This is going to save me a lot of time, which is great because I’m a recent college graduate and unemployed and so I have a lot of other important priorities to focus on other than learning how to script everything in my map.

Thank you.
I will remember to credit you. Also, Once things get moving I’ll send you a message to look at my progress. Things are moving now but I don’t have alot to show you honestly. I rather wait.


(Teuthis) #20

Some tutorials you might find valuable and prefabs: