Event disable

Game Editor comments and discussion.

Event disable

Postby Azou » Fri Jan 11, 2008 3:45 pm

Hi!! I wanted to ask a question:how to make that even if we put the event disable action,we will be just be able to walk,not else,not more?? :D
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Event disable

Postby Kalladdolf » Fri Jan 11, 2008 3:49 pm

event disable means:
the event won't work on the actor anymore.
if you make:
event disable -> key down,

the actor will ignore all the buttons you press.
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Event disable

Postby Troodon » Fri Jan 11, 2008 5:45 pm

But you can use a canWalk variable just like the famous canJump. :D
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: Event disable

Postby Azou » Fri Jan 11, 2008 8:34 pm

So i wil do:
canWalk=1;
x = x + 3;
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Event disable

Postby Kalladdolf » Fri Jan 11, 2008 9:51 pm

if you want to make the action dependent on the variable, make the code:
Code: Select all
if(canwalk ==1)
{x +=3;}
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Event disable

Postby Bee-Ant » Sat Jan 12, 2008 8:45 am

This is the friendly code
Code: Select all
if(canwalk==1)
{
    if(right==1)
    {
        x+=3;
    }
    if(right==0)
    {
        x-=3;
    }
}
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Event disable

Postby Azou » Sat Jan 12, 2008 9:37 am

Thanx,Kalladdolf and Bee-Ant!! :D
:mrgreen:
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Event disable

Postby Bee-Ant » Sat Jan 12, 2008 9:41 am

:mrgreen:
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Event disable

Postby Troodon » Sat Jan 12, 2008 9:51 am

What about me?? :(

:lol: Ok, Bee-Ant code was 11 lines. This makes the same thing but is only 2 lines. :D

Code: Select all
if(canwalk==1 && right ==1) { x+=3; }
if(canwalk==1 && right ==0) { x-=3; }


8)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: Event disable

Postby Bee-Ant » Sat Jan 12, 2008 9:57 am

just 1 line
Code: Select all
if(canwalk==1&&right ==1){x+=3;}if(canwalk==1&&right==0){x-=3;}
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Event disable

Postby Troodon » Sat Jan 12, 2008 10:09 am

That was 62 symbols. Here is 61 symbols.
if(canwalk==1&&right==1){x+=3;}if(canwalk==1&&right==0){x-=3;}
Or make the actor feel himself more free by changing the variable name to can.
if(can==1&&right==1){x+=3;}if(can==1&&right==0){x-=3;}
Only 48 symbols. :lol:
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: Event disable

Postby Bee-Ant » Sat Jan 12, 2008 10:27 am

42 symbols... :P
Code: Select all
if(c==1&&r==1){x+=3;}if(c==1&&r==0){x-=3;}
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Event disable

Postby Troodon » Sat Jan 12, 2008 10:43 am

But GE doesn't allow just c as variable name doesn't it?
But check this:

if(can==1){x+=3;}if(can==-1){x-=3;}
32 symbols

We don't count draw actor code doesn't we? :lol:

Ok, I guess the codes in the up are more usefull for Azou. :lol: So let's stop this competition. :lol:
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: Event disable

Postby Bee-Ant » Sat Jan 12, 2008 10:45 am

ah...I lose :cry: :P
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Event disable

Postby Azou » Sat Jan 12, 2008 6:07 pm

tekdino wrote:What about me?? :(

:lol: Ok, Bee-Ant code was 11 lines. This makes the same thing but is only 2 lines. :D

Code: Select all
if(canwalk==1 && right ==1) { x+=3; }
if(canwalk==1 && right ==0) { x-=3; }


8)

OOPPSSS :oops:
Sorry,my Coach!! I forgot you :oops:
Do you forgive me? :P
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Next

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron