Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Global Class? (https://forums.graalonline.com/forums/showthread.php?t=74594)

Inverness 06-15-2007 04:45 AM

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

Twinny 06-15-2007 10:40 AM

The last time I asked Stefan for something like this, he said, "just uses classes :D" and that being able to edit parent objects or using defined custom data types would be no faster than using join() :(

JkWhoSaysNi 06-15-2007 06:14 PM

make an NPC called "global" and put your functions in that.

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

zokemon 06-16-2007 12:44 AM

Quote:

Originally Posted by JkWhoSaysNi (Post 1318270)
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.

Inverness 06-16-2007 03:45 AM

Quote:

Originally Posted by JkWhoSaysNi (Post 1318270)
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 :whatever:

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 (Post 1318187)
The last time I asked Stefan for something like this, he said, "just uses classes :D" 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).


All times are GMT +2. The time now is 12:23 PM.

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