Hate the current system, wanna bash something together with either lua ProjectileCreated callin or ShotX in lus, and LUPS.
Info on colours:
bbs.hitechcreations.com/smf/inde … c=157610.0
forum.1cpublishing.eu/archive/in … 12320.html
books.google.co.uk/books?id=-Zq … ur&f=false
#ShouldaBeenAGithubIssue
edit:
[code]
tracerCache = {} – {weaponDefID = {params}} params contains colour, thickness, length
Initailize()
for weaponDefID, weaponDef in pairs(WeaponDefs) do
if weaponDef.customparams.tracer then
tracerCache[weaponDefID] = loadstring(weaponDef.customparams.tracer)
end
end
end
local roundNumber = {} – {unitID = {weaponNum = roundNum}}
ProjectileCreated(proID, proOwnerID, weaponDefID)
if tracerCache[weaponDefID] then
– problem is determining which weapon fired if unit has multiple copies of one weapon
– e.g. aircraft we want tracers to be per gun, not per weaponDef
local weaponNum = magic()
if not roundNumber[unitID] then roundNumber[unitID] = {} end
local roundNum = roundNumber[unitID][weaponNum] or 1
if roundNum == 5 then – customparam this later too
AddToSendToUnsyncedCache(proID, tracerCache[weaponDefID]) – creation calls are batched to reduce synced->unsynced communication
roundNumber[unitID][weaponNum] = 0
else
roundNumber[unitID][weaponNum] = roundNumber[unitID][weaponNum] + 1
end
end
[/code]