![]() |
i'm stumped, script help
i made a bird transformation for my server, and i have made all of the ganis (walk,idle,attack etc...) and for some reason the walk one doesnt show on me... for an hour it would show on other people, but now it doesn't. i don't see anything wrong with the script what so ever.. if some1 could point it out i would really appreciate it.
//#CLIENTSIDE if (weaponfired&&this.on=0) { setani birdtransform,; replaceani idle,birdidle; replaceani sword,birdattack2; replaceani walk,birdidle; this.on=1; }else if (weaponfired&&this.on=1) { setani birdreform1,; replaceani idle,idle; replaceani sword,sword; replaceani walk,walk; this.on=0; } if(playerchats&&strequals(#c,land)){ setplayerprop #c,::Descends slowly::; setani birdland,; disabledefmovement; } if(playerchats&&strequals(#c,fly)){ setplayerprop #c,::Rises rapidly into the air::; setani birdfly1,; enabledefmovement; } |
Re: i'm stumped, script help
replaceani walk,birdidle;
|
should have mentioned that
i know it says birdidle, they both are the same gani for flying and idling so i only made the idle. it worked for a little bit on other people and now it doesnt work at all :(
|
Fair enough. Fix it up in accordance with KSI-GS and I'll try to help you in other ways.
|
Ok i think i got this right lol
//#CLIENTSIDE
if (weaponfired&&this.on=0) { setani birdtransform,; replaceani idle,birdidle; replaceani sword,birdattack2; replaceani walk,birdidle; this.on=1; } else if (weaponfired&&this.on=1) { setani birdreform1,; replaceani idle,idle; replaceani sword,sword; replaceani walk,walk; this.on=0; } if (playerchats&&strequals(#c,land)){ setplayerprop #c,:escends slowly::; setani birdland,; disabledefmovement; } if (playerchats&&strequals(#c,fly)){ setplayerprop #c,::Rises rapidly into the air::; setani birdfly1,; enabledefmovement; } ------------------------------------------------------------------ if there is anything wrong with the format tell me and i will fix it |
Regarding conforming to KSI-GS:
You have two successive checks of the same event. :-\ Rather than doing: NPC Code: Do: NPC Code: Also, you are using one equals sign for comparisons - bad! |
Better?
//#CLIENTSIDE
if (weaponfired){ if (this.on==0) { setani birdtransform,; replaceani idle,birdidle; replaceani sword,birdattack2; replaceani walk,birdidle; this.on=1; } else if (this.on==1){ setani birdreform1,; replaceani idle,idle; replaceani sword,sword; replaceani walk,walk; this.on=0; } } if (playerchats&&strequals(#c,land)){ setplayerprop #c,:escends slowly::; setani birdland,; disabledefmovement; } if (playerchats&&strequals(#c,fly)){ setplayerprop #c,::Rises rapidly into the air::; setani birdfly1,; enabledefmovement; } |
Now apply the same idea to the second block, and then test the script out again.
|
use [code] tags on the forums
|
i tried
i tried, it still doesn't work.
NPC Code: |
am i being ignored now lol??
|
Quote:
|
ok done (sorry)
NPC Code://#CLIENTSIDE but that's not where my problem was.... when i am in bird form and i try to move i switch back to looking human again, my friend zach can use it and fly and still look like a bird but i can't, i can also see him flying. please help lol everything but the walk one works. fly,land,idle, and attack all work fine. |
You probablly got some NPC using a loop to replaceani walk,walk; or so
|
Quote:
|
Tyrial is a graphics guy. I've never actually seen him do much scripts work.
|
I think he means there is probably some other NPCW overriding his weapons replaceani.
|
huh? lol i dont have any looped replaceani's
|
Quote:
anyways, what i meant was that he prolly had a replaceani walk,walk; or walk,somethingwalk; or so in a timeout.. because i... wait, just figured out.. do your gani have the "continious=true" variable on the gani? |
loop=true
continious=false i changed it to true and i still have the same problem |
i also tried simplifiing the part that is not working to see if my variables were not working right
NPC Code://#CLIENTSIDE but the walk gani fails on this also |
Quote:
So check that out too. |
What is actually shown when the player is moving? Nothing? The default gani?
|
It works now, and i feel really stupid..... it was from a script i wrote a long time ago and i had in two spots where it would replace the ani and it kept looping, i fixed it and now all of the scripts work ty for the help :)
(also learned something new....how to make my scripts more presentable and easy to read):D |
| All times are GMT +2. The time now is 10:46 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.