Using Array to store tile map

Hi,

I’m building a script that allows 2 team to fight over a bridge.

One team constructs the bridge, the other destroys it.

I’m using board[]=x command to build the bridge, and it works so far.

However, i’d like to store the initial tile display of the level in an array that can be accessed by using var[i], or even better var[i,j], so I can destroy the bridge by reconstructing the original tiles.

Can this be done in graal 2.2.2?

If so, how?

And lastly, can you store such a var serverside?

Thanks again for your help!!

Fun idea

Can gs1 handle 2d arrays? @tricxta

[QUOTE=hosler;103680]Can gs1 handle 2d arrays?[/QUOTE]
Any system that can handle arrays can handle any-dimension arrays. Is there support for the syntax? I don’t remember.

Great

Can’t you use something like how Shiny stores tiles for hammer?

http://forums.graal.in/forums/showthread.php?1760-Hammer

What Spooon said(in relation to Shiny’s hammer) is as good as you’re going to get. Don’t let that dishearten you however, this kinda thing you’re trying to make is very achievable within the confines of GS1 so just stick with it.

If this is the same action as the hammer / shovel… why wouldn’t the tiles revert in ~20 seconds?

[QUOTE=Kelathos;103714]If this is the same action as the hammer / shovel… why wouldn’t the tiles revert in ~20 seconds?[/QUOTE]

The tiles that respawn are built into the gserver and thus you only need to replace them initially, the gserver will recognise this and replace them when the time comes. This is different however, as both destroying and respawning need to be accounted for through script.

Well, this just means i’m going to have to build the tile map myself for each specific level.

It’s really not that bad, it should take about 20 mins to code it manually.

I could also make a javascript app to generate the code for me from the level file if I feel the need to do this at many places.

Kelathos and I have been enhancing Classic a lot, at some point we should make an event for a huge football game, gang wars, farming session or simply so you can try out our improved classic :stuck_out_tongue:

Im down