![]() |
Plugin class
PHP Code:
|
I'm confused as to how this could be used...
|
Quote:
|
Quote:
|
Quote:
What? Couldn't you use scheduleevent to catch events? I don't really understand the point of this. :confused: |
What isn't there to understand? Novo has excelled himself again! Nice work
|
Quote:
|
Quote:
Yes, but there is a catchevent function already, though. |
Quote:
Look, Gambet... If you don't appreciate, or know how to deploy the plugins, than that is very well: I have not, in any way or form, obliged you to use my class. If you have problems with such, then I suggest you to just find another thread to argue with. This is one way to skin a cat. YES THERE ARE OTHERS. But any given environment may incite that a particular way is better. This is only another way to do something. |
Looks interesting Novo! :D
|
Quote:
I'm only trying to understand how your system works. Apparently, asking you questions will only lead you to have a defensive attack against the person asking. I never even mentioned that your system was bad or anything of the sort for you to grow so defensive when I'm merely asking questions. As for catchevent, I havn't bothered using it outside of GUIs to know whether they only work in GUIs or not but I'm sure you could easily use it outside a GUI function and find out if it works. |
Oh I think I did something like this before. I made an EventServer class and objects could use ObjectWithClass.register(Object); and when someone used triggerEvent() it would trigger the event on all objects registered.
|
Quote:
You see, the 'event' sends the current value. It then takes the value it returns. So lets say you want to calculate the level's brightness... brightness = plugin::getPlugin("brightness", 1 ); The plugin will go and check if any other NPCs plug in... Let's say it is in a house, and our house controller plugged in... The house controller could do return brightness - 0.6; ( thus 1 - 0.6)... Now -- If there are lamps and they plugged in too... return brightness + 0.1; ... If there are three lamps, the total brightness would be 1 - 0.6 + 0.1 + 0.1 + 0.1... Or 0.9. Using this, you could calculate things, not merely send an event. But, obviously enough, if the value isn't important, it acts as an event. Quote:
|
VERY nice, thanks for the release!
Quote:
j/k <3 but no more skinning cats. |
All times are GMT +2. The time now is 09:38 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.