Place a signpost on the map

The place to post your WML questions and answers.

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.
Post Reply
User avatar
Alopex95
Posts: 22
Joined: April 3rd, 2020, 12:14 pm

Place a signpost on the map

Post by Alopex95 »

Hello, everyone!

As the title says: I'm trying to place a signpost in one of my scenarios to make the player win the level if he moves the leader on that given hex. I already did implement a moveto event (which results in winning the level itself) that works great, but I cannot find a way to place a signpost on the map to show the arrival point to the player.
I dug on the WML documentation without finding something useful to do so, but I found a post here where a user suggested placing the signpost with {PLACE_IMAGE scenery/signpost.png 35 35}, but if this is the right solution to this problem, where can I find that signpost PNG file?

Thanks a lot in advance!
User avatar
Straff
Posts: 85
Joined: September 27th, 2020, 2:53 pm

Re: Place a signpost on the map

Post by Straff »

It is already there, included in core, so don't mind.

data/core/images/signpost.png
User avatar
beetlenaut
Developer
Posts: 2814
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Place a signpost on the map

Post by beetlenaut »

Use the [i] icon in the bottom left corner of the game's menu screen. Browse to the folder where your "Game data" is stored, then continue to the folder data/core/images/scenery. The signpost is in "scenery", but you would probably find the "items" folder interesting as well. The {PLACE_IMAGE} macro (or the [item] tag which the macro is using) automatically starts looking in the "images" folder, so you only indicate the part of the path after that point. The {PLACE_IMAGE} line you have there is correct. The other solution is to use the [item] tag directly. The tag would give you more control and other options, but the macro is probably sufficient in this case. Put either one in a "prestart" [event].
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
Alopex95
Posts: 22
Joined: April 3rd, 2020, 12:14 pm

Re: Place a signpost on the map

Post by Alopex95 »

beetlenaut wrote: December 8th, 2022, 2:09 pm Use the [i] icon in the bottom left corner of the game's menu screen. Browse to the folder where your "Game data" is stored, then continue to the folder data/core/images/scenery. The signpost is in "scenery", but you would probably find the "items" folder interesting as well. The {PLACE_IMAGE} macro (or the [item] tag which the macro is using) automatically starts looking in the "images" folder, so you only indicate the part of the path after that point. The {PLACE_IMAGE} line you have there is correct. The other solution is to use the [item] tag directly. The tag would give you more control and other options, but the macro is probably sufficient in this case. Put either one in a "prestart" [event].
Wow, this is so awesome!
I didn't realize all the core images are at that location (I read on the WML doc is advisable to use those images for convenience, but I never found them).

Thanks again, beetlenaut!
User avatar
Alopex95
Posts: 22
Joined: April 3rd, 2020, 12:14 pm

Re: Place a signpost on the map

Post by Alopex95 »

Straff wrote: December 7th, 2022, 9:12 pm It is already there, included in core, so don't mind.

data/core/images/signpost.png
Thanks for pointing this out! Despite the above solution being correct, I was still looking for the core images to use somehow.
User avatar
Helmet
Posts: 641
Joined: December 19th, 2006, 5:28 pm
Location: Florida, USA

Re: Place a signpost on the map

Post by Helmet »

Alopex95 wrote: December 9th, 2022, 12:28 pm Thanks for pointing this out! Despite the above solution being correct, I was still looking for the core images to use somehow.
Here it is. For various reasons, I sometimes copy things from the core game into my own folders, rather than writing the path to the core folder.
I would put it in images/scenery or maybe images/misc.
Attachments
signpost.png
signpost.png (2.92 KiB) Viewed 413 times
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Post Reply