Back our Kickstarter Campaign going on Now
Page 4 of 5 First ... 2345 Last
  1. #31
    Quote Originally Posted by mortgarra View Post
    I'm in a coding mood. I'm making a few small tweaks and adding an option to control the audible ping. Expect a 1.0.2 release sometime shortly.
    If you're looking for the bit I mentioned this is what I tweaked (bolded).

    Code:
    		<windowclass name="combattracker_host" modes="host" merge="join">
    			<sheetdata>
    				<windowtitlebar name="title">
    					<resource>ct_window_title</resource>
    				</windowtitlebar>
    				<anchor_title_ctbox name="contentanchor" />
    				<subwindow name="combat_timer">
    					<script>
    						function onInit()
    							if User.getRulesetName() == "5E" then
    								window.combat_timer.setAnchor("left", "contentanchor", "left","absolute",170);
    							end
    							Debug.console(window.getDatabaseNode());						
    						end
    					
    						function onDoubleClick(x,y)
    							CombatTimer.resetTimer();
    						end
    					</script>
    					<anchored width="100" height="25">
    						<bottom offset="-20" />
    						<left parent="contentanchor" offset="160" />
    					</anchored>
    					<class>ct_combat_timer_host</class>
    					<activate />
    				</subwindow>
    			</sheetdata>
    		</windowclass>
    ---
    DM/Play: AD&D (any flavor)
    Coding the Official AD&D Ruleset

  2. #32
    Quote Originally Posted by celestian View Post
    If you're looking for the bit I mentioned this is what I tweaked (bolded).

    Code:
    		<windowclass name="combattracker_host" modes="host" merge="join">
    			<sheetdata>
    				<windowtitlebar name="title">
    					<resource>ct_window_title</resource>
    				</windowtitlebar>
    				<anchor_title_ctbox name="contentanchor" />
    				<subwindow name="combat_timer">
    					<script>
    						function onInit()
    							if User.getRulesetName() == "5E" then
    								window.combat_timer.setAnchor("left", "contentanchor", "left","absolute",170);
    							end
    							Debug.console(window.getDatabaseNode());						
    						end
    					
    						function onDoubleClick(x,y)
    							CombatTimer.resetTimer();
    						end
    					</script>
    					<anchored width="100" height="25">
    						<bottom offset="-20" />
    						<left parent="contentanchor" offset="160" />
    					</anchored>
    					<class>ct_combat_timer_host</class>
    					<activate />
    				</subwindow>
    			</sheetdata>
    		</windowclass>
    This code snippet should have changed the anchor position for the 5E ruleset. I'm not sure why it didn't for you. Can you test the 1.0.2 that I just uploaded and let me know if you still have the problem?

    Code:
        function onInit()
            if User.getRulesetName() == "5E" then
                window.combat_timer.setAnchor("left", "contentanchor", "left","absolute",170);
            end
        end

  3. #33
    Quote Originally Posted by mortgarra View Post
    This code snippet should have changed the anchor position for the 5E ruleset. I'm not sure why it didn't for you. Can you test the 1.0.2 that I just uploaded and let me know if you still have the problem?

    Code:
        function onInit()
            if User.getRulesetName() == "5E" then
                window.combat_timer.setAnchor("left", "contentanchor", "left","absolute",170);
            end
        end
    I actually did not tell the entire truth, it was with my ruleset actually. Based on 5e but called something different (AD&D Core). My apologies. If you want to add a "or" in there...this will work (tested it myself).

    Code:
     if User.getRulesetName() == "5E" or User.getRulesetName() == "AD&amp;D Core" then
    I don't expect you to do that however but if you did I'd be grateful.
    ---
    DM/Play: AD&D (any flavor)
    Coding the Official AD&D Ruleset

  4. #34

  5. #35
    Quote Originally Posted by mortgarra View Post
    Done.
    Gentleman and a scholar. Thanks good sir.
    ---
    DM/Play: AD&D (any flavor)
    Coding the Official AD&D Ruleset

  6. #36
    Hey mortgarra, I was curious how you implemented your timer using client server pings (Genius hacky way to get around the no timer issue, hope FG makes a timer in FGU) and then I saw this nugget up top.
    Code:
    -- -- Are you f*****g kidding me, Lua?
    function tablesize(t)
    ..
    ..
    ..
    I think I died.

    Anyway, cheers!

  7. #37

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    2,807
    While we are talking about wishes for FGU, I'd sure like to see the ability to do a modal dialog using FG instead of the windows ugly dialog (such a harsh intrusion into a delightful interface).

  8. #38

    Join Date
    Jun 2013
    Location
    Isanti, MN
    Posts
    2,691
    During our last game session, my players complained about the bell ringing when the timer countdown reached 0. Because it rang on everyone's client, they all thought it was their turn. So, I modified your extension to only ring the bell on the player's client whose turn it is. Here is that code:

    Code:
    				local nodeEntry = CombatManager.getActiveCT();
    				local sClass, sRecord = DB.getValue(nodeEntry, "link", "", "");
    				local nodePC = DB.findNode(sRecord);
    				if nodePC then
    					local sOwner = nodePC.getOwner();
    					if sOwner then
    						User.ringBell(sOwner);
    					end
    				end

  9. #39
    Was wondering if this could be used to count down a certain number of rounds? I have an event that happens after 30 rounds, and I’m trying to find a way to track that. Also, can you run more than one timer at a time?
    Art, Games, Life
    www.netjera.com (In progress, so be kind, please)

  10. #40

    Join Date
    Jun 2013
    Location
    Isanti, MN
    Posts
    2,691
    Quote Originally Posted by Netjera View Post
    Was wondering if this could be used to count down a certain number of rounds? I have an event that happens after 30 rounds, and I’m trying to find a way to track that. Also, can you run more than one timer at a time?
    That's what the duration on effects is used for...

Thread Information

Users Browsing this Thread

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

Posting Permissions

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

Log in

Log in