noooooob question: button


(skippah) #1

how do you guys make a button
i search the forum and i come up with nothing
i tried to google it and i found nothing

i’p desperate. its gonna be something simple i know but plz help me

thanks in advance


(aburn) #2

ok… I don’t have too much time so I will try to explain it to you just a bit… cause I had a bit of problems with this myself and I know it was a bit hard to find the edequate solution…

Most people use script_mover for buttons… (I am sure you can find a tutorial on these everywhere)

than in the script the mover activates what you want the button to activate…


Solution 2.

Use the new Entities (that have func_button implemented)
these can be found here:
Radiant 1.4 - http://www.splashdamage.com/forums/viewtopic.php?t=6243&postdays=0&postorder=asc&start=0
Radiant 1.5 - http://www.splashdamage.com/forums/viewtopic.php?t=14216&postdays=0&postorder=asc&start=0


(skippah) #3

ok srr but that i don’t understand :? :?


(Flippy) #4

I’ll try to explain it more,

The standard ET entities (entities are like objects, things you can use to do stuff) do not include a button. At least not in a way of visually moving the button back and making stuff happen then.

You can use the new entities (which I believe are from RTCW) which DO include this button.
It’s called the “func_button” entity.

You need to create a brush that will be your button, select it, rightclick INSIDE it and select “func” - “func_button” to make it into a button.
When you walk up to the brush now ingame and press F you will see the button moving back and making some sound, wait for a few moments and then come back again.

To make the button do stuff you need to connect it to another entity like a shooter or a target_script_trigger (to trigger a script to do more advanced things.).


(skippah) #5

but how can i do it easily on ET??? :? :?

i don’t need a fancy thing that moves just that you can press F and you can link it to something


(kamikazee) #6

In that case, try a func_invisible_user. You just drag a brush, apply the common/trigger shader to it and convert it to the func_invisible_user.

Then link it to a door, or whatever.


(aburn) #7

I think he needs a func_button really… else it will really be a problem for him…

Check out my previous post for links… there are two… depending on ur radiant verison… u need to update ur radiant entity list… so u can use func_button… else u use a script_mover or func_something… as Kamikaze said…

BUT I would recoment using the new entity from the updated ones I posted…


(-SSF-Sage) #8

Here. I made a simple example for you: http://rapidshare.com/files/46169237/buttons_by_sage.zip.html . It has both button types, one actives “a little elevator”, and the other activates my own special little door. Check the readme. You need to compile it in order to play it. No problem. :slight_smile:


(skippah) #9

thanks that helped me alot

but i linked it to a shooter_rocket and you can fire like a million rockets in one sec.

how do i set a limit on it like 1 push per sec

solved

i didn’t read the delay key srr


(-SSF-Sage) #10

I’m not sure if key wait value 1 will work for these, too lazy to test out. I think it doesnt work for the invisible user… Not sure test it for both before. Here is a one way to do this. If it doesnt work give the button following:


Key: Scriptname
Value: Button

key: targetname
value: button

Then make sure you have script_multiplayer in your map with following


Key: Scriptname
Value: game_manager

to activate the scripts.

Then make yourmapnamehere.script and give it following:


game_manager
{
spawn
{
wait 200
}
}

button //scriptname of your button
{
spawn
{
wait 200
}
activate
{
 setstate button invisible //targetname of the button, hides it
wait 1000 //wait 1 second
setstate button default //make it back to visible
}
}

Note this hides the button, so I wouldn’t recommend to use it on func_button, since you cant see the button for that 1 second. Should work perfectly for the func_invisible_user, atleast if I didn’t make typos.

CHeers

edit you seem to solve this out. I think this could be some help for somebody anyway.


(skippah) #11

on the func_invisible thing it works with the delay key

but if i do it with the func_invisible i don’t get the hand in ET you that little grey hand

and i can’t find the func_button

i’m working with gtkradiant 1.5.0


(aburn) #12

listen dood why dont you read that whole thread which I posted… there are at least 20 posts talking about missing “entities” (the things like func_button)

I said in my first post

So you said you use radiant 1.5 so use the second link… READ everything and find your self a func_button… it is really a matter of 10-15 mins.


(skippah) #13

ok thanks for all your help


(aburn) #14

BTW I cant find the .ent file for you there… it looks like it is not there so maybe just install yourself Radiant 1.4 for the button thing and than use a def file instead?

Radiant 1.4

Or maybe someone has a working ent file with func_button for you… IDK
sorry


(-SSF-Sage) #15

You can always copy paste it and change the brush as you want! I haven’t got the .ent file installed. I use copy/paste from my prefabs if I need some of those entities. Skippah you can ofcourse copy those entities from that new entities thing when you need one, probably won’t very often. Thanks for letting me know about the delay key anyway, didn’t notice that either. I think that script might come in handy in some place for someone anyway. Atleast now you know how to make this kind of things happen with this script for other entities too. For func_invisible thing; check my sample!. There is that hand thing set on it. Select the entity from L, then press N and see it. Can’t remember it, it’s something like user_hint bla bla. I’m at work so just check it from there. And you are welcome. :wink: