Author Topic: How do i use miniGameCanDamage()  (Read 2638 times)

How do i use miniGameCanDamage() and implement it into a weapon script (like gun)  (Only if it allows two players outside of minigames to damage eachother otherwise what does this do anyway?)

 miniGameCanDamage(%obj,%obj2) returns 1 or 0. Depending on whether they can damage eachother.

what you want to do it

package iHatesnake
{
   function miniGameCanDamage(%obj1,%obj2)
   {
      if($killAll)
         return 1;
      else
         return parent::miniGameCanDamage(%obj1,%obj2);
   }
};activatepackage(iHatesnake);

What are you trying to do?


Make a sandwich.
Are you being serious or just a cunt is this just a joke?

Are you being serious or is this just a joke?
Its a joke, i'm making an addon for my clan's authority figures

Make a sandwich.

I thought you were actually serious about making a sandwich item.

I thought you were actually serious about making a sandwich item.
i cant mod, I'm just changing the basic gun a little but that would be awesome. and i added the code that perlin noise posted and its not working

i cant mod, I'm just changing the basic gun a little but that would be awesome. and i added the code that perlin noise posted and its not working

He was giving an example.

i cant mod, I'm just changing the basic gun a little but that would be awesome. and i added the code that perlin noise posted and its not working

run the example
then in console once you run it type
$KillAll = true;
then it will work.

run the example
then in console once you run it type
$KillAll = true;
then it will work.
Can't I just put that in the cs file?

Yes. But this entire thing seems like a bad idea.

Yes. But this entire thing seems like a bad idea.
I'm not publishing it its 4 my clans observers and only them

its not working

here's a snippit of that part of the code

Code: [Select]
//gun.cs
$killAll = true;
package XMinigame
{
  
   function miniGameCanDamage(%obj1,%obj2)
   {
      if($killAll == true)
         return 1;
      else
         return parent::miniGameCanDamage(%obj1,%obj2);
   }
  
  
};activatepackage(XMinigame);

//audio...[/size]
I wasn't about to use IHatesnake
« Last Edit: February 22, 2013, 06:46:47 PM by Yin Yang »

I wont be helping you if all you say is
"It's not working"