Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - RHK

Pages: [1]
1
Modification Help / Touble with muzzle flash explosion
« on: January 01, 2017, 03:16:13 AM »
I'm trying to re-make the L4D2 weapons, but I'm having some trouble. I have a muzzle flash explosion that I'm trying to get working but the gun doesn't show up in-game.
This is the only part that I could have messed up on cause its the only part I've messed with so far.

Script part:
function P200Image::onFire(%this,%obj,%slot)
{
   if(vectorLen(%obj.getVelocity()) < 0.1 && (getSimTime() - %obj.lastShotTime) > 600)
   {
      %projectile = P200Projectile;
      %spread = 0.00001;
      %obj.playThread(2, plant);
   }
   else
   {
      %projectile = P200Projectile;
      %spread = 0.001;
      %obj.playThread(2, activate);
   }
   
   %obj.lastShotTime = getSimTime();

   %shellcount = 1;
   %obj.toolAmmo[%obj.currTool]--;

   for(%shell=0; %shell<%shellcount; %shell++)
   {
      %vector = %obj.getMuzzleVector(%slot);
      %objectVelocity = %obj.getVelocity();
      %vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
      %vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
      %velocity = VectorAdd(%vector1,%vector2);
      %x = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %y = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %z = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
      %velocity = MatrixMulVector(%mat, %velocity);

      %p = new (%this.projectileType)()
      {
         dataBlock = %projectile;
         initialVelocity = %velocity;
         initialPosition = %obj.getMuzzlePoint(%slot);
         sourceObject = %obj;
         sourceSlot = %slot;
         client = %obj.client;
      };
      MissionCleanup.add(%p);
   }

   {
      %projectile = "ATACFlashProjectile";
      %vector = %obj.getMuzzleVector(%slot);
      %objectVelocity = %obj.getVelocity();
      %vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
      %vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
      %velocity = VectorAdd(%vector1,%vector2);
      %x = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %y = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %z = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
      %velocity = MatrixMulVector(%mat, %velocity);

      %p = new (%this.projectileType)()
      {
         dataBlock = %projectile;
         initialVelocity = %velocity;
         initialPosition = %obj.getMuzzlePoint(%slot);
         sourceObject = %obj;
         sourceSlot = %slot;
         client = %obj.client;
      };
      MissionCleanup.add(%p);
   }
   return %p;
}

2
Help / trouble with function P200Image::onFire
« on: January 01, 2017, 03:08:19 AM »
I'm trying to re-make the Left 4 Dead weapons, but i'm having some trouble getting a muzzle flash explosion working.

Script part:
function P200Image::onFire(%this,%obj,%slot)
{
   if(vectorLen(%obj.getVelocity()) < 0.1 && (getSimTime() - %obj.lastShotTime) > 600)
   {
      %projectile = P200Projectile;
      %spread = 0.00001;
      %obj.playThread(2, plant);
   }
   else
   {
      %projectile = P200Projectile;
      %spread = 0.001;
      %obj.playThread(2, activate);
   }
   
   %obj.lastShotTime = getSimTime();

   %shellcount = 1;
   %obj.toolAmmo[%obj.currTool]--;

   for(%shell=0; %shell<%shellcount; %shell++)
   {
      %vector = %obj.getMuzzleVector(%slot);
      %objectVelocity = %obj.getVelocity();
      %vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
      %vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
      %velocity = VectorAdd(%vector1,%vector2);
      %x = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %y = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %z = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
      %velocity = MatrixMulVector(%mat, %velocity);

      %p = new (%this.projectileType)()
      {
         dataBlock = %projectile;
         initialVelocity = %velocity;
         initialPosition = %obj.getMuzzlePoint(%slot);
         sourceObject = %obj;
         sourceSlot = %slot;
         client = %obj.client;
      };
      MissionCleanup.add(%p);
   }

   {
      %projectile = "ATACFlashProjectile";
      %vector = %obj.getMuzzleVector(%slot);
      %objectVelocity = %obj.getVelocity();
      %vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
      %vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
      %velocity = VectorAdd(%vector1,%vector2);
      %x = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %y = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %z = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
      %mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
      %velocity = MatrixMulVector(%mat, %velocity);

      %p = new (%this.projectileType)()
      {
         dataBlock = %projectile;
         initialVelocity = %velocity;
         initialPosition = %obj.getMuzzlePoint(%slot);
         sourceObject = %obj;
         sourceSlot = %slot;
         client = %obj.client;
      };
      MissionCleanup.add(%p);
   }
   return %p;
}

3
Modification Help / DEAD TOPIC
« on: July 17, 2016, 04:10:23 AM »

4
Modification Help / transparent iron sights
« on: April 26, 2015, 09:46:46 PM »
Hello, its me again. I wanted to know how do you do a transparent sight (red dot). Gravity Cat did this with his P90, it had a green glow to it, like a flare. And I want to do this sort of thing. If there is a tutorial, please leave a link.

Picture: (sorry for small picture, I'm lazy right now)

5
Modification Help / Stuff is happening again!
« on: March 29, 2015, 11:52:12 PM »
Hi everybody, this is me again saying that I'm back to work on things again. I look Forward to finishing my pack of weapons soon, the old topic was too old to update. So I'm going to try to make a New forum for everything I make. No pictures or news yet, until I make A new picture account. But there will Finally be a release for an updated version of my weapon pack. And some extra stuff planned.









Link to updated PACK: https://www.dropbox.com/s/2naounmzn9qcn9q/Weapon_RHK.zip?dl=0

that should be the updated version, if not, PM me! (or just say so in comments)

Will keep this topic posted

Explosions pack: somewhere around 30% done.

-RHK

6
Modification Help / New Weapon Pack (SHUT DOWN UNTIL FURTHER NOTICE)
« on: January 12, 2015, 08:25:34 PM »
Hey guys, this is my project I've bin working on for a while now. I might release if enough people like it. This pack will feature:

SKS - Ammo: 10 - Regular Sights

XM8 - Ammo: 30 - Some type of sight

Glock 20- Ammo: 18 - Regular Sights

MPX - Ammo: 32 - Red Sight Scope

G3 - Ammo: 20 - Regular Sights

SR2 Versek - Ammo: 27 - Red Dot Sight

NEWER WEAPONS

XCR - Ammo: 25 - Eotech Sight

Same thing...

FEEL FREE TO RATE AND REQUEST WEAPONS!

Each weapon will have:
Iron sights
Ammo system
whiz sounds
headshot support (some of them)
suppressed versions (some of them)

Poll Winner: It's fine, just add more detail!
SERVER STATUS: OFFLINE
OVERALL: 97%

7
Mapping Help / Underground lighting and sound problem.
« on: February 19, 2012, 10:13:12 PM »
I have an underground bunker. How do I keep the mission lighting from penetrating the ground? (bunker needs to be dark).
Also, I need to turn the rain/lightning volume down for the players inside.

edit - If I need to use portals for the lighting seperation, I kind of need help on that.

8
General Discussion / Out of the console.log
« on: January 21, 2012, 09:27:11 PM »
Just thought I'd post this.
Executing Add-Ons/System_ReturnToBlockland/modules/client/modManager.cs.
Activating package: RTBC_ModManager
    Add-On folder does not follow the format <category>_<name> - will not execute
Executing Add-Ons/System_ReturnToBlockland/modules/client/serverControl.cs.

Pages: [1]