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 10-06-2004, 02:03 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
shoot & actionprojectile

This works perfectly for me, but in the new baddy I'm making the actonprojectile in the Control-NPC does NOT see the new projectile. I can see it shoot, but the Control-NPC doesn't get it when it lands.

Baddy script:
NPC Code:

a=getangle(this.distancex-x,this.distancey-y);
setshootparams arrow,batboss,3,batboss,batboss;
shoot x,y,z,a,1,-1,nol_batbossproj,nol_batboss.png;



Control-NPC:
NPC Code:
 if (actionprojectile) {
sendtorc PROJECTILE: #p(0):#p(1):#p(2):#p(3):#p(4):#p(5):#p(6):#p(7):#p (8);
}



The Baddy is a DB-NPC.


EDIT: By the way, the Control-NPC gets all other projectiles, like the bows and magic I've got.
__________________
-Kjetil Valen
Reply With Quote
  #2  
Old 10-06-2004, 04:09 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
try actionsprojectile
Reply With Quote
  #3  
Old 10-06-2004, 11:59 PM
Malinko Malinko is offline
Unholy Nation
Join Date: Mar 2004
Location: Massachusetts, U.S.A.
Posts: 1,782
Malinko is on a distinguished road
Send a message via AIM to Malinko
Hm. Try something like this.

For a Weapon NPC:

NPC Code:

a=getangle(this.distancex-x,this.distancey-y);
setshootparams #a,nol_batbossproj;
shoot x,y,z,a,1,-1,nol_batbossproj,nol_batboss.png;



Then set up another Weapon NPC, such as "-Projectiles":

NPC Code:

if (actionserverside) {
if (strequals(#p(0),nol_batbossproj)) {
sendtorc Blah;
}
}
//#CLIENTSIDE
if (actionprojectile) {
if (strequals(#p(1),nol_batbossproj)) {
triggeraction 0,0,serverside,-Projectiles,nol_batbossproj,#v(playerx),#v(playery );
}
}



Should work I think.
Reply With Quote
  #4  
Old 10-07-2004, 02:03 AM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
To both of you: All other projectiles work, except this one.. I guess Malinkos could work, but I want to know why the current doesn't work.
__________________
-Kjetil Valen
Reply With Quote
  #5  
Old 10-07-2004, 05:49 AM
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
Is it shooting serverside or clientside
Reply With Quote
  #6  
Old 10-07-2004, 12:18 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
Hmm.. That might be the problem. This one is serverside, while all other that works are clientside...
__________________
-Kjetil Valen
Reply With Quote
  #7  
Old 10-07-2004, 03:27 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
- actionsprojectile:
is triggered when a server-side script has shot a projectile and the projectile
is landed; in #p(0) and #p(1) you have the x and y position of the impact
(the control-npc is automatically warped to the level where the impact
happened); #p(2),#p(3) etc. contain the params set with 'setshootparams'
(before shooting the projectile)

Didn't you try actionsprojectile?

Last edited by Alexander; 10-07-2004 at 03:46 PM..
Reply With Quote
  #8  
Old 10-07-2004, 09:31 PM
Malinko Malinko is offline
Unholy Nation
Join Date: Mar 2004
Location: Massachusetts, U.S.A.
Posts: 1,782
Malinko is on a distinguished road
Send a message via AIM to Malinko
Quote:
Originally Posted by Alexander
- actionsprojectile:
is triggered when a server-side script has shot a projectile and the projectile
is landed; in #p(0) and #p(1) you have the x and y position of the impact
(the control-npc is automatically warped to the level where the impact
happened); #p(2),#p(3) etc. contain the params set with 'setshootparams'
(before shooting the projectile)

Didn't you try actionsprojectile?
You go girl.
Reply With Quote
  #9  
Old 10-08-2004, 12:24 AM
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
Quote:
Originally Posted by Malinko
Alex owns me in everything I do >=o!
Remember this Malinko
Reply With Quote
  #10  
Old 10-08-2004, 08:48 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Shoot is clientside if you didn't know.
__________________
Reply With Quote
  #11  
Old 10-08-2004, 03:56 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
No it isn't, I'm pretty sure it is serverside too O.o
Reply With Quote
  #12  
Old 10-08-2004, 05:41 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
It would be useless to have actionsprojectile if shoot was clientside only.
Reply With Quote
  #13  
Old 10-08-2004, 09:39 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Era's gun's are clientside, Saw the shootcommand in the clientside part :O
__________________
Reply With Quote
  #14  
Old 10-08-2004, 09:53 PM
Malinko Malinko is offline
Unholy Nation
Join Date: Mar 2004
Location: Massachusetts, U.S.A.
Posts: 1,782
Malinko is on a distinguished road
Send a message via AIM to Malinko
Quote:
Originally Posted by Alexander
Remember this Malinko
I know how you look like, your phone number, and where you live.

.
Reply With Quote
  #15  
Old 10-14-2004, 08:06 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by xAndrewx
Shoot is clientside if you didn't know.
No, it's not just clientside. Please refer to scripting forum rule #4.
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 06:16 PM.


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