![]() |
Strange player.shieldimg problem.
I am having an impossible time setting player.shieldimg.
I've figured out that the shield gets almost instantly reverted when I change it. I made this basic NPC: NPC Code://#CLIENTSIDE When i touch the NPC my shield will change to shield2.png for a split second before reverting to what it was before. I tried deleting all weapon npc's from my account and there are no other npcs in the level. Why does it do this? headimg,swordimg etc all work fine, but shieldimg does not. This also seems to be a problem on showani's using findimg(index).actor.shieldimg Any ideas why this is happening or how to fix it? Thanks. |
Sounds like the shield you want isn't on the server...
Or the server is using the classic shield system and won't let you get a "better" shield. There's a function for that but I don't remember the name right now. |
I believe the 3 default shields (normal, mirror, lizard) are protected. Use .gif, instead of .png.
There are also alternative names, but I can't remember them. Try lizardonshield.png or mirrorshield.png |
oh, thanks :) using .gif works.
Is there any reason findimg(index).actor.shieldimg = "whatever"; won't work? |
Ok found it, for some reason it's findimg(index).actor.shield.
|
Move the code to serverside, remove that //#CLIENTSIDE line, you should do that anyway since all code that can be put on serverside should also be put on serverside.
Most attributes of the player are protected, you are not allowed to change the shield and shieldpower on clientside, there are also protections against modifying the head and body (can be configured in the server options). |
| All times are GMT +2. The time now is 06:05 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.