Disabling Specific Events

Non-platform specific questions.

Disabling Specific Events

Postby Conqueran » Tue Aug 30, 2005 8:00 pm

Hey, another question from me. I'm hard at work on my game and it won't dissapoint :). However I need to disable very specific events. For example I'd like to disable the character's attack but, not his movement. (for instance he's in friendly territory and doesn't need his sword)

I saw EventDisable("Warrior", "general event"); anyway I can just disable the sword and not the movement too?

Thanks and I'm buying this software Makslane once I run out of time... Thanks for the 30 days :).
User avatar
Conqueran
 
Posts: 21
Joined: Fri Aug 19, 2005 4:55 pm
Score: 0 Give a positive score

Postby BeyondtheTech » Tue Aug 30, 2005 8:37 pm

I would create a Global variable for that.

Set a Territory value to 0 if he's in friendly territory, and 1 if he's not.

In your KeyDown or MouseButtonDown even that would perform an attack, test the Territory value and only allow the attack if the value was 1.
User avatar
BeyondtheTech
 
Posts: 270
Joined: Wed Mar 30, 2005 6:34 am
Location: Edison, NJ
Score: 4 Give a positive score

Re: Disabling Specific Events

Postby makslane » Tue Aug 30, 2005 8:46 pm

Conqueran wrote:I saw EventDisable("Warrior", "general event");


The correct is:
EventDisable("Warrior", EVENTALL);

Select the vatiable/functions list and select the EventDisable function.
This will open the EventDisable panel, so will don't need to memorize the parameters. (new in the 1.3.1 version)

Thanks and I'm buying this software Makslane once I run out of time... Thanks for the 30 days :).


Thank you too!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron