Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - vadbag

Pages: 1 2 3 [4] 5
46
Hi!

Is there a possibility to preload those random animation sprites?  ??? I'm asking because before a random animation is played the game freezes for a second, obviously to load the animation.

Thanx!  :)

47
Technical forum / Problem with sound package
« on: March 15, 2006, 03:13:56 PM »
Hello.
In my game I have "sound" folder as a separate package. The folder contains subfolders "music" and "sfx". When I run the game from the project manager everything's OK. But when I compile the game and then run it there is no sound, although the sound.dcp exists.

How can I solve this problem?
Thanx!

EDITED: Just noticed that the compiled game also uses Arial font instead of one that I assigned.  :o

48
 ;D ;D ;D

Mnemonic, you are great!  ::rock

Everything works! Thak you very much indeed!

49
Thank you, I got your Idea, but I didn't quite understand what I change.

I tried this
Code: [Select]
         switch(Random(1, 7))
             {
               case 1: actor.ApplyEvent("idle1"); break;
               case 2: actor.ApplyEvent("idle2"); break;
               case 3: actor.ApplyEvent("idle3"); break;
               case 4: actor.ApplyEvent("idle4"); break;
               case 5: actor.GoToAsync(Random (1,800), Random(1,600));
               break;
               case 6: actor.GoToAsync(Random (1,800), Random(1,600));
               break;
               case 7: actor.GoToAsync(Random (1,800), Random(1,600));
               break;
             }

and it didn't work. Then I tried this:
Code: [Select]
      if(!IsIdle)
         {
          // actor enters idle state
          IsIdle = true;
          IdleStartTime = Game.CurrentTime;
          }
       else if(Game.CurrentTime - IdleStartTime > 500) // is the actor idle for 10 seconds?
         {
         actor.ApplyEvent("idle"); break;
         }

Doesn't work either.  :(

Which part exactly should I transfer to my actor's script under on "idle"?

Thanx!

50
I think, I found out what is wrong with the script.  ;D ;D ;D

As you can see:
Code: [Select]
         switch(Random(1, 7))
             {
               case 1: actor.TurnTo(DI_DOWN);
                   actor.PlayAnimAsync("actors\sharik\idle\01\stand.sprite");
                   actor.Direction = DI_DOWN;
                   break;

I use "actor.TurnTo" and it has the same problem as when I was using "actor.PlayAnim". Thanks to Mnemonic for telling me to change this to "actor.PlayAnimAsync"  ;D . The problem occur If the player clicks the mouse while the actor turns. Thus, I desided to use "actor.TurnToAsync". However, now the actor doesn't wait until turning animation is finished and plays random animation. So, turning animation is unnoticeable. I tried to overcome this with adding Sleep(40); 40 is the time required for playing two turn sprites.

Now my code looks like this:
Code: [Select]
         switch(Random(1, 7))
             {
               case 1: actor.TurnToAsync(DI_DOWN);
                   Sleep(40);
                   actor.PlayAnimAsync("actors\sharik\idle\01\stand.sprite");
                   actor.Direction = DI_DOWN;
                   break;

 ::beer What do you think about this new script? Might I improve it in any way?

51
Some news. I have idle.script as a separate file, so I thought that I should try to put the idle.script code inside my actor script. In my actor script I had footstep sounds code. So, I added idle script code and ran the game. After some time of active mouse clicking my actor script stopped running. I think there is either something wrong in the idle.script code that stops it and this "something" is linked to active mouse clicking, or it is a bug in WME.  :(

Any idea?

52
 :( :(

Hmm. The same thing. Tried Game.Msg("Test"); Basically at some point the script just stops running. In the debug mode I see 8 Running scripts in the beginning, and when idle.script stops I have only 7 scripts.

What I can't understand is why it stops.  ???
Any idea, anybody?

53
>btw. this line looks quite suspicious to me: IdleStartTime = actor.Ready;

Originally, it was IdleStartTime = Game.CurrentTime; And I can't remember now why I changed that  ::)

Just changed it back, so far works well, but I'll continue testing, and If there'll be any problem I'll try Game.Msg("Test");

Thank you very much for your time and your help!  ::thumbup

54
 :'( :'( :'(

So, nobody can help me?

55
Technical forum / Re: How do I create THEORA video files
« on: March 12, 2006, 04:48:44 PM »
I guess it depends on the type of compression of the initial file. Some of them convert perfectly, whereas others produce errors.

56
Unfortunately, the problem still exists.  :'( :'( :'(
This time I didn't go to the second scene at all, I just was clicking in different places on the screen quite actively and when I stopped the actor wouldn't play the random animations.
Is it a bug?  :o

57
Thank you for your answer!  ;D

1)I know about 1 second  :D I just put it for the testing purposes, so that I don't wait 10 sec until the actor starts using the script.
2)I'll try GoToAsync.

I put sleep calls temporalily, util I make the random animations. So far they consist of one frame, so I wanted the game to waint for some time. The same with walking. Without the sleep() calls the actor just goes to a point and then immediately performes another animation.

After I posted my problem here, I tested the game several times and found out that it's not just returning to the previous scene. The problem happens at different time during the game. Sometimes I return to the first scene 5 or 6 times and everything works OK.

I think that the script gets interrupted somehow during the game. But I'll try GoToAsync, and see If it helps.

Thanx!

58
Hi again!

Everything was working just fine until I created a second scene. Now when I start the game the random animation script works, then I go to the secod scene, where it also works. However, if I return to the first scene, the script stops working quite often.  :( :( :(

Here is the full code that I'm using:
Code: [Select]
#include "scripts\base.inc"

var IsIdle = false;
var IdleStartTime = 0;

while(true) // endless loop
  {
   if(actor.Ready && Game.Interactive == true) // is the actor doing something?
     {
      if(!IsIdle)
         {
          // actor enters idle state
          IsIdle = true;
          IdleStartTime = Game.CurrentTime;
          }
       else if(Game.CurrentTime - IdleStartTime > 1000) // is the actor idle for 10 seconds?
         {
         IdleStartTime = actor.Ready;
         switch(Random(1, 7))
             {
               case 1: actor.TurnTo(DI_DOWN);
                   actor.PlayAnimAsync("actors\sharik\idle\01\stand.sprite");
                   actor.Direction = DI_DOWN;
                   Sleep(1000);
                   break;
               case 2: actor.TurnTo(DI_RIGHT);
                   actor.PlayAnimAsync("actors\sharik\idle\02\stand.sprite");
                   actor.Direction = DI_RIGHT;
                   Sleep(1000);
                   break;
               case 3: actor.TurnTo(DI_LEFT);
                   actor.PlayAnimAsync("actors\sharik\idle\03\stand.sprite");
                   actor.Direction = DI_LEFT;
                   Sleep(1000);
                   break;
               case 4: actor.TurnTo(DI_UP);
                   actor.PlayAnimAsync("actors\sharik\idle\04\stand.sprite");
                   actor.Direction = DI_UP;
                   Sleep(1000);
                   break;
               case 5: actor.GoTo(Random (1,800), Random(1,600));
               Sleep(1000);
               break;
               case 6: actor.GoTo(Random (1,800), Random(1,600));
               Sleep(1000);
               break;
               case 7: actor.GoTo(Random (1,800), Random(1,600));
               Sleep(1000);
               break;
             }
         }
    }
    else IsIdle = false; // actor is busy; set IsIdle to false
    Sleep(100); // wait for 100 milliseconds
 }

Can anybody suggest how to avoid this problem?

Thanx!

59
Thanks indeed! Works well!  ;D

60
Technical forum / Re: 2 q-s
« on: March 11, 2006, 03:12:01 PM »
Dear Mnemonic,

Just one more thing. In my random animations the actor turns to different directions, but after the animation is finished, he returns to the initial direction. How can I make him to stay in the directions of the random animation?

I tried this:
Code: [Select]
switch(Random(1, 6))
 {
 case 1: actor.PlayAnimAsync("actors\sharik\idle\01\01.sprite") && actor.Direction = DI_RIGHT; break;
 case 2: actor.PlayAnimAsync("actors\sharik\idle\02\02.sprite") && actor.Direction = DI_DOWN; break;
 case 3: actor.PlayAnimAsync("actors\sharik\idle\03\03.sprite") && actor.Direction = DI_LEFT; break;
 case 4: actor.PlayAnimAsync("actors\sharik\idle\04\04.sprite") && actor.Direction = DI_UP; break;
 case 5: actor.PlayAnimAsync("actors\sharik\idle\05\05.sprite") && actor.Direction = DI_LEFT; break;
 case 6: actor.PlayAnimAsync("actors\sharik\idle\06\06.sprite") && actor.Direction = DI_DOWN; break;
 }

But it doesn't work :'( The wme just crashes.
How can I do it?

Pages: 1 2 3 [4] 5

Page created in 0.076 seconds with 20 queries.