Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   detect where projectile hits wall? (https://forums.graalonline.com/forums/showthread.php?t=72762)

JkWhoSaysNi 03-11-2007 08:34 PM

detect where projectile hits wall?
 
is there any way to send the x/y of where the projectile hit a wall (or player) back to the NPC that sent it?

Chandler 03-11-2007 09:25 PM

PHP Code:

function onactionProjectile2() 

I think you need to add in the setshootparams the x/y of the position it was sent from

JkWhoSaysNi 03-11-2007 09:52 PM

ah, thanks.

While I'm on the topic is there any way to speed up projectiles? Really, I want one that fires very fast.

Chandler 03-11-2007 10:28 PM

Yes
HTML Code:

shoot x,y,z,angle,zangle,power,gani,ganiparams; shoots a projectile

JkWhoSaysNi 03-11-2007 10:38 PM

But I've got that already.

I take it power is the speed? I changed it, but with it changed, it doesn't hit destroy when it hits walls.

napo_p2p 03-11-2007 11:07 PM

I've always wanted another type of shoot command with a gravity param :(.

Anyways, if I remember correctly, the power parameter has different effects depending on the gravity.

JkWhoSaysNi 03-11-2007 11:49 PM

I've tried setting gravity high and low, it has an effect and while I can get it to change speed, I cant get it to hit walls at faster speeds. It just flies right over them.

Admins 03-12-2007 04:15 PM

If you set the power of the projectile then it will not work as a classic arrow anymore (which stops at tile walls), it will then fly over them except you place blocking npcs there.

JkWhoSaysNi 03-12-2007 04:25 PM

Ok thanks. I really need it to hit the walls.

To be honest I'm probably abusing shoot() anyway. I'm using it from a light to determine which area should be light and which should be shadow in a level. Speeding up the projectile would speed up the process but ah well, it only needs to be done once per level.


All times are GMT +2. The time now is 02:52 PM.

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