Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-24-2009, 06:17 AM
Novice Novice is offline
Developer
Join Date: Dec 2008
Posts: 90
Novice is an unknown quantity at this point
Send a message via MSN to Novice
Help with projectiles (again)

I'm trying to set up N-Pulse Rebirth's spell system so that it checks for if the projectile is hitting a baddy.
I have no clue how to go about doing this, but getting it to hit players works perfectly.
I'm only going to give all the shooting param stuff that works for players, but not baddies.

In the main Spell system:
PHP Code:
function onActionServersidecmdp1 ) {
  switch ( 
cmd ) {
    case 
"Attack":
      
triggerclient("gui","-System/Health","Attacked",player.x,player.y,p1,player.account);
    break;
  }
}
//#CLIENTSIDE
//a bunch of spell loads here\\

function onCast() {
  
//mp and cooldown checks here\\
      
setShootParams(this.spell_effect,this.spell_power,this.spell_bonus);
      
this.spell_angle getangle(vecx(player.dir),vecy(player.dir));
      
shoot(player.x+vecx(player.dir), player.y+vecy(player.dir), player.zthis.spell_angle10this.spell_shootaninull);
  
//some more checking\\
}

function 
onActionProjectileeffectpowerbonus ) {
  switch ( 
effect ) {
    
    case 
"Hurt":
   
//hurt loads\\
      
triggerserver("gui",this.name,"Attack",temp.hpower);
    break;
  }

All of that works for players. I've got no clue how to make it check to baddies. How would I go about doing this?
Reply With Quote
 


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 09:20 AM.


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