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
0 registered members (), 1,251 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Very important question !!!! Please help me :-) #301103
12/08/09 13:59
12/08/09 13:59
Joined: Nov 2009
Posts: 18
D
Daniel_M Offline OP
Newbie
Daniel_M  Offline OP
Newbie
D

Joined: Nov 2009
Posts: 18
Hello.

I have a question.

I am working on a selfmade game with 3dgs.

I have three different level with one mainskript. in mainskript I have also inserted teleport to following levels.
in the last level, it must work with the actions and functions, which exist in underscripts ones.

Can anybody tell me, what I have to do, so that the effects are explained in level, because it appeals only on mainskript

I hope you understand this . My english isnt very well ;-). greets daniel

Re: Very important question !!!! Please help me :-) [Re: Daniel_M] #301108
12/08/09 14:10
12/08/09 14:10
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany

Re: Very important question !!!! Please help me :-) [Re: Lukas] #301119
12/08/09 15:10
12/08/09 15:10
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
don´t load your levels from the mainscript. create a new function with a string parameter to load levels.

That´s more flexibly.

Last edited by Espér; 12/08/09 15:11.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Very important question !!!! Please help me :-) [Re: Daniel_M] #301120
12/08/09 15:14
12/08/09 15:14
Joined: Nov 2009
Posts: 18
D
Daniel_M Offline OP
Newbie
Daniel_M  Offline OP
Newbie
D

Joined: Nov 2009
Posts: 18
hi. thanks for your help. can you show me, how i can write a function in my skript? a example? greets daniel

Re: Very important question !!!! Please help me :-) [Re: Daniel_M] #301124
12/08/09 15:22
12/08/09 15:22
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Code:
STRING* endfile = "#10";

function leveload(STRING *filename)
{
	str_cpy(endfile, filename);
	str_cat(endfile, ".wmb");
	level_load(endfile);
	wait(2);
}


function something()
{
	[...]
	leveload("filename without extention");
	wait_for(leveload);
	[...]
}




Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Very important question !!!! Please help me :-) [Re: Espér] #301125
12/08/09 15:24
12/08/09 15:24
Joined: Nov 2009
Posts: 18
D
Daniel_M Offline OP
Newbie
Daniel_M  Offline OP
Newbie
D

Joined: Nov 2009
Posts: 18
in the last level .. in the script... there are 8 include lines of another scripts for this level.. are the included?

Re: Very important question !!!! Please help me :-) [Re: Daniel_M] #301126
12/08/09 15:26
12/08/09 15:26
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
You could do it like this:

Code:
STRING* level1_map = "level1.wmb";
STRING* level2_map = "level2.wmb";

function change_map(level)
{
  switch( level )
  {
    case 1: level_load(level1_map); break;
    case 2: level_load(level2_map); break;
    default: break;
  }
}



Please excuse me if I made a couple syntax errors or something.

Last edited by Redeemer; 12/08/09 15:26.

Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Very important question !!!! Please help me :-) [Re: Daniel_M] #301127
12/08/09 15:26
12/08/09 15:26
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
yes,

when your #include codes are in the mainscript, they are part of your game and can be started.

But don´t forget:
If you want to start an action or function from your last script, you need to include it BELOW all other scripts

Last edited by Espér; 12/08/09 15:28.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Very important question !!!! Please help me :-) [Re: Redeemer] #301131
12/08/09 15:28
12/08/09 15:28
Joined: Nov 2009
Posts: 18
D
Daniel_M Offline OP
Newbie
Daniel_M  Offline OP
Newbie
D

Joined: Nov 2009
Posts: 18
okay no prob ^^... if i add the name of the level in the first line... .. the script of this level is included right ?^^ sorry for my questions.. but i dont understand this at the moment.. :-)

Re: Very important question !!!! Please help me :-) [Re: Daniel_M] #301132
12/08/09 15:33
12/08/09 15:33
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
no problem..

Yes, the loaded levels can use all functions from the included scripts.
Tipp: Try to read the Tutorial and use the Manual as reference ^^

That should be your first step to understand #include the level_load function and everything else.


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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