Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

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 - robot

Pages: 1 [2] 3
16
Technical forum / Re: music loop ran out of sync
« on: May 10, 2010, 09:28:44 PM »
about 200 ms after one minute. but now i notice something interesting: my wav file is 2594 ms.
now i took a wav file with about 1 minute length and it was syncron. so it looks to me that there
must be a very small delay when looping the sound with PlayMusicChannel; maybe less than 1 ms...

i also tested it playing the two wav files (the same noise but one is longer) at the same time:

Code: [Select]
Game.PlayMusicChannel(0,"takt.short.wav",true);
Game.PlayMusicChannel(1,"takt.long.wav",true);

after a while you can hear the difference...

17
Technical forum / Re: music loop ran out of sync
« on: May 09, 2010, 10:14:05 PM »
thanks mnemonic for your answer but no, its the same problem with WindowsTime.
hmm, that means that both timers didn't work correctly!?


18
Technical forum / Re: Making Objects move by Script
« on: May 08, 2010, 06:14:01 PM »
you need to implement a event on "LeftClick" in your object script.

then if you want to move it to other position use entity.X=<new x coordinate> and entity.Y=<new y coordinate> methods.
if your object is an actor use actor.GoTo() or actor.SkipTo()

i suggest looking into documentation

19
Technical forum / music loop ran out of sync
« on: May 08, 2010, 03:16:37 PM »
hi there!

i would like to implement an rythm game so i learned something about the music functions and read some threads about it. unfortunatly there are not so many of them
like http://forum.dead-code.org/index.php?topic=3269.0

i see that the Get- and SetMusicPosition method doesn't work correctly so i use the Game.CurrentTime method for synchronisation like Mnemonic has suggested in some threads.
and it seems to work very exactly at the beginning but after a while it runs out of sync. to show you the problem i have following code:

first i play the loop sound:

Code: [Select]
Game.PlayMusicChannel(0,"takt.wav",true);
then i run a loop where an "X" will be written every time the music loop starts from the beginning

Code: [Select]
  var len = Game.GetSoundLength(Game.GetMusicChannel(0));
  var time = Game.CurrentTime;

  while(true)
  {
    if(Game.CurrentTime-time >= len)
    {
      time = Game.CurrentTime;
      Game.Msg("X");
    }
    Sleep(1);
  }


i ran this script and after a few minutes the "X" won't be written exactly at the loopbeginning. it totally ran out of sync.
so first i thought the GetSoundLength() didn't work correctly but in my opinion it does. i checked the wav file in my
cubase and its the same lenght like wme says (2594 ms).
so i wonder what causes this behaviour. maybe the Sleep() method? does the CurrentTime stops when calling the Sleep()?

i know this is a very special problem or maybe i'm working in a totaly wrong direction? ;D

20
hi there! i have the same problem here, do you have a solution for this problem, soundguy?
or at least a workaround?

21
Technical forum / Re: a question about rotation of entities
« on: November 01, 2009, 11:04:31 PM »
ok thanks.

thought there would be an easier way  :-\

22
Technical forum / Re: a question about rotation of entities
« on: November 01, 2009, 10:46:06 PM »
thanks for your answer. so you calculate the rotation and set the four points for the region entity by script, hmm...
it seems to me that this only will work for square images. in my case the image is a tree with transparency so when
i draw a dynamic region entity for the tree, it will have much more than 4 points and so the calculating will be much
more complicated  ???

or does it work also for non-square images?

23
Technical forum / a question about rotation of entities
« on: November 01, 2009, 07:16:27 PM »
hi!

i have an entity (f.e. a tree). a script which is attached to it triggers all leftclicks on the tree.
so far so good, but when i rotate the tree and click to the top of the tree (which is now on the ground) it doesn't trigger any leftclick
do i miss something or is this not possible?

thx

24
Technical forum / Re: Cursor Combined
« on: April 30, 2009, 03:39:47 PM »
hi!
i have now the same problem and want to ask if there is another workaround in the meantime than to create a new sprite for each item?
it is because i have now a lot of items and it would be much easier to change only the coordinates for example.
you know what i mean? is this possible?

25
Technical forum / Re: z-order problems again
« on: December 12, 2008, 06:36:40 PM »
hi! i think z-order only works for free entities
see http://forum.dead-code.org/index.php?topic=2365.0

26
Technical forum / Re: window as part of the scene
« on: December 11, 2008, 07:41:08 PM »
mhm i understand. but the thing is i wanted to use labels in this window which i can change dynamicaly. i think this is not possible with entities and i didn't found something else...
but thank's for your reply now i know that i waste my time with windows  :)

27
Technical forum / window as part of the scene
« on: December 10, 2008, 10:19:26 PM »
hi!
is it possible to make a window a part of a scene? what i want to do is to display the window behind sprites, actors... (i use the window as a kind of monitor display on the wall)
i have tried to play a little bit with the z-order (movebefore, moveafter...) but nothing seems to happen here, so i want to ask if i wast my time.

28
Technical forum / Re: Events in attached scripts
« on: November 14, 2008, 04:34:24 PM »
oh thanks a lot. i think i'm working to long on it...

29
Technical forum / Re: Events in attached scripts
« on: November 14, 2008, 03:24:06 PM »
this is the code for the first script:

Code: [Select]
#include "scripts\base.inc"

Game.AttachScript("scenes\04_wegweiser\scr\zelt_talk.script");
Game.Msg(this.CanHandleEvent("Talk"));

on "LookAt"
{
 ...


the second one (zelt_talk.script)

Code: [Select]
#include "scripts\base.inc"


////////////////////////////////////////////////////////////////////////////////

on "Talk"
{
  ...
}


the CanHandleEvent gives me still false  ???

30
Technical forum / Events in attached scripts
« on: November 14, 2008, 02:39:35 PM »
i have a question and i don't know if this is a bug or not:

ok, there is a script attached to an object in the scene editor.
in this script there is another script attached (with the attachScript method). i have implemented a on "talk" event there.

now my problem is that ....this.CanHandleEvent("Talk").... in the first script gives me false.
i thought wme is script multitasking or is it only possible to handle the events in only one script (which is applied in the scene editor)
you know what i mean?

Pages: 1 [2] 3

Page created in 0.079 seconds with 20 queries.