Graal Forums  

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

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
  #16  
Old 09-07-2003, 12:04 AM
Neoreno Neoreno is offline
Cerebrate
Neoreno's Avatar
Join Date: Aug 2001
Location: England
Posts: 1,663
Neoreno is on a distinguished road
Send a message via AIM to Neoreno
Tyrial is a graphics guy. I've never actually seen him do much scripts work.
__________________

Quote:
Exitus Acta Probat: The Outcome Justifies the Deed.
Reply With Quote
  #17  
Old 09-07-2003, 12:05 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I think he means there is probably some other NPCW overriding his weapons replaceani.
Reply With Quote
  #18  
Old 09-07-2003, 12:09 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
huh? lol i dont have any looped replaceani's
__________________
My first roll on Kingdoms
Reply With Quote
  #19  
Old 09-07-2003, 12:31 AM
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
Quote:
Originally posted by Python523


What? You do not loops replaceani's, I thought you were a scripter
i were.. heh.. but i got lazy so i stopped scipting.. i do gfx now..

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?
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #20  
Old 09-07-2003, 12:39 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
loop=true
continious=false


i changed it to true and i still have the same problem
__________________
My first roll on Kingdoms
Reply With Quote
  #21  
Old 09-07-2003, 12:46 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 also tried simplifiing the part that is not working to see if my variables were not working right

NPC Code:
//#CLIENTSIDE
if (weaponfired){
replaceani idle,birdidle;
replaceani sword,birdattack2;
replaceani walk,birdidle;
}




but the walk gani fails on this also
__________________
My first roll on Kingdoms
Reply With Quote
  #22  
Old 09-07-2003, 02:18 AM
Knuckles Knuckles is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 580
Knuckles is on a distinguished road
Send a message via AIM to Knuckles
Quote:
Originally posted by Gravis2k
i also tried simplifiing the part that is not working to see if my variables were not working right

NPC Code:
//#CLIENTSIDE
if (weaponfired){
replaceani idle,birdidle;
replaceani sword,birdattack2;
replaceani walk,birdidle;
}




but the walk gani fails on this also
...Try the other script offline. If it still doesnt work, then tell us, and we'll help you debug it. Else, if it does work.. then ON your server, there is another NPC (probibly a weapon) with a timeout loop, using replaceani for the walk...

So check that out too.
__________________
Knuckles
"They say 60% of the time, it works everytime!"
Reply With Quote
  #23  
Old 09-07-2003, 04:43 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
What is actually shown when the player is moving? Nothing? The default gani?
__________________
Reply With Quote
  #24  
Old 09-07-2003, 05:05 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
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)
__________________
My first roll on Kingdoms

Last edited by Gravis2k; 09-07-2003 at 05:25 AM..
Reply With Quote
Reply


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 01:23 AM.


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