Using a map to show location in stack

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
calmrr3
Posts: 100
Joined: Mon Oct 28, 2013 2:39 pm

Using a map to show location in stack

Post by calmrr3 » Fri Nov 08, 2013 12:37 pm

I have an image (below) which I hope to use as the basis for a map to track progress through the stack.
Each dot corresponds to a card and the user must make a number of choices in order to get to the end of the stack without encountering a dead end.

My question is this:
Is it possible to create this image using the oval tool/ line tool in a hidden card? So that on each card I can place the map and set the dot which corresponds to the current card to a different colour?

I would also like the map to appear as you go along (so when you are on the first card all that you can see is a dot and then when you go to the next card another dot is shown with a line joining them - so it builds the map as you go along. I am guessing I could just to this with show/hide and add a visual effect to fade the lines/dots in?

Thanks!


Image

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Using a map to show location in stack

Post by dunbarx » Fri Nov 08, 2013 2:50 pm

Hi.

Sure. I thought you had drawn this with the LC graphic tools

Read up about the "backColor" property. You can set the name or number of the several circles to correspond with your cards.

As for having the user make those choices when encountering a fork, you can also name and number the line segments, and "map" those to whatever selection method you choose. Does the user see the map, or is that just a graphic representation of the current position? Also, you do not have to "hide" the card, just manage its access. It could also be a substack if you want to show it in another window.

Please keep us in the loop on this, It looks like fun.

Craig

calmrr3
Posts: 100
Joined: Mon Oct 28, 2013 2:39 pm

Re: Using a map to show location in stack

Post by calmrr3 » Fri Nov 08, 2013 5:33 pm

Thanks, i'll look into it.

The idea is for the map to be visible - but it will only reveal the route you have taken so it will grow as the user explores-the idea is to work out a route across the map. At the moment the user is presented with a series of buttons (depending on how many forks there are from that card/dot) The user when has to choose a button to move forward and if it takes them to a dead end then they have to restart.

calmrr3
Posts: 100
Joined: Mon Oct 28, 2013 2:39 pm

Re: Using a map to show location in stack

Post by calmrr3 » Fri Nov 08, 2013 6:55 pm

Also, considering the map is going to be visible on each card, is there a better way to this than grouping all the dots/lines etc then copy pasting it into each card? I want it so that I change the script on one card it changes the script of the map on each card.

Thanks again

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Using a map to show location in stack

Post by jacque » Fri Nov 08, 2013 9:55 pm

Make your map a group. Place it on every card. The single group is now shared everywhere, and changing it will update the display on all cards.

There's a thread going on about this: http://forums.runrev.com/viewtopic.php?f=7&t=17880
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Using a map to show location in stack

Post by dunbarx » Fri Nov 08, 2013 10:08 pm

Hi,

What Jacque said, but I thought you mentioned early on that the map was to be hidden.

Craig

Post Reply