1.4.0.4: How Would I Select Tokens Along Facing?

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
User avatar
nolgroth
Dragon
Posts: 441
Joined: Fri Sep 21, 2007 6:10 pm

1.4.0.4: How Would I Select Tokens Along Facing?

Post by nolgroth »

Good Day,

I am trying to build a macro that selects all of the tokens, out to a variable range, from an originating token's facing. The selected tokens would all be in a straight line, 1 cell wide.

If this should go in the older MapTool Macros sub-forum, please move it over there and I will direct all further inquiries to that forum.

Thank you ever so much.

-James

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: 1.4.0.4: How Would I Select Tokens Along Facing?

Post by aliasmask »

Well, there's a couple of ways to do this. How granular is the facing? Does it only fall on the cardinal points of a compass? I've done something similar with some flanking code which is fairly long and complex, but is relevant to what you need.

http://forums.rptools.net/viewtopic.php ... 15#p251641

A more mundane way to perhaps accomplish what you need is to create various vision types and use the canSeeToken function in conjunction with the getTokens function.

PS. Wiki seems to be down right now.

User avatar
nolgroth
Dragon
Posts: 441
Joined: Fri Sep 21, 2007 6:10 pm

Re: 1.4.0.4: How Would I Select Tokens Along Facing?

Post by nolgroth »

Hmmn. I already use a cone for wider Area of Effect attacks. I will experiment with getting a reasonable arc that can see down one cell width. That should work out fine. I should have thought about that.

Thanks.

Post Reply

Return to “Macros”