Page 1 of 1

Disabling Specific Events

PostPosted: Tue Aug 30, 2005 8:00 pm
by Conqueran
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 :).

PostPosted: Tue Aug 30, 2005 8:37 pm
by BeyondtheTech
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.

Re: Disabling Specific Events

PostPosted: Tue Aug 30, 2005 8:46 pm
by makslane
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!