Weapons range variable?
Moderator: Moderators
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
Weapons range variable?
Is it possible to have, for example, missile towers have a range of x for ground units but y for airborn units?
- BlackLiger
- Posts: 1371
- Joined: 05 Oct 2004, 21:58
- BlackLiger
- Posts: 1371
- Joined: 05 Oct 2004, 21:58
Viable for OTA style units. If I recall, spring has a 32, is it, weapon maximum for a unit before it begins to lag badly with calculation. Thats with 1 unit. Now, for a mod I've been designing, I want a unit with at least 9 different, independant weapons. I can have 3 of them on the map without much lag. Therefore, as 1 of them is an anti tank/anti air missile, it'd become 10 by your method. Annoying, but bearable. However, what about a mod with 10 weapons by default on a unit? that becomes 11, so lag occurs after 3 units are built. Which annoys the hell out of players.KDR_11k wrote:Yes but that would still be hardcoded behaviour to split between air and ground units. Just use two weapons that have disjunct onlytargetcategory tags.
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
Paulo: Jam the weapon if the other weapon has aimed or shot recently.
Liger: What do you have that many weapons for? Are you sure you couldn't turn some of them into one weapon that uses multiple firepoints?
This is still very special case behaviour that IMO does not belong into the engine, if you want tons of weapons that behave differently against different targets use multiple weapons.
Liger: What do you have that many weapons for? Are you sure you couldn't turn some of them into one weapon that uses multiple firepoints?
This is still very special case behaviour that IMO does not belong into the engine, if you want tons of weapons that behave differently against different targets use multiple weapons.
- BlackLiger
- Posts: 1371
- Joined: 05 Oct 2004, 21:58
Independant targeting of each weapon on a different target.KDR_11k wrote:Paulo: Jam the weapon if the other weapon has aimed or shot recently.
Liger: What do you have that many weapons for? Are you sure you couldn't turn some of them into one weapon that uses multiple firepoints?
This is still very special case behaviour that IMO does not belong into the engine, if you want tons of weapons that behave differently against different targets use multiple weapons.
I dont want this tank surrounded by infantry and only able to shoot at 1 of them....
- BlackLiger
- Posts: 1371
- Joined: 05 Oct 2004, 21:58
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
Like j5mello said. That is a scripting thing, right?KDR_11k wrote:Paulo: Jam the weapon if the other weapon has aimed or shot recently.
...
Would i be able to jam it for the weapon's reload time or would it need to be jammed for a specific time? If i need to specify a time for the jam in the script, that will mean that that unit is unmaintainable since every single time i want to rebalance it by changing reload times, i would have to recompile it's script...
Let's say Weapon1 and Weapon2 are technically the same, during their Aim function they check a static var and if it's true they assume the other weapon is blocking stuff. Whenever one of them fires it sets the var that blocks the other and starts a function that will reset it after the reload time is over (make sure you kill this function with a signal if a Fire function is called again before the blocking ends, just in case).
All weapons follow the same targeting logic so they'll usually pick the same target if it's not invalid for some of them because of fire arcs or target categories.
All weapons follow the same targeting logic so they'll usually pick the same target if it's not invalid for some of them because of fire arcs or target categories.
- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24
- BlackLiger
- Posts: 1371
- Joined: 05 Oct 2004, 21:58