Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   shoot & actionprojectile (https://forums.graalonline.com/forums/showthread.php?t=55616)

VeX_RaT_Boy 10-06-2004 02:03 PM

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.

Alexander 10-06-2004 04:09 PM

try actionsprojectile

Malinko 10-06-2004 11:59 PM

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.

VeX_RaT_Boy 10-07-2004 02:03 AM

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.

Alexander 10-07-2004 05:49 AM

Is it shooting serverside or clientside

VeX_RaT_Boy 10-07-2004 12:18 PM

Hmm.. That might be the problem. This one is serverside, while all other that works are clientside...

Alexander 10-07-2004 03:27 PM

- 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?

Malinko 10-07-2004 09:31 PM

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.

Alexander 10-08-2004 12:24 AM

Quote:

Originally Posted by Malinko
Alex owns me in everything I do >=o!

Remember this Malinko ;)

xAndrewx 10-08-2004 08:48 AM

Shoot is clientside if you didn't know.

Alexander 10-08-2004 03:56 PM

No it isn't, I'm pretty sure it is serverside too O.o

Tolnaftate2004 10-08-2004 05:41 PM

It would be useless to have actionsprojectile if shoot was clientside only. :)

xAndrewx 10-08-2004 09:39 PM

Era's gun's are clientside, Saw the shootcommand in the clientside part :O

Malinko 10-08-2004 09:53 PM

Quote:

Originally Posted by Alexander
Remember this Malinko ;)

I know how you look like, your phone number, and where you live.

;).

Lance 10-14-2004 08:06 PM

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.

Toxen 02-22-2008 04:22 PM

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

Chompy 02-22-2008 04:50 PM

Quote:

Originally Posted by Toxen (Post 1376183)
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 :)

cbk1994 02-22-2008 05:30 PM

Quote:

Originally Posted by Chompy (Post 1376187)
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

bscharff 02-22-2008 06:31 PM

and you said I was bumping threads?
rofl :P

xAndrewx 02-22-2008 09:07 PM

oh i did giggle at my old replys, haha

Codein 02-22-2008 11:34 PM

Quote:

Originally Posted by xAndrewx (Post 1376230)
oh i did giggle at my old replys, haha

best era manager eva.

Inverness 02-23-2008 12:54 AM

Thread Necromancy at its finest.
Quote:

Originally Posted by bscharff (Post 1376207)
and you said I was bumping threads?
rofl :P

Yes, you were.


All times are GMT +2. The time now is 05:59 PM.

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