Gamestudio Links
Zorro Links
Newest Posts
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
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, TipmyPip, 7th_zorro), 879 guests, and 4 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
level change crashed with video #437408
02/15/14 23:56
02/15/14 23:56
Joined: Apr 2006
Posts: 28
LB, CA, USA
WINBERRY Offline OP
Newbie
WINBERRY  Offline OP
Newbie

Joined: Apr 2006
Posts: 28
LB, CA, USA
I have 3 levels which I can go back and forth pretty cleanly.
However, when I had a media_loop to show an *.avi" as a "drive in movie" screen, the level plays fine, I can even delete the video, but when I got to change levels, I crash. removing the video remove the crash. I am quite sure I am missing something about clearing memory, but I can't figure out what it is...and help would be greatly appreciated

thanks

Re: level change crashed with video [Re: WINBERRY] #437409
02/16/14 00:51
02/16/14 00:51
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Quote:
I can even delete the video

What do you mean exactly?
What kind of crash do you get (precisely)?
Have you tried to use sys_marker() to locate the crash?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: level change crashed with video [Re: Superku] #437427
02/16/14 18:49
02/16/14 18:49
Joined: Apr 2006
Posts: 28
LB, CA, USA
WINBERRY Offline OP
Newbie
WINBERRY  Offline OP
Newbie

Joined: Apr 2006
Posts: 28
LB, CA, USA
Thanks for responding!

I have 3 levels that I can go back and forth to via PUSH against an object with a "load_level" .

Each level initiates with an ENTITY*

action triggerLevel1()
{
while (!player) {wait (1);}

set (my, POLYGON); // use accurate collision detection
my.emask = ENABLE_IMPACT | ENABLE_ENTITY | ENABLE_PUSH |ENABLE_SHOOT;
my.event = setupLevel1;
my.push = 1;
set(my,ENABLE_PUSH);

}

....and the ENTITY* goes to a SETUP function:

function setupLevel1()
{

if (you != player) {return;}

wait(1);
level_load("2014BO1.wmb");
wait(1);

}


I want to display a different video on each level
I am using a global:
ENTITY* myVIDEO1

function setupLevel1()
{

if (you != player) {return;}

wait(1);
level_load("2014BO1.wmb");
wait(1);
myVIDEO1 = media_loop(VID,bmap_for_entity(my,0),100);

}

...however, when I add the video (I can add and remove IMAGES& AUDIO with no problem)
It will crash when I PUSH THE ENTITY of the NEXT LEVEL

Also, I have never uses sys_Marker() as I hven't been able to figure it out

NOTE: my entie educaiton on level changing has come from 1 tutrial of the GameStudio Magazine, back in #28

thanks for any help you might have.

Re: level change crashed with video [Re: WINBERRY] #437431
02/16/14 20:50
02/16/14 20:50
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You're attempting to play a video on the surface of an entity that no longer exists. When you call level_load the entity execution setupLevel1 gets removed. Hence executing bmap_for_entity(my,0) one frame later will crash.

Please use code tags when posting code.


Always learn from history, to be sure you make the same mistakes again...
Re: level change crashed with video [Re: Uhrwerk] #437461
02/17/14 16:09
02/17/14 16:09
Joined: Apr 2006
Posts: 28
LB, CA, USA
WINBERRY Offline OP
Newbie
WINBERRY  Offline OP
Newbie

Joined: Apr 2006
Posts: 28
LB, CA, USA
Got it working...thanks for the help!


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