﻿ puzzle games like jigsaw or turning and cylindrical object to match sequence
• July 22, 2024, 11:12:04 AM
• Welcome, Guest

### News:

Forum rules - please read before posting, it can save you a lot of time.

Pages: [1]

### AuthorTopic: puzzle games like jigsaw or turning and cylindrical object to match sequence  (Read 5187 times)

0 Members and 1 Guest are viewing this topic.

#### uzumaki

• Lurker
• Karma: 0
• Offline
• Posts: 8
##### puzzle games like jigsaw or turning and cylindrical object to match sequence
« on: March 14, 2013, 08:48:51 PM »

hi guys,

i am a starter so i just needed a script for refference for mini puzzle games like turning a stone until it matches the symbol in it and then the door opens or something like and old little artifacts opens up after its been rotated properly to match the symbols ............help friends plz

Logged

#### eborr

• Regular poster
• Karma: 4
• Offline
• Posts: 196
##### Re: puzzle games like jigsaw or turning and cylindrical object to match sequence
« Reply #1 on: March 15, 2013, 08:32:03 PM »

Hi I don't have a specific script to point you at, but what I would suggest that you might do is to do a little research in how to write a puzzle game generically. The reason that I am saying that is that are different "scripts" for different kinds of games. For two dimensional puzzle games where you need to generate different tile sets each time,using WME you need to pull a bit of a stunt because WME only supports one - dimensional arrays.
Logged

#### 2.0

• Regular poster
• Karma: 4
• Offline
• Posts: 217
##### Re: puzzle games like jigsaw or turning and cylindrical object to match sequence
« Reply #2 on: March 15, 2013, 10:35:49 PM »

It's not any problem to create multi-dimensional array via single-dimension one.

Here is the example of two-dimensional array MxN.

Code: WME Script
1. var M = 100;
2. var N = 100;
3. var SomeArray = new Array (M);
4.
5. for (var i = 0; i<M; i=i+1)
6. {
7.   SomeArray[i] = new Array(N);
8. }

For working with this array can be used such functions:

Code: WME Script
1. function Set(var x, var y, var value)
2. {
3.   var a = SomeArray[x];
4.   a[y] = value;
5.   SomeArray[x] = a;
6. }
7.
8. function Get(var x, var y)
9. {
10.   var a = SomeArray[x];
11.   return a[y];
12. }

Hi I don't have a specific script to point you at, but what I would suggest that you might do is to do a little research in how to write a puzzle game generically. The reason that I am saying that is that are different "scripts" for different kinds of games. For two dimensional puzzle games where you need to generate different tile sets each time,using WME you need to pull a bit of a stunt because WME only supports one - dimensional arrays.
« Last Edit: March 15, 2013, 10:41:18 PM by 2.0 »
Logged

#### uzumaki

• Lurker
• Karma: 0
• Offline
• Posts: 8
##### Re: puzzle games like jigsaw or turning and cylindrical object to match sequence
« Reply #3 on: March 19, 2013, 08:30:06 PM »

thanks

ebor will check those in details

you rock
Logged
Pages: [1]

Page created in 0.035 seconds with 20 queries.