Regarding Initiatives and action restrictions.

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
koorimusha
Kobold
Posts: 9
Joined: Wed Jun 17, 2015 3:56 pm

Regarding Initiatives and action restrictions.

Post by koorimusha »

So, I pretty much know how the initiation works and all. If you have a checkmark by the token you're impersonating, it pretty much means it's your turn. But there's just some extra reinforcements I would like to apply to that. Is it possible to set it where certain actions can NOT be done when it is not that token's initiative? I've looked around and there only seems to be a function that determines which token on the list has initiative as opposed to if it is the one being checkmarked or not. (getCurrentInitiative() would be the function I'm referring to, but it doesn't exactly accomplish what I'm trying to do.) If there's no such thing, I suppose it doesn't matter since all the player characters have to do is follow the rules, which are very simple nonetheless, but I just like to have a foolproof set of code in my macros.


User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Regarding Initiatives and action restrictions.

Post by Full Bleed »

koorimusha wrote:Is it possible to set it where certain actions can NOT be done when it is not that token's initiative?
Do as Wolph suggests and turn off Player Movement without initiative in the initiative panel:

Initiative Window>Next (Dropdown)>Lock Movement

And then make some abort code for your macros to check if the token trying to run it has initiative.

One of the methods I use...

Create a User Defined Function called noInit.

Code: Select all

[h: hasInit = getInitiativeToken()] 
[r: noInit = if(currentToken() == hasInit, 1, 0)]
And then, near the top of any macro you want to only allow tokens with initiative to run add this line:

Code: Select all

[h: assert(noInit(), "You do not have <b>INITIATIVE<b>!", 0)]
The token won't be able to run the macro unless they have init now.



Having a single function in MT 1.4 that aborted a macro on a token without init would be nice though.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

koorimusha
Kobold
Posts: 9
Joined: Wed Jun 17, 2015 3:56 pm

Re: Regarding Initiatives and action restrictions.

Post by koorimusha »

Can't leave without giving my thanks. Thanks.

I actually learned quite a bit in the process of learning how to do more with initiatives. You have been a great help.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Regarding Initiatives and action restrictions.

Post by Full Bleed »

koorimusha wrote:Can't leave without giving my thanks. Thanks.

I actually learned quite a bit in the process of learning how to do more with initiatives. You have been a great help.
You're welcome.

MT has great initiative functions. And with a little creativity (and trial & error), I've been able to create the initiative system I've always wanted.

Good luck with your game!
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Post Reply

Return to “MapTool”