Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-03-2006, 10:44 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
"hidden" Variable for Weapons

It would be greatly appreciate if a built-in "hidden" variable was added so weapons can be made invisible to the default weapons menu without adding a negative in the weapon name. Doing so makes it a hassle when calling a public function on a hidden weapon since you must use the makevar() function due to the negative, it would be must easier to not have to use it.
__________________
Reply With Quote
  #2  
Old 01-03-2006, 11:23 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
PHP Code:
CoolHiddenWeapon = (@"-CoolHiddenWeapon");
CoolHiddenWeapon.GaspPublicFunction(); 
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #3  
Old 01-03-2006, 11:43 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Inverness
It would be greatly appreciate if a built-in "hidden" variable was added so weapons can be made invisible to the default weapons menu without adding a negative in the weapon name. Doing so makes it a hassle when calling a public function on a hidden weapon since you must use the makevar() function due to the negative, it would be must easier to not have to use it.
Why not use findweapon?
Reply With Quote
  #4  
Old 01-03-2006, 02:15 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Inverness
It would be greatly appreciate if a built-in "hidden" variable was added so weapons can be made invisible to the default weapons menu without adding a negative in the weapon name. Doing so makes it a hassle when calling a public function on a hidden weapon since you must use the makevar() function due to the negative, it would be must easier to not have to use it.
I agree with Lance. As he's said before, using findweapon() removes ambiguity.
__________________
Skyld
Reply With Quote
  #5  
Old 01-06-2006, 01:42 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
You don't get it, I don't want to have to use any type of function to access the weapon.
just WeaponName.function() instead of findweapon(weaponname).function();
It just looks better the first way.
Quote:
Originally Posted by ApothiX
PHP Code:
CoolHiddenWeapon = (@"-CoolHiddenWeapon");
CoolHiddenWeapon.GaspPublicFunction(); 
I already use that in scripts, however variables without leaders are global and using this.varname.function(); just looks bad to me :P
While serverside global variables work fine, clientside global variables work sometimes and sometimes not, i'm not exactly sure on the reason.

However this topic is about having a weapon.hidden variable not the findweapon() function, everything you all said was completely useless.
__________________
Reply With Quote
  #6  
Old 01-06-2006, 03:00 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
I support Invy.

-Munches on his bri-- cookie.-
Reply With Quote
  #7  
Old 01-06-2006, 03:06 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Inverness
... However this topic is about having a weapon.hidden variable not the findweapon() function, everything you all said was completely useless.
Quote:
Originally Posted by Inverness
... Doing so makes it a hassle when calling a public function on a hidden weapon since you must...
... which is what findWeapon() is for, while demoting ambiguity!
__________________
Skyld
Reply With Quote
  #8  
Old 01-07-2006, 01:27 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Skyld
... which is what findWeapon() is for, while demoting ambiguity!
I know that, what you quoted was just a comment and my personal opinion, something to consider with the topic.
__________________
Reply With Quote
  #9  
Old 01-07-2006, 04:15 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Inverness
I already use that in scripts, however variables without leaders are global and
The fact that it is global was my point. You only have to do that once in a System NPC, and you can use that variable in any other NPCs.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #10  
Old 01-07-2006, 08:09 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Anyways, adding a negative before a weapon name just looks bad to me, thats mostly why I wont the weapon.hidden variable.
__________________
Reply With Quote
  #11  
Old 01-07-2006, 08:31 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Inverness
Anyways, adding a negative before a weapon name just looks bad to me, thats mostly why I wont the weapon.hidden variable.
Well, no one sees the weapon with the negative before it anyway

Also, I don't get how so many people misspell 'want' with 'wont' o_O a and o are on opposite sides of the keyboard
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #12  
Old 01-08-2006, 04:29 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by ApothiX
Well, no one sees the weapon with the negative before it anyway

Also, I don't get how so many people misspell 'want' with 'wont' o_O a and o are on opposite sides of the keyboard
Me neither, didn't even see that mistake :O.
And in respose to the first statement, I'm the NPC Admin, I see it all the damn time when i'm scripting and have to work around it to.
Just having to use a function to get around the negative in the weapon name annoys me, even if I only have to use it once for a global variable, I just don't want to have to do it at all.
I also think there should be a nodelete flag for weapons instead of putting the * before the weapon name.
__________________
Reply With Quote
  #13  
Old 01-08-2006, 12:53 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Inverness
Me neither, didn't even see that mistake :O.
And in respose to the first statement, I'm the NPC Admin, I see it all the damn time when i'm scripting and have to work around it to.
Just having to use a function to get around the negative in the weapon name annoys me, even if I only have to use it once for a global variable, I just don't want to have to do it at all.
I also think there should be a nodelete flag for weapons instead of putting the * before the weapon name.
You're damn picky :P It's more organised in the WNPC list with the * and - signs, I would rather be able to just look at it and tell what it does, rather than have to go in to the code and try to find a 'hidden=true;' variable (which would most likely be in the stupidest place, judging by some people's scripting habits.)

Also, it has been said that findWeapon("") is a better way to do it anyway, so why not just use that? :|


[edit] re-reading my post it seems like that 'some people's scripting habits' was directed at you, take note that it wasn't. It was just a generalised assumption.[/edit]
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #14  
Old 01-10-2006, 02:44 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by ApothiX
You're damn picky :P It's more organised in the WNPC list with the * and - signs, I would rather be able to just look at it and tell what it does, rather than have to go in to the code and try to find a 'hidden=true;' variable (which would most likely be in the stupidest place, judging by some people's scripting habits.)

Also, it has been said that findWeapon("") is a better way to do it anyway, so why not just use that? :|


[edit] re-reading my post it seems like that 'some people's scripting habits' was directed at you, take note that it wasn't. It was just a generalised assumption.[/edit]
Yes I know i'm picky, I hear that all the time. And even though the * and - signs in the weapon list do organize it, an alternative could be color coding or something else even. Though I talked to Stefan and he said the server needs to know the settings to, not just the client, so he wont be changing it anytime soon I suppose.
__________________
Reply With Quote
  #15  
Old 01-10-2006, 03:21 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
Doesn't the 'protectedweapons' server option prevent NPCs from being deleted?
Reply With Quote
  #16  
Old 01-10-2006, 03:34 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Yen
Doesn't the 'protectedweapons' server option prevent NPCs from being deleted?
I think that keeps them from being deleted by the destroy() function.

After reading another thread I think an alternative to using a hidden variable would be to have a checkbox in the window where you set the weapon name for making it hidden and one for the no-delete. That way the server would know, and you wouldn't need a hidden variable.
__________________
Reply With Quote
  #17  
Old 01-10-2006, 04:10 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Inverness
I think that keeps them from being deleted by the destroy() function.
If memory serves me right, it prevents the client from entirely removing the weapon from the account (you can delete the weapon with the client, but when you reconnect you will have it again).
Reply With Quote
Reply


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 10:13 PM.


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