Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (henrybane), 1,246 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
level question #405486
07/31/12 20:30
07/31/12 20:30
Joined: Dec 2010
Posts: 100
D
Dega Offline OP
Member
Dega  Offline OP
Member
D

Joined: Dec 2010
Posts: 100
Hello I am still slightly new to gamestudio but in Gamemaker I can do alot more even in 3d! However I have noticed that in Gamemaker I can change the room or the "level" but in gamestudio I notice that in SED there is the level_load() function to introduce a WED level to the game. In gamemaker you can go back and forth between a level so if you can do that in gamemaker then how would you do that in Gamestudio where you can go back and forth between any level you want? I am just wondering how it is set up for this software.


boolean my.awesomeness = so true;
Re: level question [Re: Dega] #405488
07/31/12 20:45
07/31/12 20:45
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
If u only want to switch between levels ignoring the placement position of the player then this "activator" could help you
Code:
//skill1 : LevelToLoad 2
action Door_To_Next_Room()
{
 set(my,PASSABLE|INVISIBLE);
 while(!player) wait(1);
 while(vec_dist(my.x, player.x)>80) wait(1);
 if(my.skill1 == 1) level_load("room1.wmb");
 if(my.skill1 == 2) level_load("room2.wmb");
}

if u want to take care where the player should be placed in the new level u could add this "activator" to your map
Code:
//skill1 Level 1
action After_Levelload()
{
 set(my,PASSABLE|INVISIBLE);
 while(!player) wait(1);
 if(my.skill1 == 1) { player.x = 1000;player.y=1400;player.z = 50; }
 if(my.skill1 == 2) { player.x = 100; player.y=140; player.z = 50; }
 wait(1);
 ptr_remove(me);
}




Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: level question [Re: rayp] #405489
07/31/12 20:56
07/31/12 20:56
Joined: Dec 2010
Posts: 100
D
Dega Offline OP
Member
Dega  Offline OP
Member
D

Joined: Dec 2010
Posts: 100
Thanks a million! I am currently reading the manual to learn all I can about Gamestudio. This is like sub-levels right? Also I am assuming this could work with 3 levels right? Wouldn't I just add:

if(my.skill1 == 3) level_load("room3.wmb");


boolean my.awesomeness = so true;
Re: level question [Re: Dega] #405490
07/31/12 21:06
07/31/12 21:06
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
You really should read the manual ^^
3dgs is not like GameMaker. In 3dgs you have two options. One is to learn lite-c. The other option is using the templates. Using templates is like using GameMaker, you use already scripted stuff. So the examples above are working with 1000 levels if you want.

To use the code above u need a player loaded in a level. Before place a sprite to the pos in your map, where the level should be switched. Give this sprite the first action Door_To_Next_Room. Then place another sprite somewhere in the level and assign the action After_LevelLoad. If your player comes close to the first sprite a new map will be loaded. If this map contains a "After_LevelLoad" player will be set to the position. Hope u know what i mean.

Edit: These are just examples there are other ways to handle this.

Last edited by rayp; 07/31/12 21:09.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: level question [Re: rayp] #405492
07/31/12 21:20
07/31/12 21:20
Joined: Dec 2010
Posts: 100
D
Dega Offline OP
Member
Dega  Offline OP
Member
D

Joined: Dec 2010
Posts: 100
I understand thank you. I am also wondering if the After_Levelload() could be put in either a object somewhere in the map or even in the player entity?


boolean my.awesomeness = so true;
Re: level question [Re: Dega] #405493
07/31/12 21:22
07/31/12 21:22
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
After_LevelLoad how i called it, is a map object yes, not the player. A sprite or a model in your wmp/wmb map file.

Edit: If u reload your player-script in each map u can use this after_levelload directly in the players code yes.

Last edited by rayp; 07/31/12 21:48.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;

Gamestudio download | chip programmers | 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