Call of Duty 5: World at War => Tutorial Desk => Scripting => Topic started by: BluntStuffy on August 18, 2015, 10:18:15 pm
Title: [TUT] Make a button do something + add a keybind option to a menu
Post by: BluntStuffy on August 18, 2015, 10:18:15 pm
This tutorial will show you how you can make any button preform an action, and how to add a keybind option for it in a menu. After this tutorial it will only print a line on the screen, you have to work from there on.. ( i'm not 100% sure if there's a better way to get this working, menu-scripting is still kinda new to me. This was pretty much the only thing i got working so far though )
-I'll start with the menu, in this example we'll add the line to the main menu so it's easy to find, but you can put it in any menu in the same way ( controlls-options, pause menu etc ). (https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fimgur.com%2FjGBIQVl.jpeg&hash=987ebeb425d1796da4d26fd938f5a07f9e3b146d)
Go to your root\raw\ui\ folder and find the file main.menu copy that file and rename it to anything you like, i'll use:
main_new.menu
open the renamed file, and look for this line:
Above that line add:
Note: The number 11 determine's at wich position the tekst will appear in the menu, the lower the number the higher it will appear to the top of your screen.
Open launcher and add this line to your mod.csv fastfile:
Now we need to make a script to make something happen. Create a new .gsc in your mods\mapname\maps\ folder and give it any name, i'll use:
button_print.gsc
inside it, paste this:
Last thing to do is call the script from _zombiemode.gsc, open it and under this line:
Add:
Title: Re: [TUT] Make a button do something + add a keybind option to a menu
Post by: Harry Bo21 on August 18, 2015, 10:24:10 pm
I needed this so bad, legend, thank you
Title: Re: [TUT] Make a button do something + add a keybind option to a menu
Post by: BluntStuffy on August 19, 2015, 05:54:54 pm