Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Bullet collision (https://forums.graalonline.com/forums/showthread.php?t=134268622)

i8bit 08-14-2013 06:30 PM

Bullet collision
 
I am making a new shooting system.
How can I trigger an action of my baddie when it collides with the temp.npc("Bullet")
--(trigger "onHurt")

With that, how do I check if a player is within the x,y of the bullet for player collision?

(onPlayerTouchsMe) will only work when player runs into bullet. Not vise-versa.

cbk1994 08-14-2013 06:47 PM

If you really want your projectiles to be NPCs, you probably want to check for players and NPCs in a timeout. You can probably reduce the work a little by checking if you're on a wall first which is probably cheaper than checking every player/NPC to see if there is an overlap. Even if you use move this won't be a very efficient or responsive method of creating projectiles.

A much better approach is to either use the default shooting mechanism (if you can deal with the limits it has) or re-create projectiles clientside using the showimg features (Sales and I did this for Era, although it was never used).


All times are GMT +2. The time now is 08:51 AM.

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