Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-23-2006, 07:37 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Major bug: NPC not allowing function calls?

I don't know how to describe this bug.
It's ruining Zodiac's Stealth skill.

Before I explain the bug, it should be noted that this bug just was noticed after the previous Graal update. A similar bug also exists, however, which was there before the update.

When a player uses Stealth, they become unable to unequip/equip/attack with weapons. One weapon, WeaponControl, controls all of these functions.
However, if I update the script of WeaponControl with my RC, the bug will stop effecting players who are already online.

It's hard to explain the problem, like I said.
This is the block to check if the player is attacking, found in WeaponControl:
PHP Code:
function onKeyPressed() {
  if (
keydown(5) && !this.keys) {
    
this.keys true;
    
setTimer(.05);
    if (
CanAttack()) {
      
onAttack();
    }
  }

The weapon doesn't catch the onKeyPressed function after Stealth has been used.

The weapon +System calls 'onEquip' and 'onUnEquip' on WeaponControl to equip/unequip weapons. After using stealth, the +System tries to call the functions in WeaponControl, but WeaponControl doesn't respond.
Yes, they are public.

However, I am able to call 'onEquip' and 'onUnEquip' from my debug NPC.
PHP Code:
findweapon(this.tokens[0]).(@this.tokens[1])(this.tokens[2],this.tokens[3],this.tokens[4]) 
When I call 'onEquip' through my debug NPC, the WeaponControl runs the function.
The +System calls them in the exact same way, but WeaponControl doesn't respond to it.

I find it really weird that WeaponControl isn't acknowledging built-in functions, like onKeyPressed(), though.


The similar, older, bug has to do with the Inventory. After using Stealth for a while, the Inventory stops responding to function calls (including built-in functions). I can't figure out the exact cause of the Inventory bug, though. It seems to just randomly happen.


I'd also like to note that the Stealth NPC has absolutely NO relation to the WeaponControl or Inventory. They have nothing in common, not even variables/flags they check for. Stealth has no relation to any other NPCs.
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.