srakakarma.blogg.se

Savage xr tutorial broken
Savage xr tutorial broken








savage xr tutorial broken

  • select endgame_chat_box_panel:endgame_input_target_label param text \"Global->\" textbox activate endgame_chat_box_panel:endgame_input_textbox" - lets take this entire last bit its easy.
  • Then the commit_command is closed with a \/ The same applies for the set lobby_chat_message. The reason it has 3 of the slashes (I think it should only have 2, I think slothy over killed it  ) is because its 2 layers in, you have a /, \/, and now a/ \\\/. Notice the \\\ \\\, this is the same as saying //, wich is Null or blank. It calls up a chat command, selects a widget, and changes the text param in it. Now this may look complicated but its pretty simple, everything here is being put in the param commit cmd.
  • \"chat #lobby_chat_msg# select endgame_chat_box_panel:endgame_input_target_label param text \\\"\\\" set lobby_chat_msg \\\"\\\"\".
  • ' sets a param in the widet that was previously selected everything after the \ till you see another \ is contained in the command param
  • "select endgame_chat_box_panel:endgame_input_textbox - select is a widget function (will be explained later in my GUI guide) but pretty much lets you select and alter stuff from within it.
  • bind #key_chatall# - this little part calls the bind function, the #key_chatall# calls up the key that chatall is currently bound too.
  • This script by the way is the one that puts 'Global->'in the text box when you hit the chat all key. Mmm look at that chunk! Confused yet? Lets break this down so you can sorta understand what is really going on in there. Lets get onto some real coded! Ive chose a little tidbit from savage's scripts toīind #key_chatall# "select endgame_chat_box_panel:endgame_input_textbox param commit_cmd \"chat #lobby_chat_msg# select endgame_chat_box_panel:endgame_input_target_label param text \\\"\\\" set lobby_chat_msg \\\"\\\"\" select endgame_chat_box_panel:endgame_input_target_label param text \"Global->\" textbox activate endgame_chat_box_panel:endgame_input_textbox"
  • toggle - will toggle a Boolean variable between 0 and 1 if the variable is 0 > its considered to be 1 or TRUE.
  • inc - will increase the by amount adds to.
  • do - This will exect a varable as though it were a command, set test set test2 3 echo \test done\ do test would exec whats inside the variable this is VERY useful.
  • Following is a list of valid 'questions' Most are self explanatory, I have no Idea what X is
  • ask ? ask the engine a question and it will return the answer, the answer will be a Boolean answer in the variable 'answer'.
  • if 'action' quotes not needed if it's a single action, multiple actions must be in quotes.
  • savage xr tutorial broken

    goto - will jump to the minifunction start and skip anything between the goto and the echo - will echo a variable or a string to the console.- creates a point for the goto command.Function also uses forward slashes '/' and paths can be altered to go down a dir './' or start from root by using '/'. exec -executes a script from within another script, ( the path is from the current director.set -Used on a single line to insert a value into your variable (usage: set TS_test 2) - note there is no equal sign.createvar -declares a variable for your scripts (usage : createvar TS_test2 ).if  ? goto new echo \?test\? show test_#object_\#num\#_obj These have to be one of the biggest things that makes s2script so complicated. \ - another very important symbol to know, this separates multiple quotes, # and $s that are contained together.This just simply tells the engine that your done with one command and to read the next as a new one. - a command termination symbol is needed for commands executed within quotes, as shown above.This is very useful if your making a if case that is very very long. ? if  ?~ When the engine 'compiles' your script it will place the next line into the place of this tilde. ~? - one of the most important commands to know if your making your scripts look nice.The way levels are made, the way items are created, the way units are made, are all in the script. The script itself is pretty much responsible for all the settings and all the GUI you see in the game. The basics are pretty easy to grasp so I hope I don?t confuse anyone or myself  ).

    #Savage xr tutorial broken code

    The best way I know of teaching is to do just that, so im going to rip parts of their code out and point out things I think you should know. This is a small document about the Savage Scripting basics.Īlright first off the best possible thing to do, as in most things, is to dive in and look at some of the code S2 has made for the game itself.










    Savage xr tutorial broken