RPTools.net

Discussion and Support

Skip to content

It is currently Tue Mar 28, 2017 10:15 pm 




Forum rules


Posting now open to all registered forum users.



Reply to topic  [ 10 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Kobold
 
Joined: Thu Mar 16, 2017 3:44 am
Posts: 4
Location: Japan
 Post subject: [1.4.0.5] moveTokenToMap does not work properly
PostPosted: Thu Mar 16, 2017 5:03 am 
I will write to the forum for the first time.
I cannot use English well, so please forgive me if I say something rude.

I'm using MapTool 1.4.0.5.
When using moveTokenToMap and setState in combination, the token moves to the designated coordinates of the current map (setState is also applied) as if using moveToken, and the token is copied to the map specified by moveTokenToMap.

Code:
[h: id = currentToken()]
[h: setState("Dead", 1)]
[h: moveTokenToMap(id, "Grave", 1, 1)]


This topic suitable for writing this content?
Thank you :)


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9163
Location: Netherlands
 Post subject: Re: [1.4.0.5] moveTokenToMap does not work properly
PostPosted: Thu Mar 16, 2017 7:50 am 
im sorry, but I can't deduce what is going wrong from your message.
I get that you run the given script for a token, and then what happens??

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II and onMouseOverEvent
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS


Top
 Profile  
 
User avatar  Offline
Kobold
 
Joined: Thu Mar 16, 2017 3:44 am
Posts: 4
Location: Japan
 Post subject: Re: [1.4.0.5] moveTokenToMap does not work properly
PostPosted: Thu Mar 16, 2017 9:41 am 
In my computer environment, if you execute the above code on the selected token, the token will be moved to the Grave map, but the token will remain in the current map as well (It moves to specified coordinates on the current map.)

The reproduce method is as follows,

1. Create a new Grave map.
2. Prepare the token in another map.
3. Enter the above macro in the button on the macro panel, check "Apply to Selected Token", uncheck "Allow Players to Edit Macro" and make it executable.
4. Execute this macro for the prepared token.
5. The token becomes Dead status and moves to x1, y1 coordinates on the current map (the token does not disappear).
6. Looking at the Grave map, the token with Dead status is present at the x1, y1 coordinates.

In other words, if you use moveTokenToMap, the token is supposed to disappear from the current map and it should be moved to the specified map, but it will be present in either map.

If [h: setState ("Dead", 1)] is deleted from the above code and executed, the token does not remain in the current map and moveTokenToMap works correctly.

I am sorry I can not explain it well… :cry:


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3573
Location: MD
 Post subject: Re: [1.4.0.5] moveTokenToMap does not work properly
PostPosted: Thu Mar 16, 2017 10:45 am 
wolph42 wrote:
im sorry, but I can't deduce what is going wrong from your message.
I get that you run the given script for a token, and then what happens??

Just tested (on 1.4.0.2).

It moves a copy of the token to the new map *AND* moves a copy of the token to the same coordinates on the current map.


EDIT:
The problem does appear to be with using setState() in the same macro. When you remove setState() from the macro you can actually see the token flash to 1,1 on the current map (like moveToken() is executing first) before the token is sent to the new map. But *with* setState() it does not remove from the current map after "flashing" there and you end up with two copies of the token (one on each map).

I think this can go into the Bug reports forum.

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5383
 Post subject: Re: [1.4.0.5] moveTokenToMap does not work properly
PostPosted: Thu Mar 16, 2017 11:41 am 
sounds like the same type of issue with copyToken.

For the OP, just for giggles, before the move happens, put an input and see if that changes stuff? I suspect it will. If this is the case, you will likely need to set a deferred macro to do the copy part.

_________________
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9163
Location: Netherlands
 Post subject: Re: [1.4.0.5] moveTokenToMap does not work properly
PostPosted: Thu Mar 16, 2017 1:33 pm 
jfrazierjr wrote:
sounds like the same type of issue with copyToken.

For the OP, just for giggles, before the move happens, put an input and see if that changes stuff? I suspect it will. If this is the case, you will likely need to set a deferred macro to do the copy part.


you do know that your post to the OP makes about as much sense as the OP's post did to me?

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II and onMouseOverEvent
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5383
 Post subject: Re: [1.4.0.5] moveTokenToMap does not work properly
PostPosted: Thu Mar 16, 2017 2:18 pm 
wolph42 wrote:
jfrazierjr wrote:
sounds like the same type of issue with copyToken.

For the OP, just for giggles, before the move happens, put an input and see if that changes stuff? I suspect it will. If this is the case, you will likely need to set a deferred macro to do the copy part.


you do know that your post to the OP makes about as much sense as the OP's post did to me?



You don't speak ignoramus? I just have tiny snippets of time to post from my phone at work and, well... I say stupid stuff with too few "steps".

_________________
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..


Top
 Profile  
 
User avatar  Offline
Kobold
 
Joined: Thu Mar 16, 2017 3:44 am
Posts: 4
Location: Japan
 Post subject: Re: [1.4.0.5] moveTokenToMap does not work properly
PostPosted: Fri Mar 17, 2017 3:58 am 
I'm sorry for confusing you with my post.
What happened at my MT is the same as that of Full Bleed's post.

Should I post this issue in the bug report forum, including how to reproduce the problem?


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9163
Location: Netherlands
 Post subject: Re: [1.4.0.5] moveTokenToMap does not work properly
PostPosted: Fri Mar 17, 2017 7:30 am 
I've already reported it to the DEVs so not necessary. Thank you for the report!

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II and onMouseOverEvent
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS


Top
 Profile  
 
User avatar  Offline
Kobold
 
Joined: Thu Mar 16, 2017 3:44 am
Posts: 4
Location: Japan
 Post subject: Re: [1.4.0.5] moveTokenToMap does not work properly
PostPosted: Fri Mar 17, 2017 9:17 am 
I'd like to thank wolph42 for reporting on my behalf, and everyone who responded to me :wink:


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 10 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman