Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,699 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: changing the level once my character reaches a certain posiiton [Re: Cactus] #234678
11/04/08 07:07
11/04/08 07:07
Joined: Sep 2004
Posts: 130
Italy
Alessandro Offline
Member
Alessandro  Offline
Member

Joined: Sep 2004
Posts: 130
Italy
Generally speaking, put an initialization code in a separated function, and call it just after every level is loaded. In this way you can quickly restore/setup any object for any loaded level (you can use a "switch" statement to apply changes):

(I didn't test the following code, use it only as a guideline):

Code:
#define LEVEL_1   1
#define LEVEL_2   2
#define LEVEL_3   3

function initGame(int argNewLevel) {
  switch( argNewLevel ) 
  {
    case LEVEL_1:
        // WRITE CODE TO INITIALIZE LEVEL 1;
        break;
    case LEVEL_2:
        // WRITE CODE TO INITIALIZE LEVEL 2;
        break;
    case LEVEL_3:
        // WRITE CODE TO INITIALIZE LEVEL 3;
        break;
  }
}


Re: changing the level once my character reaches a certain posiiton [Re: Alessandro] #234762
11/04/08 16:23
11/04/08 16:23
Joined: Apr 2004
Posts: 77
USA
Cactus Offline OP
Junior Member
Cactus  Offline OP
Junior Member

Joined: Apr 2004
Posts: 77
USA
thanks, and xarthar nvm the code did work I just messed up,thaks alot.


HI
Page 2 of 2 1 2

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1