Horizontal Bar

Talk about making games.

Horizontal Bar

Postby Game A Gogo » Tue May 01, 2007 11:44 pm

How do i make one, since in GE 1.3.7 , The mouse button down overrides the draw actor, the slider moves out of its orbit and it goes off the x scale while dragging...

Any help?
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby makslane » Wed May 02, 2007 12:15 am

What's happen? Can you post a pic?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Game A Gogo » Wed May 02, 2007 12:25 am

ok, here is one.

here is the event that it has:
Code: Select all
y=yprevious;
if(x>50)x=50;
else if(x<-50)x=-50;


And I place Drag on mouse button down
Attachments
untitled.JPG
picture
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby makslane » Wed May 02, 2007 12:39 am

This behavior is different in the 1.3.6 version?
Can you send me the game?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Game A Gogo » Wed May 02, 2007 12:55 am

yes, this behavior is different from 1.3.6.
here is the file.
Attachments
Weird behavior.rar
NO ONE STEAL ANYTHING FROM THIS!
(197.42 KiB) Downloaded 114 times
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby makslane » Wed May 02, 2007 2:04 am

There is no guarantee about the event execution order.
So, is better never assume that a given event in the list will be executed before or after other.


Follow this steps to solve the problem:

1) Remove the 'Mouse Button Down' events with drag
2) Add other 'Mouse Button Down' event and use the 'Follow Mouse' action (x axis)
3) Add a 'Mouse Button Up' event with the action 'Follow Mouse' none
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Game A Gogo » Wed May 02, 2007 11:28 pm

but this only removes the y axis problem...
I will try to find something.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Sgt. Sparky » Thu May 03, 2007 2:22 am

I use this,
make a variable called click(actor variable),
and mouse button down(drag not enabled)
click = 1;

on mouse button up:
click = 0;

on the draw actor event of your actor,
Code: Select all
y = whatever;
if(xmouse > the minimum number you want && xmouse < the maximum number you want)xscreen = xmouse;

:D
(I use this code for my sliders)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Game A Gogo » Thu May 03, 2007 11:52 pm

does it work in the 1.3.7 version? anyhow i have found out a way.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Sgt. Sparky » Thu May 03, 2007 11:53 pm

Game A Gogo wrote:does it work in the 1.3.7 version? anyhow i have found out a way.

use the code in my message above, :lol:
(that is why I posted it.)
even though you found I away. :)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Game A Gogo » Fri May 04, 2007 12:24 am

well, i kinda already used the same way, or did I? no, i just mixed it whit Mksklanes given solution
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Sgt. Sparky » Fri May 04, 2007 12:25 am

:lol: okay. xD
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron