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


Author Topic: Window animating cube?  (Read 3936 times)

0 Members and 1 Guest are viewing this topic.

SOLO

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • View Profile
Window animating cube?
« on: November 09, 2011, 12:47:10 PM »

Hi,
    I think this is possible but need a little help, I have a window (main MENU window) which looks like a square (cube) what I want to achieve is that on each face of the cube is a menu option - TAKE, LOOKAT, ACTION, OPTIONS

So to start, the player when he opens the menu sees the square (cube) - TAKE then When the player moves the cursor to the right side of the cube a sprite will play that makes it look like the cube is turning and then the next face shows -LOOKAT and then does the same and shows ACTION and then OPTIONS.

Also if the player moves the cursor to the Left it reverves the selection.



Can this be done with scripts and windows? for the main MENU?


Many thanks
Logged
Best Regards
SOLO

SOLO

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • View Profile
Re: Window animating cube?
« Reply #1 on: November 10, 2011, 12:12:48 PM »

 ::wave

42 views and no replies?  :'(

Anyone done anything like this for a main GUI menu in WME?

Logged
Best Regards
SOLO

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: Window animating cube?
« Reply #2 on: November 11, 2011, 02:11:41 PM »

It's possible, but a bit tricky:


First of all, you need to get the coordiantes where the player clicked, for example:

on "LeftClick" {
 var x = Game.MouseX;
 var Y = Game.MouseY;
}

Then, for that Coordinates you have to create all the regions and stuff you need on the Fly, for example for the Cube you would do something like:

Scene.CreateEntity("cube");
var cube = Scene.GetNode("Cube");

Now you can set the X and Y Pos, size, etc. . Same thing goes for regions. You can do all that stuff in a script and attach it to your game / scene whereever you want to load it.

Greets,

Spellbreaker
Logged

SOLO

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • View Profile
Re: Window animating cube?
« Reply #3 on: November 11, 2011, 05:23:43 PM »

Spellbreaker thanks for the info, but I do not want the player to click anywhere.

I want them to open the MENU by a RIGHT CLICK - Done no problem

This shows a square with the first selection - TAKE

Then as the player moves the cursor LEFT/RIGHT the window plays a sprite which depicts the square rotating to the next option - ACTION

and then onto OPTIONS and then onto LOOK.



It is getting the window to understand that if my mouse pointer reaches the edge of the window -SQUARE that it plays a sprite to rotate the square that I am having issues with.



To activate the option displayed will be the LEFT click as normal.




Hope this explains it alittle clearer.  ;D
Logged
Best Regards
SOLO

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Window animating cube?
« Reply #4 on: November 11, 2011, 07:09:07 PM »

You can use the MouseEntry & MouseLeave events (check entity object in documentation) to play an animation when the cursor moves over a entity. Or you can check if mouse has moved to any direction by checking the MouseX & MouseY values. Animation doesn't have to be a sprite. It can also be a 3D cube.
Logged
fl*p
 

Page created in 0.019 seconds with 23 queries.