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
  #31  
Old 02-06-2004, 01:29 AM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
yeah jagen, what do you mean?
Reply With Quote
  #32  
Old 02-06-2004, 01:44 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 R0bin
yeah jagen, what do you mean?
They were non existant last time I used them... ages ago anyway
Reply With Quote
  #33  
Old 02-06-2004, 03:30 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally posted by Duwul
Erm, there is? =o

When I want to pass strings and variables from one npc to a DB npc, I use thiso. vars and they work..
I just use strings/variables without prefixes, which works fine.
Reply With Quote
  #34  
Old 02-06-2004, 03:33 AM
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
thiso.strings exist. Haven't had any luck with thiso.vars yet though
__________________
Maniaman

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

Reply With Quote
  #35  
Old 02-06-2004, 03:54 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
They both work.
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
Reply With Quote
  #36  
Old 02-06-2004, 04:13 AM
Value Value is offline
Registered User
Join Date: Jan 2004
Posts: 8
Value is on a distinguished road
Angry Still messed up

Stefan, I did what your doc said about the actionprojectile and it still doesn't work. I did the serverside one. Also, clientside doesnt work either. Only actionprojectile2 works. Is there something wrong with my server or something? Name of my server is Altair. Please reply as soon as possible. I want to make cool bows
Reply With Quote
  #37  
Old 02-06-2004, 05:54 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
Is your actionprojectile in the Control-NPC?
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
Reply With Quote
  #38  
Old 02-06-2004, 04:16 PM
Value Value is offline
Registered User
Join Date: Jan 2004
Posts: 8
Value is on a distinguished road
Unhappy Yes

Yes it is in the Control-NPC. I also tried putting it a DB npc as clientside and serverside. And only actionprojectile2 works. There has to be a problem somewhere. It's messed up that just because i take away the 2 from actionprojectile, it doesn't work and when i add the 2 to actionprojectile it works. And i know there is a difference between both statements. But I did what stefan put in his docu and it still only works with actionprojectile2!!!
Reply With Quote
  #39  
Old 02-06-2004, 04:32 PM
Value Value is offline
Registered User
Join Date: Jan 2004
Posts: 8
Value is on a distinguished road
Arrow Posting Script

Here is the script for my bow, control-npc and class. Help me find the problem!!!!!
Attached Files
File Type: txt projectile.txt (1.8 KB, 213 views)
Reply With Quote
  #40  
Old 02-06-2004, 06:05 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
Re: Posting Script

Quote:
Originally posted by Value
Here is the script for my bow, control-npc and class. Help me find the problem!!!!!
perhaps to be putting the join commands at the top of the script?
Reply With Quote
  #41  
Old 02-06-2004, 10:53 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Re: Re: Posting Script

Quote:
Originally posted by R0bin
perhaps to be putting the join commands at the top of the script?
Nah, mine work fine and I put them at the end of the serverside parts.
Reply With Quote
  #42  
Old 02-07-2004, 01:05 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
Hmm, I don't know. =o

There's something I don't understand. What's the different between actionprojectile and actionprojectile2?
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
Reply With Quote
  #43  
Old 02-07-2004, 01:55 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Re: Posting Script

Quote:
Originally posted by Value
Here is the script for my bow, control-npc and class. Help me find the problem!!!!!
NPC Code:

//Script From Class hpfunctions
function attackplayers() {
pid = playerid;
pindexes = getnearestplayers(this.attackx,this.attacky,player id!=pid);
dist = 0;
for (i=0; i<arraylen(pindexes); i++) {
with (players[pindexes[i]]) {
dx = playerx + 1.5 - this.attackx;
dy = playery + 2 - this.attacky;
dist = (dx*dx + dy*dy)^0.5;
if (dist<=2)
hurtplayer();
}
if (dist>2)
break;
}
}
function hurtplayer() {
newhp = playerhearts - this.attackpower;
if (newhp<=0) {
newhp = 3;
setani dead,;
} else {
setani hurt,;
}
playerhearts=#v(newhp);
}
//END


playerhearts = #v(newhp); is wrong, no #v() is needed.
Reply With Quote
  #44  
Old 02-07-2004, 03:29 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally posted by Duwul
Hmm, I don't know. =o

There's something I don't understand. What's the different between actionprojectile and actionprojectile2?
the first is client-side, the latter is server-side, the first is triggered when the npc is hit with a projectile, the latter is triggered when a projectile lands on the board
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #45  
Old 02-07-2004, 03:35 AM
Value Value is offline
Registered User
Join Date: Jan 2004
Posts: 8
Value is on a distinguished road
Question OK

Ok about the playerhearts part, but that still doesn't prevent the actionprojectile from triggering. Does anyone know what is wrong?
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:54 PM.


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