FG Spreadshirt Swag
  1. #1

    Getting range mods for targets

    Summary of problem: I want to automatically calculate range mods assuming A has targeted B on the Combat Tracker, and A and B are both tokens on a map, with an onMeasureVector method that returns the modifier.

    I believe the correct insertion point for this code would be in my attack roll method:

    Code:
    elseif rollable_attack or rollable_button_attack then
      rActor = ActorManager.getActor(sActor, node.getParent().getParent().getParent());
      sType = "attack";
      sDesc = "[ATTACK]";
      sNode = node.getPath();
      rRoll = { sType = sType, sDesc = sDesc, aDice = aDice, nMod = nMod, sNode = sNode };
    end
    rActor above is a CTNode. So basically, I would like to figure out how to "connect" to the map tokens representing this rActor and its currently targeted nodes and pull the current calculated range between them.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,416
    This has been done in some rulesets and an extension already. See this post: https://www.fantasygrounds.com/forum...l=1#post489701
    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!

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
  •  
5E Product Walkthrough Playlist

Log in

Log in