macro coding: problem with store_location function
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
macro coding: problem with store_location function
Is there anything wrong with this code (inside a macro) ?
The output is:
while the tile (13,10) is in the middle of the map . I would have expect the number of matching locations being 7.
I compared it with existing code in various scenarii and it seems similar.
Any idea anyone ? Thanks in advance.
If I remove the line "radius=1", can I expect to get only the (13,10) tile as result ?
Code: Select all
{DEBUG_MSG "position: {NEW_POS_X},{NEW_POS_Y}"}
[store_location]
x,y={NEW_POS_X},{NEW_POS_Y}
radius=1
variable=center_location
[/store_location]
{DEBUG_MSG "Location n. $center_location.length"}
Code: Select all
position: 13,10
Location n. 0
I compared it with existing code in various scenarii and it seems similar.
Any idea anyone ? Thanks in advance.
If I remove the line "radius=1", can I expect to get only the (13,10) tile as result ?