![]() |
Events that work in ganiscript?
working on a custom nickname system, it appears that neither onPlayerNickChanges
or onNickChanges are invoked in the gani. PHP Code:
|
I think those are serverside only.
|
trying something like
PHP Code:
I'd hate to have to do something like unset the player.attr and then reset it after a timeout or something, but it looks like I may have to |
ended up duplicating the gani and am changing the attr to the 2nd gani when onPlayerNickChanges is invoked on the serverside, resetting back to original after a .1 sec scheduleevent
guess I'll have to shove a timeout into the ani itself to deal with AP, checking once every 10 or so seconds seems reasonable |
Maybe try using onPlayerChanges(pl)? I doubt it will work inside a GANI script, though.
|
I can imagine nickname displaying having several complications if done through gani script, even if there was an event for nick changing within gani scripts you still ought to have a way to add the text "(Paused)" assuming you want to replicate default.
And what about when AP changes? You may want nicknames to be hidden at certain times which would likely require the use of a timeout to check for them being enabled, which is something you'd want to be checking one time within a weapon rather than for every single player in a gani script. Edit: you mentioned this just before I posted. If there were other gani scripts active that were modifying player red, green, blue, zoom etc would these not also be applied to nickname display if it were within a gani script? |
The method I use is setting the nick to an attr and check to see if they don't equal each other. I use another attr for my custom pause system.. Suppose you could do the same for AP
|
Quote:
You're right about the hiding nicks though, as far as I'm aware there is still no inherent method of getting the player object who is viewing the gani, so I guess I'll have to use a weapon for this instead. |
Quote:
|
Quote:
PHP Code:
I guess the issues I need to figure out still are how to update nick names being toggled off instantly rather than having to sit and wait for a slow timeout I plan to use for AP. EDIT 2: apparently keydown(10) only returns true while unpausing, and will not return true while starting a pause. Only solution I can think of is using GraalControl.onKeyDown and checking if keyname == 2nd param. |
Quote:
|
Quote:
|
Quote:
|
Quote:
PHP Code:
|
That's some really hackish stuff you got there.
|
| All times are GMT +2. The time now is 08:46 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.