Page 1 of 1

Sound2

PostPosted: Wed Nov 01, 2006 10:03 pm
by Marko
I've got a big problem.

if I add events "CREATE ACTOR" and add action PLAYSOUND2 then when the actor creates it plays

music. But if instead PLAYSOUND2 I add a script in which I put the order playsound2 nothing is

heard?!

Shouldn't it be the same?

Marko

PostPosted: Thu Nov 02, 2006 12:48 am
by makslane
Yes, is the same thing.
What's your code?

PostPosted: Thu Nov 02, 2006 9:32 pm
by Marko
A code?

If you mean the code that is in the script actorcreate - that is for now only an order that plays sound2. Later I would put the "if" logic, but first it has to play the sound.

To explain the code (since these are the final phases)

There is an actor that is created. When it is created, sound2 is used from the script, and everything is ok then. After a few seconds that actor is being destroyed. In event "destroy actor" a script is opened that calls different functions and creates new actors.

The actor I have problems with is created through such a function, and, depending on a level, gives an animation saved in that actor. It works fine, but if I put on that actor "on create" and the sound from the script, it doesn't work, and the other one does???

Marko

PostPosted: Fri Nov 03, 2006 1:05 pm
by makslane
Please, post the script that doesn't work.

PostPosted: Sat Nov 04, 2006 5:26 pm
by Marko
Code: Select all
void NewMission(){
 if(level==0){

 DestroyActor("selector");
 DestroyActor("Where_move");
 CreateActor("StartMission", "Helo_in_game", "Game", "no path", 0, 0, true);
 CreateActor("SelectorMission", "kursor_1", "no parent", "no path",xmouse,ymouse, true);
 PlaySound2("data/CompletedMission.wav",Volume, 1, Volume);
 };
 
 if(level==1){
 
 
 DestroyActor("selector");
 DestroyActor("Where_move");
CreateActor("StartMission", "Mission1", "Game", "no path", 0, 0, false);
 CreateActor("SelectorMission", "kursor_1", "no parent", "no path",xmouse,ymouse, true);
 PlaySound2("data/CompletedMission.wav",Volume, 1, Volume);
 };
 
 
 if(level==4){
 
 DestroyActor("selector");
 DestroyActor("Where_move");
CreateActor("StartMission", "ahoy", "Game", "no path", 0, 0, false);

CreateActor("SelectorMission", "kursor_1", "no parent", "no path",xmouse,ymouse, true);
 PlaySound2("data/CompletedMission.wav",Volume, 1, Volume);};
          if(level==lastlevel){

 
 DestroyActor("selector");
 DestroyActor("Where_move");

 CreateActor("StartMission", "demo_podloga", "(none)", "(none)",250, 0, false);
 CreateActor("SelectorMission", "kursor_1", "no parent", "no path",xmouse,ymouse, true);
 PlaySound2("data/CompletedMission.wav",Volume, 1, Volume);
 };
 };


In the Actor "StartMission" the same as the levels change, so does the animations change but nothing can be heard?

THNX!

PostPosted: Sat Nov 04, 2006 7:43 pm
by makslane
Are you calling the NewMission() function in some script?

PostPosted: Sun Nov 05, 2006 5:08 pm
by Marko
In script Destroy Actor

Code: Select all
int xx;
for(xx=0;xx<64;xx++){vidim[xx]=0;atack[xx]=0;}


destroy_all();
level++;


newlevel();
zbraja();

amo+=3;

px=4;
py=7;
MoveTo("Player", 36.000000,255.000000, 1000.000000, "Game");

CreateActor("selector", "kursor2", "no parent", "no path", 0, 0, false);
NewMission();



THNX

PostPosted: Sun Nov 05, 2006 7:30 pm
by makslane
I can't see what's wrong.
Can you send me the game?

PostPosted: Sun Nov 05, 2006 8:18 pm
by Marko
I Can,but the game is too complex,and I think that it isn't
the GM-BUG but it's some my stupid mistake that I hope I could avoid.

Marko

PostPosted: Mon Nov 06, 2006 12:29 am
by Game A Gogo
Marko wrote:I Can,but the game is too complex,and I think that it isn't
the GM-BUG but it's some my stupid mistake that I hope I could avoid.

Marko

Nothing is too complex for makslane, hes the that created GE after all!

PostPosted: Mon Nov 06, 2006 7:02 pm
by Marko
Game A Gogo,I believe it is so, but since I think that it isn't the GE-bug it would be a waste of time for makslane to try to solve my bug problem, which, considering the code (I've got a lot of codes and actors), is not easy to find in five minutes.

Although, I would be very happy if someone would do this instead of me. :roll:

Marko