• 0

    posted a message on My first galaxy script. problems.. help please.

    @vjeux: Go

    Thanks vjeux, that did the trick!! I guess that section of the website should be considered out of date...

    Thanks again!

    Posted in: Galaxy Scripting
  • 0

    posted a message on My first galaxy script. problems.. help please.

    So I was looking for a action to give me a random result each time a trigger is executed. I found the below script under the API docs and attempted to insert it into a custom script as an action but when I go to test the map I receive a syntax error upon execution. What am I missing / doing wrong...?

    Is there a built-in function that will give me the randomness? I went down the list but couldn't find a function similar to randomInt that I could just plugin. I would also like to learn what is going on here too. Thanks

    if (RandomInt(1, 3) == 1) // Brace required
    {
      Print("Good");
    }
    else if (Random(1, 5) < 4) // else if
    {
      Print("Average");
    }
    else
    {
      Print("Bad");
    }
    
    Posted in: Galaxy Scripting
  • To post a comment, please or register a new account.