IPB

Welcome Guest ( Log In | Register )


> [solved] Long and short-range weapons, both on a single unit
KajiTetsushi
post Jun 20 2010, 08:03 PM
Post #1


Flamethrower Infantry
Group Icon

Group: Members
Posts: 141
Joined: 22-October 06
Member No.: 92



Okay, like this: I happen to remember a game called Warzone 2100. There's a rocket artillery in this game that works in a way that:

  • If the enemy is far away (say, middle to maximum range), the rocket artillery will launch rockets in a low arc, like a Tick Tank's gun ballistic.
  • If the enemy is up close (in this case, below middle range), the rocket artillery will launch rockets in a high arc, like the Artillery's gun ballistic.

So, I experimented with it. I made two weapons, say,
[227mmLo] and [227mmHi], for low-arc and high-arc ballistics respectively.

Both weapons deal the same amount of damage, use the same warhead, reload in the same rate - everything is the same,
except in certain conditions,
where [227mmLo] has a Range=14, a MinimumRange=6 and Lobber=no
where [227mmHi] has a Range=5 and Lobber=yes.


Result? It didn't work. What the TS engine would do is force the launcher to forever use 227mmLo. I've tried with other methods such as raising damage of 227mmHi so that the game will conclude this weapon is more damaging and hopefully start raising hell when units are up close. Tweaking the warhead didn't help, either. One weapon went only for buildings, the other for everything else.


Correct me if I'm wrong: my understanding of the Primary and Secondary is just a question of which weapon is more useful against what. I mean, I know how to make a Mammoth Tank fire shells on tanks and missiles on infantry RA1 style with the right warhead and damage, but how about this one?

Again, to sum it up, this is about making a unit's weapon behave differently depending on the distance of the enemy from the unit.


Problem solved. Those who are reading can refer to LKO's solution and my correction in the post after that.

This post has been edited by Chris Ichikawa: Jun 27 2010, 08:37 PM


--------------------
Go to the top of the page
 
: | +Quote Post
 
Start new topic
Replies
Lin Kuei Ominae
post Jun 21 2010, 11:09 AM
Post #2


Stealth Tank
Group Icon

Group: Members
Posts: 1,065
Joined: 14-November 06
From: Germany
Member No.: 281
Alliance: CABAL
Favorite game: Tiberian Sun



A unit will always try to use first the primary weapon and then if it's not possible the secondary.
In addition it will only consider the warhead if both weapons are able to shoot at the target. This shouldn't play a role in your case.

It could be that MinimumRange isn't used correct when both weapons are mainly the same.
Try Primary=[227mmHi] and Secondary=[227mmLo]
With the long range weapon as secondary it should use it correct when standing still and firing automatically on incoming units.

Also give [227mmHi] Range=6. With Range=5 there would be a gap between the two weapons where it can't fire: from Range=5.1 to Range=5.9

If the above fails you can possibly force the game to use the other weapon using the warhead.
e.g.
Primary=[227mmLo] WarheadVerses=50% Damage=100
Secondary=[227mmHi] WarheadVerses=100% Damage=50

The game will notice that the secondary shortrange weapon [227mmHi] has a more effective warhead, thus using this one instead. Though the dealt damage will be the same due to the halved damage.

This post has been edited by Lin Kuei Ominae: Jun 21 2010, 11:17 AM


--------------------
Co-Leader of Twisted Insurrection
my public units for you
Nod units:____________________________GDI units:
Nod Scorpion__________________________GDI 3A Kodiak
Nod Tachyon Tank______________________GDI Medusa (Triple Cannon Mech)
Nod Goliath___________________________GDI Behemoth (medium size Mech)
Nod Cobra (fast medium mech)__________GDI Battleship Aurora
Nod Siegebot (light MG-Mech)__________GDI Fortress Tower (Heavy Base Defense)
Nod Redeemer (4 legged heavy Cyborg)__GDI Triton (Titan support Mech)
Nod/Scrin WotW Tripod_________________GDI Exciter
______________________________________GDI Ion Charge Collector
Misc and Fun units:
X-Mech Calendar 28 SHP Units
Star Wars Mechs ATAT/ATST
Cyborg Barrack on PPM_________________Mech Factory
Mutant Tiberium Flyer
yt1300 (Millenium Falcon + BIG version)

if you use my units in your mod, please credit me.if you want to use my units on your website please ask me before.
Go to the top of the page
 
: | +Quote Post



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 10th November 2026 - 12:28 PM


XGhozt.com