STAR TREK 2d20
  1. #1

    Is there extension code to call in FGU that intercepts a map token onButtonPress?

    Basically, my players during my session are getting "stuck" as they move map tokens over other tokens. What I want to do is make sure that a player never gets a hit on an onButtonPress that is not a token they own, thus solving the issue. I don't have this problem as the host.

    It's a real pain and I'd like to add something in to make sure tokens they don't own are not clickable by them (as in the click event is not EATEN by the non owned token making their token unclickable).

    Hopefully, one of the practitioners of arcane extension programming in FGU (yeah that's unity but I'd be happy to know in classic as its likely similar) can let me know. It's a real pain getting asked to constantly unstick a player who got stuck over another NPC/PC/or simple map token for display. if you own the map token - the onButtonPress will react - if you don't - it won't.

    I looked in 5e/CoreRPG for keyword searches on token, map, activate, and onButtonPress - but if something was there I missed it. Some register handler for map token clicking maybe? At least I hope there is. Let me know.
    Last edited by SilentRuin; June 17th, 2020 at 01:01.

  2. #2
    When a token is added to a map, you can capture imagecontrol.onTokenAdded(tokeninstance); and then assign tokeninstance.onClickDown and tokeninstance.onClickRelease handlers to each one. Alternately, you can assign a handler to Token.onClickDown and Token.onClickRelease to assign at a global level.

    One thing to note for handlers is that any handlers registered are "all" called, not just one; and that the CoreRPG ruleset has some handlers built-in that perform actions already on those events. I believe these are all assigned in the TokenManager global script of CoreRPG.

    Regards,
    JPG

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
  •  
Starfinder Playlist

Log in

Log in