Author Topic: Fire Function  (Read 1115 times)

what do i script to fire a weapon

To force a weapon to fire? To simulate left mouse trigger? To simulate left mouse clientside? Information on the WeaponImage::onFire() state?

What do you want?

To force a weapon to fire What do i script?

When do you want to make it fire?

Try looking at a existing gun script =D

i just wanna know what and where to type the gun fire script

i just wanna know what and where to type the gun fire script

I believe that it is automatically created along with a weapon, so you shouldn't need to worry about it.

Providing you did the usual way of creating a weapon, of course.

Code:

//staff.cs

//audio
datablock AudioProfile(fireballFireSound)
{
   filename    = "./sound/Lazer.wav";
   description = AudioClosest3d;
   preload = true;
};

datablock projectileData(staffProjectile : wandProjectile)
{
   projectileShapeName = "";
};

datablock itemData(staffItem : wandItem)
{
   shapeFile = "./shapes/staff.dts";
   
   uiName = "Staff";
   iconName = "";
   
   image = staffImage;
   canDrop = true;
   
   colorShiftColor = (100/255) SPC (50/255) SPC (0/255) SPC (255/255);
};

datablock shapeBaseImageData(staffImage : wandImage)
{
    shapeFile = "./shapes/staff.dts";
   
   projectile = staffProjectile;
   
   stateEmitter[1] = playerjetgroundemitter;
   stateEmitter[3] = playerjetgroundemitter;
   
    colorShiftColor = staffItem.colorshiftColor;