Question: Direct hull damage

Discussion in 'Coding' started by MajorTom, Aug 28, 2010.

  1. MajorTom

    MajorTom Member

    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    0
    Is it possible to have a vehicle weapon that deals a little damage to both the armor and hull at the same time? And if so how would I do it?

    I'm trying to make a new vehicle weapon or two, maybe in time I will tie it into the electrical tree to give it its mg weapon.

    What I have so far.
    Code:
    "Armor Piercing Gatling Gun"
    	{
    		"Name"			"Armor Piercing Gatling Gun"		//name given when selecting weapons
    		"HUD Name"		"AP Gatling"			//name displayed in the weapon area of the vehicle HUD
    		"Description"		"A large gatling gun that deals damage to both a vehicles armor and its hull, though very little"		//description given when selecting weapons
    		"Icon"			"vehicles/gui/weapons/mg_large"		//icon drawn in the GUI
    		"HUD Icon"		"vehicles/gui/weapons/mg"
    		"Size"			"3"		//number of slots required when selecting weapons
    		"Type"			"0"		//0=machine gun, 1=tank cannon, 2=artillery cannon, 3=missile launcher, 4=grenade launcher, 5=aircraft bomb bay
    		"Cost"			"150"		//cost of this weapon added onto vehicle cost
    		"Team"			"ALL"		//team that can use this "NF" or "IMP"
    		"Research"		""		//name of research item that must be researched before using
    		"Sound Firing"		"Vehicle_DUHMG.Fire"
    		"Sound Impact"		""
    		"Sound Reloading"	""
    
    		"Damage Type"		"APBullet"
    		"Ammo Type"		"1"		//for mguns only, 0 = nonarmor penetrating (no effect on armored vehicles), 1 = armor penetrating (hurts armored vehicles), 2 = explosive (hurts vehicles and has a radius damage around it based on 'explosion radius'"
    		"Damage"		"4"		//damage done by projectile
    		"Speed"			"1000"		//speed of projectile
    		"Gravity"		"0"		//effects of gravity on the projectile, only for projectiles
    		"Heat"			"0.6"		//heat added per shot fired (100 total heat added to vehicle puts it in an overheated status).
    		"Weight"		"50"		//weight in terms of effects on engine and weight restrictions for chassis
    		"Cycle Time"		"0.05"		//time between shots
    		"Clip Size"		"50"		//ammo loaded per reloads
    		"Total Ammo Clips"	"5"		//max ammo clips carried (0 is the same as not using clips)
    		"Reload Time"		"2.5"		//time to load one clip, if total ammo clips is '0', time to reload one unit of ammo (as one unit of ammo is reloaded per time and not a full clip)
    		"Projectile Spread"	"0.02"		//only applicable to machine guns at the moment
    		"Heat To Target"	"0"		//heat added to target on hit (a small amount of heat is also added to the target based on damage, this is defined within the armor script)
    		"Inertia"		"1"		//only applicable to cannons, artillery cannons, and grenades; affects how the speed of the vehicle affects the momentum of the projectile (higher inertia = vehicle speed will affect the trajectory of the projectile possibly causing it to veer off from a straight line or shoot farther or shorter)
    		"Explosion Radius"	"0"		//radius of damage sphere to hurt surrounding entities
    		"Explosion Force"	"0"		//force of explosion
    
    		//only for missile launchers
    		"Dumb Missile"			"0"		//'1' if missile flies straight ahead
    		"Homing Missile"		"0"		//'1' if missile flies towards locked on target
    		"Guided Missile"		"0"		//'1' if missile follows crosshairs after launch
    		"Missile Range"			"0"		//max range in HL2 units (1 inch = 1) that the player can lock onto a target with a homing missile, or range from vehicle being fired from when a guided missile stops following the player's crosshairs
    		"Lock On Time"			"0"		//time it takes for a homing missile to lock onto the target under the player crosshairs
    		"Lock Range Modifier"		"0"		//modifies lock on time based on range (as range increases, lock on time increases based on the modifier: modifier * range to target + lock on time = total lock on time)
    		"Countermeasure Effectiveness"	"0.9"		//a percentage (1 = 100%) which determines how likely the missile will lock onto a flare or chaff rather than the actual target when flares or chaff is inbetween it and its target. When a flare or chaff is detected in front of the missile, a number between 0.000 and 1.000 is generated.  If the number is less than the effectiveness number, the missile will target the flare/chaff.
    		"Turning Ability"		"0.2"		//determines how effective the missile can turn to home in on its target or guide itself to the crosshair for a guided missile; 1.0 means the missile can turn instantly towards its target, 0.0 and the missile doesn't turn at all
    
    		//explosion effects
    		"Explosion Speed"	"3"	//how long the explosion sprite lives (15 is default)
    		"Explosion Sprite"	"1"	//explosion sprite to use for explosion, 0 = default, 1 = green (bio), 2 = blue (plasma)
    		
    		//effects
    		"Tracer Type"		"tracer_du" //Tracer effect, tracer names are logical, a list: tracer_du, tracer_bio, tracer_he, tracer_rifle, tracer_smg, tracer_vehiclemg, tracer_cg, tracer_plasma
    		
    		//Falloff
    		"Falloff"			"2500"		
    		"Falloffbase"			"0.9"		
    		"MinimalDamage"			"2"	
    	}
    Edit: Also if anyone can provide me with a link to the thread with the lazor particle download I really need it
     
    Last edited: Aug 28, 2010
  2. Brutos

    Brutos Administrator Staff Member Moderator

    Messages:
    3,385
    Likes Received:
    0
    Trophy Points:
    0
    I would need to change the code for that.
     
  3. LordDz

    LordDz Capitan Rainbow Flowers

    Messages:
    5,221
    Likes Received:
    0
    Trophy Points:
    0
    A dev that answer?!

    EMP IS ALIVE!
     
  4. MajorTom

    MajorTom Member

    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    0
    Another question, do tracers follow cannons?

    I wanna say they don't, so if not, how would I get a cannon or even a missile to be followed by a trail of some sort?
     
    Last edited: Aug 29, 2010
  5. Paradox

    Paradox I am a gigantic asshole who loses people's hard wo

    Messages:
    6,926
    Likes Received:
    148
    Trophy Points:
    0
    hey major tom if u make an mg for electrical, i suggest like emp bullets or something like that, it does damage to the plates and the inner system what represents the hull.
     
  6. MajorTom

    MajorTom Member

    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    0
    Also, I need to know why my lazor is attacking way off center.

    I fire it and where it hits (or at least where the explosion occurs) is 5 miles away from the center of the crosshair and the cannon/missile sprite.

    Maybe it goes too fast?
    Code:
    	"Lazor Beam"
    	{
    		"Name"			"Lazor Beam"		//name given when selecting weapons
    		"HUD Name"		"Lazor Beam"			//name displayed in the weapon area of the vehicle HUD
    		"Description"		"This weapon uses a large amount of mirrors, lenses, and a gas medium to create a lazor beam which does a large amount of damage to the target with pinpoint accuracy."		//description given when selecting weapons
    		"Icon"			"vehicles/gui/weapons/cn_large"		//icon drawn in the GUI
    		"HUD Icon"		"vehicles/gui/weapons/cn"
    		"Size"			"3"		//number of slots required when selecting weapons
    		"Type"			"3"		//0=machine gun, 1=tank cannon, 2=artillery cannon, 3=missile launcher, 4=grenade launcher, 5=aircraft bomb bay
    		"Cost"			"160"
    		"Team"			"ALL"		//team that can use this "NF" or "IMP"
    		"Research"		"Rail Gun"		//name of research item that must be researched before using
    		"Sound Firing"		"Vehicle_RG.Fire"
    		"Sound Impact"		"Vehicle_RG.Impact"
    		"Sound Reloading"	""
    
    		"Damage Type"		"Missile"
    		"Ammo Type"		"0"		//for mguns only, 0 = nonarmor penetrating (no effect on armored vehicles), 1 = armor penetrating (hurts armored vehicles)
    		"Damage"		"15"		//damage done by projectile
    		"Speed"			"15000"		//speed of projectile
    		"Gravity"		"0"		//effects of gravity on the projectile, only for projectiles
    		"Heat"			"2"		//heat added per shot fired (100 total heat added to vehicle puts it in an overheated status).
    		"Weight"		"90"		//weight in terms of effects on engine and weight restrictions for chassis
    		"Cycle Time"		"0.1"		//time between shots (all weapons other than MGs have limits of 0.1 as lowest)
    		"Clip Size"		"25"		//ammo loaded per reloads
    		"Total Ammo Clips"	"3"		//max ammo clips carried (0 is the same as not using clips)
    		"Reload Time"		"4.0"		//time to load one clip
    		"Projectile Spread"	"0.01"		//only applicable to machine guns at the moment
    		"Heat To Target"	"4"		//heat added to target on hit (a small amount of heat is also added to the target based on damage, this is defined within the armor script)
    		"Inertia"		"0"		//actually reverse to inertia, only applicable to cannons, artillery cannons, and grenades; affects how the speed of the vehicle affects the momentum of the projectile (higher inertia = vehicle speed will affect the trajectory of the projectile possibly causing it to veer off from a straight line or shoot farther or shorter)
    		"Explosion Radius"	"20"		//radius of damage sphere to hurt surrounding entities
    		"Explosion Force"	"5"		//force of explosion
    		"Explosion Sprite"	"6"
    
    			//only for missile launchers
    		"Dumb Missile"		"1"		//'1' if missile flies straight ahead
    		"Homing Missile"	"0"		//'1' if missile flies towards locked on target
    		"Guided Missile"	"0"		//'1' if missile follows crosshairs after launch
    		"Missile Range"		"0"		//max range in HL2 units (1 inch = 1) that the player can lock onto a target with a homing missile, or range from vehicle being fired from when a guided missile stops following the player's crosshairs
    		"Lock On Time"		"0"		//time it takes for a homing missile to lock onto the target under the player crosshairs
    		"Lock Range Modifier"	"0"		//modifies lock on time based on range (as range increases, lock on time increases based on the modifier: modifier * range to target + lock on time = total lock on time)
    	}
    Wait, theres another damage type? That does this?
     
    Last edited: Aug 29, 2010
  7. Mashav

    Mashav Member

    Messages:
    566
    Likes Received:
    0
    Trophy Points:
    0
    Yes. If things go too fast, they start flying all over the place.
    No. He has no idea what he's talking about.
     
  8. MajorTom

    MajorTom Member

    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    0
    i wonder if it only does that if it goes OVER 9000!!!
     
  9. Nickierv

    Nickierv Member

    Messages:
    510
    Likes Received:
    0
    Trophy Points:
    0
    "Speed" "15000" is the problem. 3600 is about the max safe speed that projectiles can travel. Any faster and the physics stop working.
     
  10. blizzerd

    blizzerd Member

    Messages:
    10,552
    Likes Received:
    60
    Trophy Points:
    0
    it starts getting graduately funky at 2800-2600 depending on lag
     
  11. alucard13mmfmj

    alucard13mmfmj Member

    Messages:
    2,170
    Likes Received:
    0
    Trophy Points:
    0
    yeh the tracers at time are horrible X_X its like its firing everywhere but at the crosshair
     
  12. Paradox

    Paradox I am a gigantic asshole who loses people's hard wo

    Messages:
    6,926
    Likes Received:
    148
    Trophy Points:
    0
    I suggested a name for it and functions not that there was a mg for it.
     
  13. Cyber-Kun

    Cyber-Kun Member

    Messages:
    1,200
    Likes Received:
    0
    Trophy Points:
    0
    MG weapons are all hitscan weapons anyways, so they ignore the speed and just instantly hit.
     

Share This Page