Hopefully a simple question

Mike Bonner bonnmike at gmail.com
Thu Sep 23 21:36:50 EDT 2010


Pulling out sections for view is part of the plan, after experimenting more,
setting imagesource for my map is probably not on the "good idea" list, so
i'm going to experiment with the button idea, thank you much.  Might
experiment with the same thing in a datagrid just for practice.

Think if I store the map in an array as you suggest, I can also store
location cues like chance of random spawn, treasure level and the like.

I'm off to experiment, tyvm for your suggestions, really appreciated.

On Thu, Sep 23, 2010 at 7:25 PM, Monte Goulding <monte at sweattechnologies.com
> wrote:

> > Would a datagrid be a better method for this? With a row template of 9
> tile
> > size images viewing 9 rows, and use fillindata to choose what imagadata
> to
> > set each row tile to.. I was thinking this might work pretty well as I
> will
> > only have to worry about the charoffset for each data row, and the
> datagrid
> > will handle which rows are displayed.
>
> Hi Mike
>
> I'd suggest using 9 transparent buttons grouped and use icons and image
> names. Then your group could have get and setprop handlers to handle
> multi-dimensional arrays.
>
> -- group script
> getProp map
>        return the customProperties["map"] of me
> end map
>
> -- pMap is a multi-dimensional array representing your map
> -- pMap[1][1] = the top left corner
> -- btn names are 1,1.. 9,9
> setProp map pMap
>        repeat with tRow = 1 to 3
>                repeat with tColumn = 1 to 3
>                        set the icon of btn (tRow,tColumn) to the short id
> of image pMap[tRow][tColumn]
>                end repeat
>        end repeat
>        set the customProperties["map"] of me to pMap
> end map
>
> You could have a larger world map also and this 9x9 view could just display
> sections of it.
>
> Cheers
>
> --
> Monte Goulding
> M E R Goulding Software Development
> Bespoke application development for vertical markets
>
> InstallGadget - How to create an installer in 10 seconds
> revObjective  - Making behavior scripts behave
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list