Problem

Game Editor comments and discussion.

Problem

Postby NightOfHorror » Thu Mar 29, 2012 11:34 am

I have a canvas over all my actors in a sub-game I am working on to make it disable all events. Then there is a canvas over the actors that when you click on them they disable the canvas, but disable some events and enable some. When I click on one of the actors, I am supposed to be able to move left and right or up and down depending on which one it is. Unluckily, all events are still disabled. Sorry, I just never learned much on canvas.
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Problem

Postby SuperSonic » Thu Mar 29, 2012 1:58 pm

I'm not exactly sure what you are trying to accomplish. It sounds like you're wanting to change players by clicking on them? Could you upload your ged maybe? :D

Also, it's not a good idea to use DisableEvents(). Try using if statements and variables instead. For example:

global code
Code: Select all
int Player1CanMove;


Player1 key down -> right:
Code: Select all
if(Player1CanMove)
{
    x += 1;
}
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: Problem

Postby skydereign » Thu Mar 29, 2012 5:59 pm

Using EventDisable isn't a bad thing to do, as long as you keep it simple. It works just like you would if you were destroying and creating the different players, without actually disabling them. But it sounds like what you are doing with canvas is completely nonsensical. First of all, why canvas? It sounds like you should just be using a filled region for this. But, if you want to be able to click an actor after it has been disabled, you need to either enable it from another actor's event, or to enable mouse button down event after disabling all events. But I would recommend doing from another actor.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Problem

Postby NightOfHorror » Fri Mar 30, 2012 1:11 pm

I found out my mistake. It was simple really, the BIgCanvas well disabled all events on every actor, so it disabled the MouseDown event. uhm, well, I guess all I can say is thank you for advise. I am a noob. :lol:
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Problem

Postby SuperSonic » Fri Mar 30, 2012 2:12 pm

NightOfHorror wrote:uhm, well, I guess all I can say is thank you for advise. I am a noob. :lol:

Hey, even a programming God can make mistakes too haha ^^
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: Problem

Postby NightOfHorror » Fri Mar 30, 2012 9:43 pm

well, in that case, sky, gogo, mak, and akr, what mistakes do you do?
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Problem

Postby Game A Gogo » Mon Apr 02, 2012 1:07 pm

Typos, sometimes in C++ I forget to have a corresponding delete for a new function, which causes memory leaks :P
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

Re: Problem

Postby Hblade » Mon Apr 02, 2012 4:29 pm

I deleted the post that someone placed a warning on.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Problem

Postby Game A Gogo » Mon Apr 02, 2012 6:25 pm

Thanks, that was me... It looked suspicious S:
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

Re: Problem

Postby Hblade » Mon Apr 02, 2012 7:19 pm

That user looks suspicious, he posted another seemingly useless post, acting as if the post was directed to --him-- he said "Thanks for sharing this post with......... me..."

-__-
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest