Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


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]
31
Technical forum / Re: SetCursor() too slow in game_loop.script
« on: November 14, 2008, 01:34:33 AM »
yeah that seems to be the "clean" way, like you said  :) but it also sounds like much of script-code.
i have implemented the cursor handle (for now) in the game.script:

Code: [Select]
  ...
  // item-sensitiven cursor setzen
  else if(ActObj != null) {
    var i=1;
var found=false;
var actualCursor = ActObj.GetCursor();

while(i<allActions.Length) { //suche postion in allActions...
  if(actualCursor == allActions[i]) {
    found=true;
break;
  }
  i=i+2;
}
if (found) { //...wenn gefunden...
  if(i==allActions.Length-1) i=1;
  else i=i+2;
 
  while(i<allActions.Length) { //...setze cursor für nächste, mögliche action
    if(ActObj.CanHandleEvent(allActions[i-1])) {
      ActObj.SetCursor(allActions[i]);
  i=allActions.Length+1;
    }
    else if(i==allActions.Length-1) i=-1;
      i=i+2;
  }
}
else ActObj.ApplyEvent("RightClick");
  } 


allActions is my array with all possible events and the belonging mouse cursors.

Code: [Select]
global allActions = new Array
("LookAt", "sprites\system\lupe.sprite",
"Take", "sprites\system\hand.sprite",
"Talk", "sprites\system\sprechblase.sprite",
"Record", "sprites\system\record.sprite",
"Open", "sprites\system\open.sprite"
);

in the mouse-leave/entry events of the objects i reset the cursor/set the default cursor.






32
Technical forum / Re: SetCursor() too slow in game_loop.script
« on: November 13, 2008, 11:21:23 PM »
i don't exactly remember how it was in overclocked, but yes, you have f.e. an radio. with a rightclick you can change the cursor to look, take, play, record. and, lets say, you have a football - the cursor will change to look, take, kick. in the array i have all possible actions with the belonging mouse cursor (look, mouse1, take, mouse2, play, mouse 3, record, mouse4, kick, mouse 5).

so in my opinion its easy when i want to add an action i only have to add in the array and implement the "on event" in my object.
or perhaps there is an easier way to handle this?

33
Technical forum / Re: SetCursor() too slow in game_loop.script
« on: November 13, 2008, 10:28:03 PM »
yes i agree but it is a "very" lot of work. i thought i could create an array with all possible cursor actions. on rightclick it goes through all possible actions for THIS object (with the CanHandleEvent method) and shows the specified cursor. in the gameloop i set the default cursor for an object (this is the place when the cursor changing is visible for a little (very little :) moment.

i tried to set the sleep in the gameloop to 1 ms, but the changing is still visible, so i make this workaround...
but thanks for your suggest, i will try to make an extra loop for the cursor thing....

i don't know how it is with the performance. now i have only 3 rooms with a little amount (i think 5) of object and 5 possible cursors (but there will be much more in future)
could this be a problem when there are more things in a scene?

34
Feature requests, suggestions / actor.SkipToObject - Method
« on: November 13, 2008, 09:58:41 PM »
there is a GoTo, a GoToObject, a SkipTo but i didn't found a SkipToObject method for the actor.
would this be a problem?

35
Technical forum / Re: SetCursor() too slow in game_loop.script
« on: November 13, 2008, 08:11:55 PM »
hi!

i have the same problem and i think this is because of the Sleep() function in the gameloop.script.  i have got this workaround: in the MouseLeave-event of the object, for which the cursor should change automatically, an "empty" cursor is set (a sprite without an image). so when you enter the active object you will not see the cursor change because of the empty cursor.

36
Bug reports / application error when interact with objects
« on: November 09, 2008, 11:06:45 PM »
hi!

i played a little bit with wme and i get a application error. it happens when i want to interact (lookAt) with an entity object. it has name, caption, a sprite and there is a script with the on "lookAt" event defined (actor.GoToObject... and actor.Talk.....). also i put in a walk to information (x,y and direction). normaly it has to work but after the actor goes to the object, the appliction error occurs.

i have send you the error report.


ok i have solved the problem (before i wrote this thread, but something says me that i should share with you  ;)
there was no image defined in the actors talk.sprite... i put an image there and it worked

isn't it possible to put an default image there?

37
Technical forum / Re: edit and change all in game texts at one place
« on: November 08, 2008, 06:23:14 PM »
ah ok i tried it now and it worked.
thank you

38
Technical forum / edit and change all in game texts at one place
« on: November 07, 2008, 11:14:05 PM »
hi!

first, i'm ingo and new here! so, ehm... hello everybody...

i'm studing the wme tutorials for one week now and wondering that there is no possibility to
change all the in game texts as dialogues and so on in one seperatet place f.e. a text file.
i don't mean the string table, where you can only translate. but what if you want to change a specify
dialog: you have to seek the place in projectman where to change it.
you know what i mean?

Pages: 1 2 [3]

Page created in 0.042 seconds with 23 queries.