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 06-15-2007, 04:45 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
Global Class?

When I'm in the bathroom I think of random things and I came up with this. What if Graal could look for a class named 'global' when you make an object and automatically join that class to the object? I believe this could accurately simulate global functions? Unless there are any plans to add support for that the way Graal does it. Custom Object Types

Back when public functions were introduced I had assumed any public functions made in the Control-NPC would automatically be global x.x
__________________
Reply With Quote
  #2  
Old 06-15-2007, 10:40 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
The last time I asked Stefan for something like this, he said, "just uses classes " and that being able to edit parent objects or using defined custom data types would be no faster than using join()
Reply With Quote
  #3  
Old 06-15-2007, 06:14 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
make an NPC called "global" and put your functions in that.

Then you can call global.whatever(); from any script without joining.
__________________

Coming soon (Hopefully:P)
Reply With Quote
  #4  
Old 06-16-2007, 12:44 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by JkWhoSaysNi View Post
make an NPC called "global" and put your functions in that.

Then you can call global.whatever(); from any script without joining.
With certain limitations on the clientside.
__________________
Do it with a DON!
Reply With Quote
  #5  
Old 06-16-2007, 03:45 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 JkWhoSaysNi View Post
make an NPC called "global" and put your functions in that.

Then you can call global.whatever(); from any script without joining.
I already know this

Having to prefix things with Object.Function() doesn't look as cool as global functions.

Holy crap I just had an excellent idea, since it seems that we have function-objects now, maybe I can create global function object? :O!

Edit: Its not working ;-;

Quote:
Originally Posted by Twinny View Post
The last time I asked Stefan for something like this, he said, "just uses classes " and that being able to edit parent objects or using defined custom data types would be no faster than using join()
Its not about speed, its about the cool features like static variables having internal commands for reading and writing them (which I learned recently).
__________________

Last edited by Inverness; 06-16-2007 at 03:58 AM..
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 03:01 AM.


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