Page 1 of 2

Compiled version doesnt work as in GE

PostPosted: Thu May 10, 2007 11:34 pm
by d-soldier
... I'm about finnished with my current game, and I'm doing dome beta testing of my own, and as such I compiled it to windows exe, and have since noticed problems. For instance, when my player is killed, an activation event is sent to my LifeCounter, which (if more then 0) creates the player again, or (if equal to 0) the game over actor. Works great while playing in GE... but when compiled (and the player is killed) it creates two new players on the screen, and when the LifeCounter is at 0, it creates the GAMEOVER actor, but still continues to create players as well... I dont understand why it works perfectly while in GE, but is all messed up when compiled... anyone else had issues like this?

PostPosted: Thu May 10, 2007 11:40 pm
by makslane
Send me the game, I will see what's happen.

PostPosted: Fri May 11, 2007 12:03 am
by Game A Gogo
The only way to resolve this problem (for now) is doing it in other ways, happened to me in OmegaPong.

Like the Timer actor wasn't getting destroyed correctly, all I did is add a second destroy actor and it worked perfectly ect...

...

PostPosted: Fri May 11, 2007 12:43 am
by d-soldier
Yep, that seemed to fix it... I had to run a series of activation events through a completely different actor to destory the timer... strange that the normal destroytimer event works fine while in GE but not in the compiled version...

PostPosted: Fri May 11, 2007 12:57 am
by d-soldier
well... fixed one problem anyways... The compiled version still continues to create the player when there are no lives left (along with creating the gameover actor..) Heres my script:

if(text_lives.textNumber>0) //also tried ">=" just in case
{
text_lives.textNumber -= 1;
CreateTimer("Event Actor", "1second", 1000);
}
else if(text_lives.textNumber==0) //also tried "<1" & "<=1" just in case
{
speed = 0;
CreateActor("gameover", "gameover_00000", "(none)", "(none)", 0, 0, true);
PlaySound2("data/wav_hitmetal.wav", 1.000000, 1, 0.000000);;

}

---- anyone?

PostPosted: Fri May 11, 2007 1:23 am
by Game A Gogo
you say it creates it two times when it has lives left and one when it doesn't?

PostPosted: Fri May 11, 2007 1:28 am
by Sgt. Sparky
d-soldier wrote:well... fixed one problem anyways... The compiled version still continues to create the player when there are no lives left (along with creating the gameover actor..) Heres my script:

if(text_lives.textNumber>0) //also tried ">=" just in case
{
text_lives.textNumber -= 1;
CreateTimer("Event Actor", "1second", 1000);
}
else if(text_lives.textNumber==0) //also tried "<1" & "<=1" just in case
{
speed = 0;
CreateActor("gameover", "gameover_00000", "(none)", "(none)", 0, 0, true);
PlaySound2("data/wav_hitmetal.wav", 1.000000, 1, 0.000000);;

}

---- anyone?

sometimes script does not matter unless you must constantly destroy the player because GE for some reason in the windows .exe files will create the actor when it is destroyed at its current position or at the x 0 and y 0 position. :(
(I have not had this problem in the new version! :D)

no

PostPosted: Fri May 11, 2007 1:29 am
by d-soldier
GAME-A-GOGO:

It did, but routing a (another) destroytimer event stopped it from making two... now it continues making one (like it should) even after the counter is at 0 (which it shouldnt).. It's like the textnumber has no effect, but the code obviously works, becuase the gameover actor is created when there are 0 lives left... but so is the player, though he shouldnt be..
Sparky:

Okay... so whats the fix then?

PostPosted: Fri May 11, 2007 1:30 am
by Sgt. Sparky
I posted,
but I do not see a destroy actor event for your player...?

PostPosted: Fri May 11, 2007 1:33 am
by d-soldier
When the player is destroyed, it sends an activation event to the LivesCounter actor. The code above is the Activation event for the LivesCounter when it receives that event.

PostPosted: Fri May 11, 2007 1:42 am
by Game A Gogo
d-soldier, try adding a destroy actor in the script.

Sometimes, to make things work, it has to be twisted xD

eh

PostPosted: Fri May 11, 2007 1:51 am
by d-soldier
The problem isnt that the player isn't being destroyed, this entire event only occurs when he IS destroyed, and it doesn't happen while playing the game in GE, only in the compiled version. And if I did have a destroyplayer event in there, the LivesText object would be "-1" and look really unprofessional... hmm.. is there a way to script that text object that 0 is the lowest number it can display? maybe?

i might be able to fix it...

PostPosted: Fri May 11, 2007 6:33 am
by kyensoftware
I might be able to fix it.
I just have a Q for Makslane:
In Windows EXE export, does it export 16-bit or 32-bit?
If it is 16-bit, it is prob an integer error. (it has to do wit binary. Commodore 64, processor registers are 8-bit bytes, DOS/Early Linux/UNIXes 16-bit processor registers and finnaly 32-bit windows. then there is 64-bit, that ge dosnt work with (in windows, it dosnt, in linux, it does!)that has 64-bit bytes.)
Sorry if you dont understand, d-soldier, i am sorry.
Makslane should understand.
I got it to run on Win 95 and 98, 95 being 16-bit, and 98 being both. Then again, XP has a 16-bit startup, and system core error thingy!
You are probably all scratching your heads now... :wink:
Good Luck fixing!

Re: i might be able to fix it...

PostPosted: Fri May 11, 2007 2:37 pm
by makslane
kyensoftware wrote:In Windows EXE export, does it export 16-bit or 32-bit?


32bits

so

PostPosted: Fri May 11, 2007 10:30 pm
by d-soldier
So does anyone know how to script a text object so that 0 is the lowest number is displays (never goes negative?)