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 03-02-2009, 04:40 PM
Schetti Schetti is offline
SC2 Player
Schetti's Avatar
Join Date: Nov 2008
Location: Austria
Posts: 269
Schetti is on a distinguished road
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.
__________________
“Peace cannot be kept by force. It can only be achieved by understanding.” – Albert Einstein
Reply With Quote
  #2  
Old 03-02-2009, 04:59 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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.
__________________
Reply With Quote
  #3  
Old 03-02-2009, 05:04 PM
Schetti Schetti is offline
SC2 Player
Schetti's Avatar
Join Date: Nov 2008
Location: Austria
Posts: 269
Schetti is on a distinguished road
Quote:
Originally Posted by cbk1994 View Post
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 ...
__________________
“Peace cannot be kept by force. It can only be achieved by understanding.” – Albert Einstein
Reply With Quote
  #4  
Old 03-02-2009, 05:31 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
PHP Code:
function onWeaponFired() {
  
setshootparams("m16");
  
// ...
}
function 
onActionProjectile(weapon) {
  if (
weapon == "m16") {
    
hurt .5;
  }

__________________
Reply With Quote
  #5  
Old 03-02-2009, 06:05 PM
Schetti Schetti is offline
SC2 Player
Schetti's Avatar
Join Date: Nov 2008
Location: Austria
Posts: 269
Schetti is on a distinguished road
aah
thanks
__________________
“Peace cannot be kept by force. It can only be achieved by understanding.” – Albert Einstein
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 08:01 PM.


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