Starfinder Playlist
Page 2 of 2 First 12
  1. #11
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,406
    Quote Originally Posted by Archlyte View Post
    Have the buttoncontrol scrip call to window.strikeranktot. then define that up in the windowclass so instead of rollDice it is looking to window.strikeranktot.getValue
    I'm not sure what you're trying to say here.

    window.<control_name> is a way of getting access to the control named whatever you put in <control_name> within the current window environment. You can do it a number of different ways. Have the rollDice code in the <windowclass><script> section - which I think is where you have it at the moment, in which case you will need specific references to the controls which might need window.<control_name> to get to them.

    If your strikeranktot control is in a different windowclass then you'll need additional window/control references to be able to reach it.

    First step - try using window.strikeranktot.getValue() in your current rollDice function.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  2. #12
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,406
    Quote Originally Posted by Archlyte View Post
    Do you get paid for this Trenloe? I hope you do
    Nope.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #13
    Ok I can get it to work without errors with the following script:

    Code:
    function rollDice()
            local desc = name.getValue().." ("..strikeranktot.getValue()..")"; 
            ChatManager.throwDice("dice",{"d10"},0,desc);
          end
    it looks like this with me controlling a character named Brandorn:
    Attachment 9535

    I want to add the Strink Rank Total to the dice roll. It finds the SRT fine for the desc, but every time I try to access it in order to add it to the die total it return s a nil value on global or it doesn't like the character such as when I put in the window.strikeranktot.getValue. I would also like a sting that says Initiative after the character's name. but when I tried to add it the thing kicked it back as no good. Thank you for all of your help, you are amazing.

  4. #14
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    Quote Originally Posted by Archlyte View Post
    Ok I can get it to work without errors with the following script:

    Code:
    function rollDice()
            local desc = name.getValue().." ("..strikeranktot.getValue()..")"; 
            ChatManager.throwDice("dice",{"d10"},0,desc);
          end
    it looks like this with me controlling a character named Brandorn:
    Attachment 9535

    I want to add the Strink Rank Total to the dice roll. It finds the SRT fine for the desc, but every time I try to access it in order to add it to the die total it return s a nil value on global or it doesn't like the character such as when I put in the window.strikeranktot.getValue. I would also like a sting that says Initiative after the character's name. but when I tried to add it the thing kicked it back as no good. Thank you for all of your help, you are amazing.
    Which ruleset is this for? Is this based upon CoreRPG?

    Make sure the numberfield tag for strikeranktot is <numberfield name = ... not <Numberfield name = ... as per your post above. Then add this version of rollDice to the script block attached to the window class that contains the strikeanktot numberfield:

    Code:
    function rollDice()
     sStrikerAnkTot = strikeranktot.getValue();
     sDesc = name.getValue() .. " (".. sStrikerAnkTot .. ")"; 
     ChatManager.throwDice("dice",{"d10"},tonumber(sStrikerAnkTot),desc);
    end
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  5. #15
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,684
    Blog Entries
    1
    Quote Originally Posted by Trenloe View Post
    Nope.
    Repay him with warm fuzzies and use the Star to give him some reputation

  6. #16
    Quote Originally Posted by damned View Post
    Repay him with warm fuzzies and use the Star to give him some reputation
    I'd be surprised if he doesn't fill up that reputation bar sometime soon to the point that he can't receive anymore.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in