Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Shoot params help (https://forums.graalonline.com/forums/showthread.php?t=66113)

wild8900 05-19-2006 05:14 AM

Shoot params help
 
Ok, so Ive been toying with shoot for some time. Ive gotten it to work a long time ago but Ive been using in the weapon npc

NPC Code:
setshootparams 0,0,arrow;
shoot yadayadayada;



and I use this in the main system. I want to make an explosion or bomb be set where the projectile hit a player or hit a wall. I tried using params but I couldnt get it x.x

NPC Code:
//#CLIENTSIDE
if (actionprojectile){
if (strequals(#p(2),arrow)){
blahblahblah
}


wild8900 05-19-2006 07:05 AM

well, I was toying with it and i got the put bomb thing to work but it only goes to 0,0 so I know
setshootparams 0,0,arrow;
is wrong.
What do I put so it goes to where the arrow is?

ApothiX 05-19-2006 02:25 PM

I believe parameters in the actionprojectile event tell you where the projectile landed. Might want to try reading newfeatures or commands.rtf.

Raeiphon 05-19-2006 03:51 PM

Okie, what are the params for actionprojectile in GS2? I've been quite confused about that for a while.

wild8900 05-19-2006 07:02 PM

Quote:

Originally Posted by ApothiX
I believe parameters in the actionprojectile event tell you where the projectile landed. Might want to try reading newfeatures or commands.rtf.

right, I can get a bomb to appear at #p(0),#p(1) but those coordinates are at 0,0 cause I used
setshootparams 0,0,arrow;

how do I use setshootparams but still be able to detect x,y when colisided with a wall or player?

Luigi203 05-19-2006 07:07 PM

Actionprojectile is called when a projectile hits the player (clientside), or when a projectile lands (serverside), but it doesnt return coordinates.
You have to use actionprojectile2 (clientside only). #p(0) and #p(1) are the x and y were the projectile landed, and #p(2) starts the params you specified.


All times are GMT +2. The time now is 01:23 AM.

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