3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Hide Object With array  (Read 205 times)

« on: October 19, 2013, 02:59:46 PM »
Hi.

I have 15 sprite file and I want hidden them sometimes, But I don't want write
iObjectHide (OBJ_X) Function 15 time. there is another way for do it? I think should use array? right?

I read array section in AngleScript Basics 3DRAD, But I Need more explanation about arrays.
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #1 on: October 19, 2013, 03:27:49 PM »
You can consider an array as a list of variables with the same type.
An array is basically short for something like this:

int var1, var2, var3, var4, var5... etc.

So instead you can use this:

int[] var(10);

And refer to them like this:
var[0] = 10;
Or:
myVar = var[5];

etc.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
Pages: [1]