Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, Power_P), 1,065 guests, and 7 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
No Level Change #125320
04/20/07 18:00
04/20/07 18:00
Joined: Apr 2007
Posts: 249
Louisana, USA
Ilidrake Offline OP
Member
Ilidrake  Offline OP
Member

Joined: Apr 2007
Posts: 249
Louisana, USA
I have been doing the FPS tutorial (I have A6 comm) and I can't get the level_change function to work. Everything up to this point works. I have the action and function set up but when I run my player into the map entity it doesn't load the new level. Here is my code.

function level_change()
{
wait(1);
if (EVENT_TYPE == event_impact)
{
my = NULL;
freeze_mode = 1;
level_load("LEVEL2.wmb");
wait(2);
freeze_mode = 0;
}
}

ACTION leave_block
{
my.enable_impact = on;
my.event = level_change;
}

Am I doing something wrong?


Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are

http://spearbang.awardspace.com/news.php
Re: No Level Change [Re: Ilidrake] #125321
04/20/07 18:44
04/20/07 18:44
Joined: Apr 2007
Posts: 249
Louisana, USA
Ilidrake Offline OP
Member
Ilidrake  Offline OP
Member

Joined: Apr 2007
Posts: 249
Louisana, USA
I've found a similair thread. His code is as follows:

function level_change();
{
if (event_type == event_impact)
{
my=null;
freeze_mode = 1;
level_load(level2);
wait(2);
freeze_mode = 0;
}
}
The only diffrence I see is he has no wait above his event_type line and he doesn't have the game name in "". Does this have an affect on the function?


Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are

http://spearbang.awardspace.com/news.php
Re: No Level Change [Re: Ilidrake] #125322
04/20/07 20:14
04/20/07 20:14
Joined: May 2005
Posts: 155
C:\Program files\GStudio6
alphaindigo Offline
Member
alphaindigo  Offline
Member

Joined: May 2005
Posts: 155
C:\Program files\GStudio6
The bit about the levelname not in double inverts means that he(or she lol) has defined the string elsewhere eg.

string level2 = <level2.wmb>;

also in your example you use " instead of <>. lesthanmorethan is used for include strings and also for level strings.


beware the sock! - tLempoary...
Re: No Level Change [Re: alphaindigo] #125323
04/21/07 15:11
04/21/07 15:11
Joined: Apr 2007
Posts: 249
Louisana, USA
Ilidrake Offline OP
Member
Ilidrake  Offline OP
Member

Joined: Apr 2007
Posts: 249
Louisana, USA
Correct. After some consideration I declared the string as a global variable and it works now. Thanks


Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are

http://spearbang.awardspace.com/news.php

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