Graal Forums

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

Schetti 03-02-2009 04:40 PM

ShootPARAMEQUALS
 
Well... maybe thats above my ability level but its very anyoning and one of my friends also wants to know.
PHP Code:

if (weaponfired){
  
setshootparams PARAMEQUALS;
//...
}

if (
actionprojectile) {
  if(
strequals(#p(index),PARAMEQUALS)) {
hurt 2;
freezeplayer 5;
 }


OK like you see the player gets hurt and freezed if the bullet hits.
Just it does that ALL THE TIME he gets hit by ANY weapon.
Is there another script as if(strequals(#p(index),PARAMEQUALS)) or maybe to check wich gani(bullet) exactly was shot?
Because this is REALLY anyoning if I want lots of diffrent weapons with other power/effect on player.

cbk1994 03-02-2009 04:59 PM

You're supposed to change PARAMEQUALS, for example, to "m16"

Then, check for "m16" instead of PARAMEQUALS when you get hit. I tried to tell your "friend", but he threw a hissy fit.

Schetti 03-02-2009 05:04 PM

Quote:

Originally Posted by cbk1994 (Post 1470648)
You're supposed to change PARAMEQUALS, for example, to "m16"

Then, check for "m16" instead of PARAMEQUALS when you get hit. I tried to tell your "friend", but he threw a hissy fit.

do you mean that:
PHP Code:

if (weaponfired){ 
  
setshootparams "m16"
//... 


if (
actionprojectile) { 
  if(
strequals(#p(index),"m16")) { 
hurt 0.5
 } 


who you tryed to tell? loldief?
He made this nice LAME gun wich kills everyone by 1 shot thats silly and lame, just because if I got it too, I die by each bullet wich hits me ...

cbk1994 03-02-2009 05:31 PM

PHP Code:

function onWeaponFired() {
  
setshootparams("m16");
  
// ...
}
function 
onActionProjectile(weapon) {
  if (
weapon == "m16") {
    
hurt .5;
  }



Schetti 03-02-2009 06:05 PM

aah
thanks


All times are GMT +2. The time now is 09:34 PM.

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