Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-10-2006, 03:58 AM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
"shoot" questions

What flags would I use to hurt the player? How do I track the x and y position of the bullet?
__________________
Reply With Quote
  #2  
Old 04-10-2006, 04:06 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
When a projectile hits, it calls actionprojectile on the player/NPC.

You can set it's parameters with 'setshootparams' before the projectile is shot.
Reply With Quote
  #3  
Old 04-10-2006, 04:29 AM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
How do I use setshootparams?
and do I use actionprojectile only on serverside?

EDIT:
ok, I can get actionprojectile to work with ncs but how do I use it for players?
__________________

Last edited by wild8900; 04-10-2006 at 04:40 AM..
Reply With Quote
  #4  
Old 04-10-2006, 01:59 PM
Raeiphon Raeiphon is offline
I never asked for this.
Join Date: Jun 2005
Posts: 855
Raeiphon is on a distinguished road
Simple.

Make a -System npc and have actionprojectile trigger an event in -System (e.g serverside) and have that do the rest.

E.G -
//System NPC
if (actionprojectile) {
// use your params here, so:
//I dont know the syntax for hurt :O
hurt playerx,playery,#p(0)*2;
}
__________________

I hope for nothing. I fear nothing. I am free.
Reply With Quote
  #5  
Old 04-10-2006, 02:19 PM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
I seem to have small problems with shoot, it fires alright but the bullets/projectiles dont hurt the player.

Quote:
Originally Posted by Shoot
setshootparams #w,#v(this.gunpow);

shoot this.dx,this.dy,playerz,this.angle+random(this.max angle*-
1,this.maxangle),0,0,millenium_bullet,;
Then after a lot more script...

Quote:
Originally Posted by actionprojectile
if(actionprojectile){
if(strequals(#p(0),#w)){
playerhearts-=strtofloat(#p(this.pow));
}
}
Unless that has to be a serverside action?
Reply With Quote
  #6  
Old 04-11-2006, 02:36 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
playerhearts can only be modified serverside, I believe.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
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 07:01 PM.


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