Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read 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 - VEn0m

Pages: 1 [2]
16
WME sources discussion / Re: entity image sizeX and sizeY
« on: August 24, 2012, 07:09:22 PM »
Problem with .Height is that its work only with region. On image it returns a 0. Or maybe i just use it wrong :)

17
WME sources discussion / entity image sizeX and sizeY
« on: August 24, 2012, 05:06:52 PM »
Hello!!! I know there is no way to get size of entity image. So.. my question is next : is that posible to get image size by editing  GetBoundingRect and adding it to entity?  ::slug

18
Technical forum / Re: Button and .GetControl
« on: July 17, 2012, 06:16:39 AM »
I found the right solution! Just delete static control and left only button music. Thnx a lot :)

19
Technical forum / Button and .GetControl
« on: July 14, 2012, 05:56:23 PM »
Hi! And once again im stuck and need help :)

Well, i have a Options.window there i placed a button "music" and a static control "musicvolume".

The button has a script attached:
Code: WME Script
  1.  
  2. var IsLeftDown;
  3.  
  4. on "LeftClick"
  5. {
  6. IsLeftDown = true;
  7. var dx=Game.MouseX-this.X;
  8.  
  9. while(IsLeftDown==true)
  10.         {
  11.                 //while we holding a left mouse button move the "music" after mouse cursor
  12.                 this.X = Game.MouseX-dx;
  13.                
  14.                 //a border
  15.                 if (this.X<120) this.X=120;
  16.                 else
  17.                 if (this.X>390) this.X=390;
  18.                
  19.                 //set volume 1-100 %
  20.                 RefreshVolume(ToInt(Math.Floor((this.X-120)/270*100)));
  21.                 //refresh text on static control "musicvolume"
  22.                 setstate();
  23.  
  24.                 Sleep(10);
  25.         }
  26. }
  27.  
  28. on "LeftRelease"
  29. {
  30. IsLeftDown = false;
  31. }
  32.  
  33. function RefreshVolume(var volume)
  34. {
  35.   muse.channelVolSet(0,volume);
  36. }
  37.  
  38. function setstate()
  39. {
  40. var buttontext = this.GetControl("musicvolume");
  41. buttontext.X = this.X;
  42. buttontext.Text = muse.channelVolGet(0);
  43. }
  44.  

And i got an error "Call to undefined method 'GetControl'. Ignored." because the button doesn't have method .GetControl.

So. How can i fix the text refreshment while we holding a mouse button?


20
Technical forum / Re: Editor Filter
« on: July 01, 2012, 06:41:40 AM »
Ah, I see what Mnemonic meant by catching the change to the editor. Didn't realize that was possible. Very helpful, thanks :)

For anyone needing this filter, append an equal sign to the operators to capture the letters Aa and Zz: <=, >=


ooops, my bad :) Thnx for fixing!

21
Technical forum / Re: Editor Filter
« on: June 30, 2012, 09:43:16 PM »
Hello Venom, were you able to filter character input? If so, how? I don't want the player to submit only a blank "space" without letters.

this is the "draft" of the filter

Code: [Select]
  var NewEditorText =new String(Editor.Text);
 
  if ((key >= 65 && key <=90) || (key >= 97 && key <= 122)) // A-Z or a-z
  {
  Editor.Text = NewEditorText;
  }
  else
  {
if (key!=8) //backspace
{
var lenght = NewEditorText.Length;
var ClearText = NewEditorText.Substr(0,lenght-1); //remove last digit
Editor.Text = ClearText;
}
  }
 

22
Technical forum / Re: Editor Filter
« on: May 23, 2012, 11:06:31 AM »
Thanx a lot. That helps :)

23
Technical forum / Editor Filter
« on: May 19, 2012, 02:50:05 PM »
Is there any way to make editor filter?

e.g. "Player's name" must contain only letters A-z, but now player can imput any sign including #$@ etc.

24
Technical forum / Custom Game.Talk
« on: May 14, 2012, 03:46:15 PM »
Here is the thing. I've rewritten a standart "Talk". Now when I call Game.Talk it works perfectly. But... Then I try to call it sereral times in a row (e.g. player clicks on the same object several times) this happened:

How can I avoid this mess so that the new-called Game.Talk destroyed the old one?

25
Technical forum / Re: One script and a lot of sprites
« on: May 11, 2012, 06:28:32 AM »
Thank you very much. That's exactly what I was looking for  ::rock

26
Техниче�?кий фор�?м / Re: Много
« on: May 10, 2012, 05:18:42 PM »
Спа

27
Technical forum / Re: One script and a lot of sprites
« on: May 09, 2012, 08:31:07 PM »
Quote
Whats so hard about adding a script to each sprite? It is made automatically, and it just use the

on "LeftClick"
{
this.Visible = false;
}

20+ levels with 10+ sprites... I'm to lazy to do it with each sprite :)

28
Техниче�?кий фор�?м / Re: Много
« on: May 09, 2012, 08:29:04 PM »
Quote

По идее, поможет Game.ActiveObject(), который "Returns the object which is currently under the mouse cursor (or null if there's none)" -

29
Technical forum / One script and a lot of sprites
« on: May 09, 2012, 11:22:07 AM »
I'm making a mini game in a quest. On the scene there are 10+ non-interactive sprite entities's images. The one you click on must disappear. Can I somehow make it by using only one script or I'll have to add a script for each of the sprites?

And once more

Code: [Select]
on "Keypress"
{
  if (Keyboard.IsControl)
  {
  Game.Msg("bla bla");
  }
}
- working

Code: [Select]
on "Keypress"
{
  if (Keyboard.IsAlt)
  {
  Game.Msg("bla bla");
  }
}
-not working.

WTF? 

30
Техниче�?кий фор�?м / Много
« on: May 08, 2012, 06:57:35 PM »
Делаю мини игр

Pages: 1 [2]

Page created in 0.04 seconds with 24 queries.