Cortex Command

Cortex Command

Endless content for every part of the game
Built for modding from the ground up, Cortex Command supports a community of talent whose quality work can be enjoyed here: actors, items, vehicles, scenes, game modes, tech factions - you name it!
Learn More
Squad firing separation
Recently, I made a "binoculars" type item, which wouldn't shoot anything but had a long SharpLength. The idea being that you could use a squad and the high zoom to get pretty accurate long-range strikes.
The problem is that I wanted to make it so that there were different binoculars for different gun types. So you could, for example, have a unit switching back and forth between his "sniper" binoculars and his "grenade launcher" binoculars for many long-range seige situations... the issue is that I don't know how to make that happen. I know that it's somewhat tied to classification because no weapons will fire with you if the binoculars are simply a tool. Could someone who knows speak on how that works?
Also, updating the wiki with that information would also be cool.

Thanks for your time.
< >
Showing 1-5 of 5 comments
Tleno 26 May, 2014 @ 4:18pm 
Well I am not exactly sure how the squad fiting works, if it has something to do with simply item type, you have to define what category item belong to, like Heavy Weapons, Sniper Weapons and so on, It's at the begining of item data description, clsoe to name and description lines, you jsut need to add separate lines for each category you'd like to add weapon to. Still, I am uncertain categories is enough for squad firing, if that doesn't work you may need to resort to .lue scripting.
I tried that... The problem is that weapon categorizations do not account for everything. The RPC and M60 are in exactly the same categories, yet neither one will activate the other in a squad.
Since there does not appear to be anything lua-related in this (I looked at the RPC's lua), I think it probably also filters by round type.
Casual Lunatic 1 27 May, 2014 @ 7:33am 
I checked the AI files, first it compares the blast radius of the weapons to each other, then it compares the trajectories of the weapons to each other. if the blast radius of the squad leader's weapon is bigger AND the trajectories of the weapons will hit within 100 pixels of each other, then the ai will fire.

In short: Weapon groups have nothing to do with it, it's all about the particles, make sure that the fake particle fired by your binoculairs has the same kind of properties as the particles fired by your guns.
Thanks. Thats... an impressive way to calculate that. Now to figure out how to make a harmless projectile with a huge AoE. :P
Tleno 28 May, 2014 @ 1:54am 
Originally posted by Visage:
Thanks. Thats... an impressive way to calculate that. Now to figure out how to make a harmless projectile with a huge AoE. :P
Try taking a rocket launcher or something like that, give it base.rte/null.bmp for making an insivible explosive projectile. As for as explosion created by it, give a superhigh velocity, no sharpness and minimal mass to a single particle :P
< >
Showing 1-5 of 5 comments
Per page: 1530 50