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 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
  #16  
Old 02-22-2008, 04:22 PM
Toxen Toxen is offline
A Toxic Fellow
Join Date: Jan 2008
Location: Georgia
Posts: 36
Toxen is on a distinguished road
The actual "shoot" and the "shoot params" does go in the clientside part of the script, But the "shoot params" is basically sending a trigger which the npc will receive
Reply With Quote
  #17  
Old 02-22-2008, 04:50 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Toxen View Post
The actual "shoot" and the "shoot params" does go in the clientside part of the script, But the "shoot params" is basically sending a trigger which the npc will receive
Erm, why did you revive this thread? The last post before yours in this thread was posted in 2004..

Next time check the time when the thread was made, and when the last post was posted
__________________

Last edited by Chompy; 02-22-2008 at 05:09 PM..
Reply With Quote
  #18  
Old 02-22-2008, 05:30 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Chompy View Post
Erm, why did you revive this thread? The last post before yours in this thread was posted in 2004..

Next time check the time when the thread was made, and when the last post was posted
haha
__________________
Reply With Quote
  #19  
Old 02-22-2008, 06:31 PM
bscharff bscharff is offline
Bloo
bscharff's Avatar
Join Date: Sep 2006
Location: San Antonio, Texas
Posts: 185
bscharff has a little shameless behaviour in the past
Send a message via AIM to bscharff Send a message via MSN to bscharff Send a message via Yahoo to bscharff
and you said I was bumping threads?
rofl :P
__________________
Trying to be nice now...
Reply With Quote
  #20  
Old 02-22-2008, 09:07 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
oh i did giggle at my old replys, haha
__________________
Reply With Quote
  #21  
Old 02-22-2008, 11:34 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by xAndrewx View Post
oh i did giggle at my old replys, haha
best era manager eva.
Reply With Quote
  #22  
Old 02-23-2008, 12:54 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Thread Necromancy at its finest.
Quote:
Originally Posted by bscharff View Post
and you said I was bumping threads?
rofl :P
Yes, you were.
__________________
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 06:28 PM.


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