disable single key instead of all keys?

Talk about making games.

disable single key instead of all keys?

Postby stevenp » Tue Jan 22, 2008 3:38 am

is it posible to disable a single key or mouse button, instead of disabling all of them?

the reason is because, my character uses the left and right mose buttons to cast his skills, when he uses his fireball skill i disable his mouse event down for 2 seconds, but that means he wont be able to use his other skill, and thats a problem
User avatar
stevenp
 
Posts: 403
Joined: Sat Dec 22, 2007 12:49 pm
Location: canada, ontario
Score: 16 Give a positive score

Re: disable single key instead of all keys?

Postby DilloDude » Tue Jan 22, 2008 3:53 am

You can't just disable a single key or mouse button with an event, you'll have to script it yourself using a variable (but for your case I would prefer that anyway).
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Re: disable single key instead of all keys?

Postby stevenp » Tue Jan 22, 2008 4:35 am

its driving me insane...
Last edited by stevenp on Tue Jan 22, 2008 12:37 pm, edited 1 time in total.
User avatar
stevenp
 
Posts: 403
Joined: Sat Dec 22, 2007 12:49 pm
Location: canada, ontario
Score: 16 Give a positive score

Re: disable single key instead of all keys?

Postby Kalladdolf » Tue Jan 22, 2008 8:35 am

actor -> key down -> up -> script editor
Code: Select all
if(enable == 1)
{//movement action;}

then if you set the enable variable to another numbe, this key won't work anymore.
simple as that :)
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: disable single key instead of all keys?

Postby stevenp » Tue Jan 22, 2008 1:51 pm

got it to work ^_^
User avatar
stevenp
 
Posts: 403
Joined: Sat Dec 22, 2007 12:49 pm
Location: canada, ontario
Score: 16 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest