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 01-14-2004, 05:58 PM
TheStivi TheStivi is offline
Registered User
Join Date: Sep 2002
Location: Germany - NRW
Posts: 78
TheStivi is on a distinguished road
Send a message via ICQ to TheStivi Send a message via AIM to TheStivi
Problem -.-

*Rewrite because bad english *g* *
5 Minutes ago i tried to make a new Walking Engine...
I added something like this :

for (i=0;i<4;i++) if(keydown(i)) this.walk=1;

if (this.walk=1) setani aol_walk,;
else setani aol_idle,;

setplayerprop #P1,aol_head.png
....

I can see me =)
But some other people cant.

I cant see some people too.
They are invisible or i can only see a part of the legs(#P3) GFX...

But not all. I can see 1 Man =) but he cant see me correctly...
__________________
Old Staff Jobs :
Graal 2002 : Gani Maker || Doomsday : Developer || Terra : Developer || Zenkou : NAT || Anystria : Manager || Galeon : Co Manager || Kabruriki : NAT Chief || Archaic : NAT || Age of Legends : Manager
Reply With Quote
  #2  
Old 01-14-2004, 06:31 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
Re: Problem -.-

Quote:
Originally posted by TheStivi
*Rewrite because bad english *g* *
5 Minutes ago i tried to make a new Walking Engine...
I added something like this :

for (i=0;i<4;i++) if(keydown(i)) this.walk=1;

if (this.walk=1) setani aol_walk,;
else setani aol_idle,;

setplayerprop #P1,aol_head.png
....

I can see me =)
But some other people cant.

I cant see some people too.
They are invisible or i can only see a part of the legs(#P3) GFX...

But not all. I can see 1 Man =) but he cant see me correctly...
I can't tell you how to fix it, but i sure can tell you to use brackers.. ( the { and } )
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #3  
Old 01-14-2004, 07:31 PM
TheStivi TheStivi is offline
Registered User
Join Date: Sep 2002
Location: Germany - NRW
Posts: 78
TheStivi is on a distinguished road
Send a message via ICQ to TheStivi Send a message via AIM to TheStivi
its dont works -.-
__________________
Old Staff Jobs :
Graal 2002 : Gani Maker || Doomsday : Developer || Terra : Developer || Zenkou : NAT || Anystria : Manager || Galeon : Co Manager || Kabruriki : NAT Chief || Archaic : NAT || Age of Legends : Manager
Reply With Quote
  #4  
Old 01-14-2004, 08:45 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Re: Problem -.-

Quote:
Originally posted by TheStivi
setplayerprop #P1,aol_head.png
You are going to get in trouble
Reply With Quote
  #5  
Old 01-14-2004, 08:46 PM
TheStivi TheStivi is offline
Registered User
Join Date: Sep 2002
Location: Germany - NRW
Posts: 78
TheStivi is on a distinguished road
Send a message via ICQ to TheStivi Send a message via AIM to TheStivi
aol is the short version of age of legends ....
__________________
Old Staff Jobs :
Graal 2002 : Gani Maker || Doomsday : Developer || Terra : Developer || Zenkou : NAT || Anystria : Manager || Galeon : Co Manager || Kabruriki : NAT Chief || Archaic : NAT || Age of Legends : Manager
Reply With Quote
  #6  
Old 01-14-2004, 09:09 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Perhaps serverside/clientside problem...

Oh and do use the { and } brackets, improves readability.
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #7  
Old 01-15-2004, 10:26 AM
Hevaricubed Hevaricubed is offline
Registered User
Join Date: Aug 2003
Posts: 262
Hevaricubed is on a distinguished road
Send a message via AIM to Hevaricubed Send a message via Yahoo to Hevaricubed
... maybe #3 instead of #P1?
__________________
Reply With Quote
  #8  
Old 01-15-2004, 03:10 PM
TheStivi TheStivi is offline
Registered User
Join Date: Sep 2002
Location: Germany - NRW
Posts: 78
TheStivi is on a distinguished road
Send a message via ICQ to TheStivi Send a message via AIM to TheStivi
no i setted head etc. with Parameters
after a while it worked more and more

now it works better than before x-x
__________________
Old Staff Jobs :
Graal 2002 : Gani Maker || Doomsday : Developer || Terra : Developer || Zenkou : NAT || Anystria : Manager || Galeon : Co Manager || Kabruriki : NAT Chief || Archaic : NAT || Age of Legends : Manager
Reply With Quote
  #9  
Old 01-15-2004, 03:31 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Re: Problem -.-

Quote:
Originally posted by TheStivi
if (this.walk=1) setani aol_walk,;
Use '==' when comparing two values for equality.
Use '=' when assigning a value to a variable.

So, in that case:

NPC Code:

if(this.walk==1){
//stuff;
}



.. is better.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #10  
Old 01-15-2004, 04:53 PM
Alexander Alexander is offline
Registered User
Join Date: Apr 2003
Location: California
Posts: 246
Alexander is on a distinguished road
Send a message via AIM to Alexander
check if everyone has the gani, if they do tell them to restart graal. if that doesn't help, good luck
Reply With Quote
  #11  
Old 01-15-2004, 05:19 PM
TheStivi TheStivi is offline
Registered User
Join Date: Sep 2002
Location: Germany - NRW
Posts: 78
TheStivi is on a distinguished road
Send a message via ICQ to TheStivi Send a message via AIM to TheStivi
So *g*
****On Order of Loriel i edited the script on the 'must to post' ...
I just give you the complete script :

NPC Code:

...
setplayerprop #P2,aol_arms2.png;
setplayerprop #P3,aol_legs2.png;
setplayerprop #P4,aol_head2.png;
setplayerprop #P5,aol_body2.png;
...
disabledefmovement;
...
this.walk=0;
this.newx=0;
this.newy=0;
//Keycheck
for (i=0;i<4;i++){
if (keydown(i)){set();}
}
//Onwall
...
//Show Chattext
showtext 1,x+this.newx,y-3+this.newy,Verdana,cb,#s(this.text);
changeimgzoom 1,0.7;
changeimgvis 0,1;
//Ask if can setgani
if (this.setgani=0){
if (this.power=6){
triggeraction playerx+vecx(playerdir)*2,playery+vecy(playerdir)* 2,hit,;
this.power=0;
}
if (keydown(4)){
freezeplayer 0.2;
this.set=0;
if (strequals(#s(client.pregani),)){
this.power++;
}
if (this.set2=0){setani aol_#s(client.pregani)shoot,;this.set2=1;}
}
else{
this.power=0;
if (this.set2=1) setani aol_#s(client.pregani)idle,;
this.set2=0;
if (this.walk=1){
if (this.set=0){
setani aol_#s(client.pregani)walk,;this.set=1
}
if (!strequals(#m,aol_#s(client.pregani)walk)){
setani aol_#s(client.pregani)walk,;this.set=1
}
}
else{
setani aol_#s(client.pregani)idle,;this.set=0;
}
}
}
...
function set(){
playerdir=i;
this.newx+=vecx(i)*0.5;
this.newy+=vecy(i)*0.5;
this.walk=1;
}



I hope it can help you to help me =)

Dont Copy for your server its illegal and wont help us all
__________________
Old Staff Jobs :
Graal 2002 : Gani Maker || Doomsday : Developer || Terra : Developer || Zenkou : NAT || Anystria : Manager || Galeon : Co Manager || Kabruriki : NAT Chief || Archaic : NAT || Age of Legends : Manager

Last edited by TheStivi; 01-15-2004 at 05:30 PM..
Reply With Quote
  #12  
Old 01-15-2004, 07:11 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
How about reading Osrs's post -_-?
__________________
Former Global Scripting Team Member


Reply With Quote
  #13  
Old 01-15-2004, 07:16 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Quote:
Originally posted by Ningnong
How about reading Osrs's post -_-?
You know that doesn't matter? It just there for compatability with Java or somethin'.
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #14  
Old 01-15-2004, 08:03 PM
Hevaricubed Hevaricubed is offline
Registered User
Join Date: Aug 2003
Posts: 262
Hevaricubed is on a distinguished road
Send a message via AIM to Hevaricubed Send a message via Yahoo to Hevaricubed
and c++, read npcprogramming.doc to be corrupted.
__________________
Reply With Quote
  #15  
Old 01-15-2004, 10:09 PM
xManiamaNx xManiamaNx is offline
Supreme Dictator
xManiamaNx's Avatar
Join Date: Nov 2002
Location: 127.0.0.1
Posts: 385
xManiamaNx is on a distinguished road
Send a message via MSN to xManiamaNx Send a message via Yahoo to xManiamaNx
Quote:
Originally posted by GoZelda

You know that doesn't matter? It just there for compatability with Java or somethin'.
It may not matter, but it is best to use ==.
__________________
Maniaman

Play Maloria Now: [2.3] [3]
Maloria Website

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 12:41 AM.


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