Gamestudio Links
Zorro Links
Newest Posts
MRC.c and WFO
by 11honza11. 11/18/25 15:22
webGL
by Ice2642. 11/17/25 21:27
Camera always moves upwards?
by NeoDumont. 11/17/25 09:56
Future of ZorroHFT
by TipmyPip. 11/16/25 13:52
COT Download with Quandl does not work
by Petra. 11/15/25 09:35
Training with the R bridge does not work
by Petra. 11/15/25 09:31
Zorro 2.70
by jcl. 11/15/25 08:43
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, Quad), 32,974 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
SkinnyApe, tritom, sheliepaley, Blueguy, blobplayintennis
19179 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