Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, dr_panther, Quad), 935 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how do i add this code to my script? #312644
02/25/10 19:11
02/25/10 19:11
Joined: Feb 2010
Posts: 457
Norfolk,England
mikaldinho Offline OP
Senior Member
mikaldinho  Offline OP
Senior Member

Joined: Feb 2010
Posts: 457
Norfolk,England
in my main script i want to place a script that changes the level when the main character collides into a certain block (like running into a time portal) i know it is a template i downloaded,but here is the code i want to add:

Code:
//This is a product of Joey Bee Productions.  Please include in credits.


bmap loading_lv = <blank.bmp>;  //Loading screen
panel loadingscreen {
	bmap = loading_lv;   //loading screen name
	flags = refresh,d3d;
}

function load_level()
{
	loadingscreen.pos_x = (screen_size.x - bmap_width(loading_lv))/2;  //centers loading screen
	loadingscreen.pos_y = (screen_size.y - bmap_height(loading_lv))/2;

loadingscreen.visible = on;  //displays loading screen	
wait(3);
wait(-2);
loadingscreen.visible = off;  //clears screen
bmap_purge(loading_lv); 
LOAD_LEVEL <-->levelname<-->;  //level name 
  
}}


ACTION levelchange //*assign this to a map entity blocking the way out of the level*/!!!!
{

MY.INVISIBLE = ON;       //makes entitie invisible
MY.ENABLE_IMPACT = ON;   //enables player impact
MY.EVENT = load_level;  //function name

}




if you could tell me how to include this into my main script i would be thankful.

regards,
michael

Last edited by mikaldinho; 02/26/10 17:46.
Re: how do i add this code to my script? [Re: mikaldinho] #312663
02/25/10 20:05
02/25/10 20:05
Joined: Apr 2005
Posts: 2,332
Germany, BaWü
aztec Offline

Expert
aztec  Offline

Expert

Joined: Apr 2005
Posts: 2,332
Germany, BaWü
wheres the problem?
just put this code into your current script or use the "include" command <- didnt script for long so I dont know how it actually works just look it up in the dictionary.

Second thing you do is go to WED give the time-portal the action " levelchange" take you player and move it into the portal.

Just modify the script the way you want it wink

regards

Aztec


Visit:
schwenkschuster-design.de
Re: how do i add this code to my script? [Re: aztec] #312864
02/26/10 17:06
02/26/10 17:06
Joined: Feb 2010
Posts: 457
Norfolk,England
mikaldinho Offline OP
Senior Member
mikaldinho  Offline OP
Senior Member

Joined: Feb 2010
Posts: 457
Norfolk,England
thanks aztec- it is just i have never scripted a levelchange code before, so i wont know what to do exactly.

thanks again,
michael.

Re: how do i add this code to my script? [Re: mikaldinho] #312870
02/26/10 17:13
02/26/10 17:13
Joined: Apr 2005
Posts: 2,332
Germany, BaWü
aztec Offline

Expert
aztec  Offline

Expert

Joined: Apr 2005
Posts: 2,332
Germany, BaWü
yeah well I dont blame you for doing this at first but I now noticed that this may be the wrong forum.
I also asked this questions when I was new here.
So you might post it into the scripters-beginner section they are on top of the forum I think (Lite-C /C-script / Wdl)

regards

Aztec


Visit:
schwenkschuster-design.de
Re: how do i add this code to my script? [Re: mikaldinho] #312874
02/26/10 17:17
02/26/10 17:17
Joined: Apr 2005
Posts: 3,076
Germany, NRW
rvL_eXile Offline

3D Artist
rvL_eXile  Offline

3D Artist

Joined: Apr 2005
Posts: 3,076
Germany, NRW
Sleep(2); is old syntax, please use wait(-2); for this!

cYa Sebastian


Tutorials:
[Blender]Terrain creation ENG/GER
[Blender]Low Poly Tree Modeling
[GIMP]Create a Texture for Terrains
CLICK HERE


Re: how do i add this code to my script? [Re: rvL_eXile] #312878
02/26/10 17:45
02/26/10 17:45
Joined: Feb 2010
Posts: 457
Norfolk,England
mikaldinho Offline OP
Senior Member
mikaldinho  Offline OP
Senior Member

Joined: Feb 2010
Posts: 457
Norfolk,England
thanks for the little update- i will edit it in the copy i have on my computer and edit the copy in the code box.


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