Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-19-2010, 01:40 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by jkldogg View Post
anyway to make guns hurt the baddy instead of swords?
Projectiles that hit it will trigger onActionProjectile(), and depending on the parameters of the projectiles you can have it react accordingly.

Also if the projectile is shot on the server-side it will also trigger onActionSProjectile().

PHP Code:
// NPC was hit by a shoot projectile that originated on the client-side.
function onActionProjectile() {
  
// Handle accordingly
}

// NPC was hit by a shoot projectile that originated on the server-side.
function onActionSProjectile() {
  
// Handle accordingly

__________________
Quote:
Reply With Quote
  #2  
Old 03-19-2010, 05:45 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by fowlplay4 View Post
Projectiles that hit it will trigger onActionProjectile(), and depending on the parameters of the projectiles you can have it react accordingly.

Also if the projectile is shot on the server-side it will also trigger onActionSProjectile().

PHP Code:
// NPC was hit by a shoot projectile that originated on the client-side.
function onActionProjectile() {
  
// Handle accordingly
}

// NPC was hit by a shoot projectile that originated on the server-side.
function onActionSProjectile() {
  
// Handle accordingly

I think this should be built into the next version.
Reply With Quote
Reply


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:20 PM.


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