Page 1 of 1

How do you make a button & Custom Texture Help

Posted: December 1st, 2010, 2:55 pm
by Fluffinster
Ok, first How do you make a button(with scripting) that say makes something disappear, open, or go into noclip(you get the basic idea). Because I want to have you talk to someone and one of the guibuttons opens it ect.
Example:

Code: Select all

newgui example
                           guitext "Hi" chat
                           guibar
                           guibutton "Hi, Can you open this door" [whatever I would need to put if possible}
And also I made custom textures and put them in a folder made the package.cfg for it and went and put it in the default_map_settings.cfg(or whatever it is called) but when I go to use them they are not there(I put a jpeg(jpg) image for a fence and one for a door)
Here is what the package.cfg says if you need it

Code: Select all

// tony

//texture 0 "mytextures/door1.jpg"
//texture 0 "mytextures/fence1.jpg"
If you need anymore info tell me Thanks if you help :)

Re: How do you make a button & Custom Texture Help

Posted: December 1st, 2010, 6:17 pm
by chocolatepie33
okay, your code should look like this:

Code: Select all

newgui example [
                           guitext "Hi" chat
                           guibar
                           guibutton "Hi, Can you open this door" [trigger 10 1]
trigger 10 is a door opening, the "1" is a boolean value (which is only true/false), having a true value makes the door open.

your textures should be like this:

Code: Select all

setshader stdworld 
texture 0 "mytextures/door1.jpg"

setshader stdworld
texture 0 "mytextures/fence.jpg"
It helps to know anything after the // in a .cfg file is cancelled out (as it's taken as a comment.)

some more on cubescript:
http://sandboxgamemaker.com/wiki/index. ... Cubescript
viewtopic.php?f=24&t=1317
viewtopic.php?f=24&t=1532

Re: How do you make a button & Custom Texture Help

Posted: December 1st, 2010, 6:26 pm
by Fluffinster
Thanks, but one thing so to do a door I would put its trigger type to 10 and this would open it? Or do I need to script a level_trigger for the door too?

Re: How do you make a button & Custom Texture Help

Posted: December 1st, 2010, 8:23 pm
by PizzaLover101
Nope, just select a door model.