Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-06-2003, 10:52 AM
Gravis2k Gravis2k is offline
Registered User
Join Date: Jun 2003
Location: AR
Posts: 52
Gravis2k is on a distinguished road
Send a message via ICQ to Gravis2k Send a message via AIM to Gravis2k Send a message via Yahoo to Gravis2k
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,:escends slowly::;
setani birdland,;
disabledefmovement;
}
if(playerchats&&strequals(#c,fly)){
setplayerprop #c,::Rises rapidly into the air::;
setani birdfly1,;
enabledefmovement;
}
__________________
My first roll on Kingdoms
Reply With Quote
  #2  
Old 09-06-2003, 11:14 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Re: i'm stumped, script help

replaceani walk,birdidle;
__________________
Reply With Quote
  #3  
Old 09-06-2003, 11:21 AM
Gravis2k Gravis2k is offline
Registered User
Join Date: Jun 2003
Location: AR
Posts: 52
Gravis2k is on a distinguished road
Send a message via ICQ to Gravis2k Send a message via AIM to Gravis2k Send a message via Yahoo to Gravis2k
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
__________________
My first roll on Kingdoms
Reply With Quote
  #4  
Old 09-06-2003, 03:47 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Fair enough. Fix it up in accordance with KSI-GS and I'll try to help you in other ways.
__________________
Reply With Quote
  #5  
Old 09-06-2003, 08:13 PM
Gravis2k Gravis2k is offline
Registered User
Join Date: Jun 2003
Location: AR
Posts: 52
Gravis2k is on a distinguished road
Send a message via ICQ to Gravis2k Send a message via AIM to Gravis2k Send a message via Yahoo to Gravis2k
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
__________________
My first roll on Kingdoms
Reply With Quote
  #6  
Old 09-06-2003, 08:16 PM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
Regarding conforming to KSI-GS:

You have two successive checks of the same event. :-\

Rather than doing:

NPC Code:

if (event1 && condition1) {
dostuff();
}
if (event1 && condition2) {
dootherstuff();
}



Do:

NPC Code:

if (event1) {
if (condition1) {
dostuff();
}
else if (condition2) {
dootherstuff();
}
}



Also, you are using one equals sign for comparisons - bad!
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #7  
Old 09-06-2003, 08:25 PM
Gravis2k Gravis2k is offline
Registered User
Join Date: Jun 2003
Location: AR
Posts: 52
Gravis2k is on a distinguished road
Send a message via ICQ to Gravis2k Send a message via AIM to Gravis2k Send a message via Yahoo to Gravis2k
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;
}
__________________
My first roll on Kingdoms
Reply With Quote
  #8  
Old 09-06-2003, 08:33 PM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
Now apply the same idea to the second block, and then test the script out again.
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #9  
Old 09-06-2003, 08:35 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
use [code] tags on the forums
Reply With Quote
  #10  
Old 09-06-2003, 08:50 PM
Gravis2k Gravis2k is offline
Registered User
Join Date: Jun 2003
Location: AR
Posts: 52
Gravis2k is on a distinguished road
Send a message via ICQ to Gravis2k Send a message via AIM to Gravis2k Send a message via Yahoo to Gravis2k
i tried

i tried, it still doesn't work.
NPC Code:

//#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;
}

__________________
My first roll on Kingdoms
Reply With Quote
  #11  
Old 09-06-2003, 09:31 PM
Gravis2k Gravis2k is offline
Registered User
Join Date: Jun 2003
Location: AR
Posts: 52
Gravis2k is on a distinguished road
Send a message via ICQ to Gravis2k Send a message via AIM to Gravis2k Send a message via Yahoo to Gravis2k
am i being ignored now lol??
__________________
My first roll on Kingdoms
Reply With Quote
  #12  
Old 09-06-2003, 10:21 PM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
Quote:
Originally posted by Gravis2k
am i being ignored now lol??
You didn't listen to my last set of helping directions.
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #13  
Old 09-06-2003, 10:53 PM
Gravis2k Gravis2k is offline
Registered User
Join Date: Jun 2003
Location: AR
Posts: 52
Gravis2k is on a distinguished road
Send a message via ICQ to Gravis2k Send a message via AIM to Gravis2k Send a message via Yahoo to Gravis2k
ok done (sorry)
NPC Code:
//#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){
if (strequals(#c,land)){
setplayerprop #c,escends slowly::;
setani birdland,;
disabledefmovement;
}


else if (strequals(#c,fly)){
setplayerprop #c,::Rises rapidly into the air::;
setani birdfly1,;
enabledefmovement;
}
}



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.
__________________
My first roll on Kingdoms
Reply With Quote
  #14  
Old 09-06-2003, 11:54 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
You probablly got some NPC using a loop to replaceani walk,walk; or so
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #15  
Old 09-07-2003, 12:01 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by mhermher
You probablly got some NPC using a loop to replaceani walk,walk; or so
What? You do not loops replaceani's, I thought you were a scripter
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.