Jump to content


Deathstrike

Member Since 16 Mar 2006
Offline Last Active Jul 14 2006 01:55 PM

Topics I've Started

Weapon firing speed

29 March 2006 - 03:05 PM

Alright, confusing problem over here...

I'm writing up an assault rifle weapon code for my mod, but for some reason I can't get it to fire faster than once every ~500 milliseconds, no matter what value I enter. I removed all art code dealing with firing and reloading weapons from my unit just to be sure, but that had no effect.

So, my question is: Is it even possible to have a unit fire faster than that? Are there things I've forgotten to do? Or is it just a hardcoded minimum firing delay?

Here's my weapon code btw:
Weapon FederationTrooperBasicWeapon
	AttackRange		 = 350
	RangeBonusMinHeight	= 10
	RangeBonus		= 1
	RangeBonusPerFoot	= 8
	
	WeaponSpeed			= 321		; dist/sec 
	MinWeaponSpeed	  = 241
	MaxWeaponSpeed	  = 481	 ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
	FireFX			  = FX_RohanArcherBowWeapon
	ScaleWeaponSpeed	= Yes; Used for lob weapons, scales speed proportional to range
	HitPercentage	   = 70
	ScatterRadius	   = 16.0	;When this weapon misses it can randomly miss by as much as this distance.
	AcceptableAimDelta	= 20; prevent twitchy reaiming in horde on horde
	DelayBetweenShots   = 90;I tried setting this to 1 aswell, had no effect.
	PreAttackDelay	  = 0;ELVEN_MIRKWOOD_ARCHER_BOW_PREATTACKDELAY  
	PreAttackRandomAmount	 = 0  
	PreAttackType	   = PER_POSITION
	FiringDuration	  = 0   

	ClipSize			= 30
	AutoReloadsClip		= Yes
	ClipReloadTime		= Min:2000 Max:3000

	AntiAirborneVehicle	= Yes
	AntiAirborneMonster	= Yes
	HitPassengerPercentage	= 20%
	CanBeDodged				= No;Good luck at dodging bullets, unless you're called 'Agent Smith'.
	ProjectileNugget
		ProjectileTemplateName  = GenericBullet
		WarheadTemplateName	 = FederationTrooperBasicWarhead
		ForbiddenUpgradeNames   = Upgrade_OutOfAmmo1
	End
End

Disabling weapons?

27 March 2006 - 05:38 AM

I'm scripting a code that allows units to have only limited ammo, which is resupplied by ammo trucks and depots. I won't go into the details since it's not really finished yet, but I'm positive it is possible (I'm using Lua scripting for the largest part)

Though, I have one question. Is it somehow possible to disable a single weapon on a unit when that unit gets an upgrade? I'd rather not use the PLAYER_UPGRADE weaponset, and since I'm not really familiar to BFME2 modding yet the question has me riddled...

If there really is no alternative, ideas on how to disable the full weaponset are also very much welcome ;)

Thanks in advance,

Deathstrike