|
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
OP
Newbie
|
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
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
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
OP
Newbie
|
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
Expert
|
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...
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|