![]() |
setting gani on a player
i created a gani that shows a Blue Flag over a character when they enter a level. when i move around, the gani of the Blue Flag hovering over a character disappears. How do i keep the gani on the players inside a level?
function onCreated() { } function onPlayerEnters() { timeout=0.05; timereverywhere; setani blueFlag_idle,; } function onTimeout() { if (player.guild == "Blue Team") { setani blueFlag_idle,; } if (player.guild == "Red Team") { setani redFlag_idle,; } } timeout=0.05; Or maybe just attach a PNG image of the flag over a character. I'm not sure how to either keep the gani on the players or attach a PNG image of the flag over a character? |
Quote:
|
You also need to put the timeout=0.05; inside of the onTimeout function...you have it floating in limbo right now. I advise that you don't mix gs1 and gs2 also and that you use setTimer(0.05) rather then timeout=0.05. (Sorry can't give a specific reason why but it seems to always make things work better for me in GS2)
|
i tried the gani OFFLINE on the level editor doing this:
if (playertouchsme) { replaceani idle,ctf_blue_idle; } and it works OFFLINE, but I don't understand why it doesn't work ONLINE when I upload into RC?? |
Best way to do this would to probably make a gani with just the flag(no player), and set it to an attribute. But that's only if you're using the gani just to have the flag hover over the head, if they're holding it that's different.
|
You would do
PHP Code:
|
the attributes thing worked perfectly as i just want to hover a flag over the head. i search on the Graal Wiki Homepage... couldn't find what available attributes were, but i did this:
player.attr[5] = "ctfFlag.gani"; I don't know what the 5 stands for, but it works. maybe if someone could quickly list the attributes, that'd be cool. also say for example, i change the player's attributes and it stays that way in the level: function onPlayerEnters() { setani ctfFlag_idle,; } if they were to "unstick me", use staff warps or someone summons them out of a level, they will stay that way. how do i make it so that if they leave the level (under not-normal) circumstances, can i set them back to normal? i dont want them to touch an NPC to set them back to normal before they leave. this is also a problem if you create a new tileset for just that one level and they decide to "unstick me" or use staff warp, etc... to leave the level and when they do, their game window is all garbled and messed up. |
The 5 is just that. XD A 5. It's a player.attribute. Player attributes are spaces and are edited by ganis. They're just blank until you fill em up. :P
|
PHP Code:
|
By default, only attr[1] is used, for the hat.
|
| All times are GMT +2. The time now is 08:01 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.