Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Mon Jan 28, 2013 9:09 am Post subject:
Yes, Range is a float, it can be decimal. _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
The closest possible range is 0. But this only works if it's a vehicle force firing on the same cell where it stands and with FireFLH=0,0,0 and TurretOffset=0.
If you want to attack directly adjacent cells, you have to include
-unit position (e.g. infantry are off center on 3 different points in a cell)
-target position (like unit position, the target can be at 4 different points: center and the 3 infantry points)
-FireFLH,TurretOffset: this is taken into the range calculation as well.
-flightlevel: if unit or target is flying, the flying height adds to the distance
A perfect melee weapon which can only attack directly adjacent targets is not possible. With a range high enough to attack the cells directly horizontal or vertical adjacent, you'll automatically have a range that is enough to attack the second next diagonal cell too.
A range around 1.75 to 2.5 works good for melee fighters.
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Mon Jan 28, 2013 10:08 am Post subject:
3 infantry can be on a single cell but an infantry can stand on 5 different positions within one. _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Mon Jan 28, 2013 11:27 am Post subject:
Hm. And indeed. Thought there are no differences on this level within RA2 and TS. Seems I was wrong. RA2 has all the preTS inf subpositions. _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
if I apply range of 0 to just infantry
then there wouldn't be any problem right?
It wouldn't be able to shoot, if that's what you want. As written above only vehicles stand in the center and thus can reach the center of a cell with Range=0.
Exley wrote:
(as LKO described if I understood correcly only for vehicles/aircrafts, those complications)
vice versa. Vehicles/Aircraft are centered, thus no issues. Infantry are off the center on the 3 points inside a cell, thus problematic with Range=0
What do you want to do anyway? Such a short range is definitely not working always the way you want it to be.
With Range=0 a unit would be unable to ever attack any enemy. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Joined: 09 May 2011 Location: Approaching the Great Pyramid
Posted: Mon Jan 28, 2013 2:15 pm Post subject:
well I just wanted to make some sort of suicide infantry
like ra2 has that guy who explodes on others
(but this one wouldn't explode, just needs to come very close)
and for that minimal weapon range is needed
unfortunately I think value of 1 cell difference would be kinda too unrealistic QUICK_EDIT
RA2 has only crazy ivan which plants bombs on others, but IIRC no suicide infantry.
here the code i gave the sensordrone in DTA. It's an infantry unit but with a mechanical image. Since infantry can't use an independent explosion animation, i had to use a workaround, which would work well for you too.
rules.ini
Code:
;this on the infantry
[SUICIDEINFANTRY]
Primary=DeathExplo ;LKO: just a dummy weapon whose warhead explosion is used when it gets destroyed
Explodes=yes ;use the weapons warhead explosion since Explosion= doesnt works on infantrytypes
[DeathExplo]
Damage=0
ROF=100
Range=0 ;can never shoot anything, but will move right next to target
Projectile=Invisible
Speed=100
Warhead=DeathExpWH ;create a new warhead which you give an animation that does area damage
you can enhance the code by giving the unit NoAutoFire=yes and the weapon
Range=2
Anim=SUICIDE
while SUICIDE is an animation that is doing enough damage to kill the unit.
Then the unit can destroy itself when shooting at something and the explosion would still come from the unit and not the point where the weapon was shooting at. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Oh right, one of the sub-countries which also had the chemical demo truck right?
Was the explosion done on the target or always on the terrorist? Last edited by Lin Kuei Ominae on Mon Jan 28, 2013 3:24 pm; edited 1 time in total QUICK_EDIT
This is the code for my Nod Fanatic suiciding unit. Can't remember why I gave him a primary and a secondary. The secondary kills the unit itself, setting off the primary. Basically it works like LKO's example.
Code:
[FANATIC]
...
Primary=FanaBomb ; This is the real damage dealer, but only used by Explodes=yes logic...
Secondary=FanaSuicide ; ... this is the "weapon" the Fanatic fires to kill himself, thus releasing the Primary.
Explodes=yes ; Applies primary weapon over the unit when it dies
CollateralDamageCoefficient=0.7 ; Balances the damage done by FanaBomb
Strength=70 ; Note that this affects damage as well (due to Explodes=yes logic)!!!
[FanaBomb]
Damage=50 ; DO NOT TOUCH THIS! Adjust the CollateralDamageCoefficient= key instead.
ROF=800
Range=0.1 ; So the Fanatic will always fire the secondary weapon (suiciding). Don't put 0 here!
Speed=100
;Report= ; Sound is played in art.ini anim
Projectile=CarBombFake ; Prevents the unit from firing this. This weapon is only used by Explodes=yes key.
Warhead=FanaBombWH
[FanaSuicide]
Damage=10 ; Leave something here so the unit always fires this
ROF=800 ; So he won't get a chance to fire twice
Range=1.8 ; As close as possible without causing targetting problems
Projectile=Invisible
Speed=100 ; Instant effect
Warhead=ZeroWH ; All verses at 1% to ensure targetting works
Anim=FANADIE ; Used to suicide the Fanatic with pure anim damage (adjusted InfDeath on [Fire2] warhead).
It's supposed to adjust the damage done when a unit with Explodes=yes explodes.
Grenadiers in FS use this to reduce the chance/damage for chainreaction explosion when one of them dies in a group of grenadiers. _________________ SHP Artist of Twisted Insurrection: Nod buildings
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum