Joined: 05 Sep 2013 Location: LocationNotFoundException at RealLife.Location.find() at line: -1
Posted: Thu Jul 10, 2014 6:38 pm Post subject:
Vehicles can't repair infantry right?
Subject description: Then why does this tank do it?
I am confused.
I was working on a new vehicle which has 2 weapons.
One repairs vehicles, and the other converts enemy infantry into other infantry.
Now ingame, it wouldn't repair friendly vehicles unless forcefired, and would attack once as if FireOnce was set, but it would run to enemy vehicles and repair them instead(still as if FireOnce was set, but they restarted the attack every some frames).
The confusing thing was, it could forcefire on one of my infantry, and actually repair them! (their armor was listed in [Mechanical] warhead)
Normal IFV with engineer still wouldn't repair the infantry, but the new unit could.
I did some experimenting, and got a set of weapons that made a vehicle(and worked also the other way for a conscript) able to repair soldiers and vehicles alike(well, for now Plate armor is a exception)! I do have the newest Ares, but I haven't found anything in the documentation that could have made this happen.
Does anyone have any idea why this happens? (And is this useful for something maybe?) I am pretty sure that I do remember reading several times that its hardcoded that InfantryTypes cannot repair VehicleTypes and the other way. By the way, setting the negative damage to -150 makes this work differently?
Code:
;Weapons:
[DroneRepair2]
Damage=-100 ;If I set this to -150, this whole thing dosen't work
ROF=35
Range=1.5
Projectile=Invisible
Speed=100
Burst=2
Warhead=Mechanical2
Report=IFVRepair
UseSparkParticles=yes
AttachedParticleSystem=WeldingSys
I would like to know why this is all happening, so I can remove this completely for my new unit, so that the weapons behave as they should.
(Or are units with both repair and combat weapons not possible?) Last edited by Agent Z on Sat Feb 25, 2017 11:42 am; edited 1 time in total QUICK_EDIT
Can't really have repair and then offensive weapon jointly, IFV only works due to single slot style.
When you add offensive weapon, the repair behaviour is lost and it rather considers using the repair like as if its a weapon to kill enemy with despite it heals and thus it can 'attack infantry'
Thus why the bizarre behaviour. Technically this is a math thing on the game to choose either friendly targeting for repair or offensive and your case its totally offensive now. QUICK_EDIT
The behavior isn't bizarre. It's an attack weapon doing negative damage. The healer logic runs off of negative warhead verses and only works on the same TechnoType. Nothing strange about the former... moreso about the latter. _________________ KGR | AT
AZUR
Discord: theastronomer1836
Steam QUICK_EDIT
Joined: 05 Sep 2013 Location: LocationNotFoundException at RealLife.Location.find() at line: -1
Posted: Fri Jul 11, 2014 6:11 am Post subject:
ApolloTD wrote:
Can't really have repair and then offensive weapon jointly, IFV only works due to single slot style.
When you add offensive weapon, the repair behaviour is lost and it rather considers using the repair like as if its a weapon to kill enemy with despite it heals and thus it can 'attack infantry'
Thus why the bizarre behaviour. Technically this is a math thing on the game to choose either friendly targeting for repair or offensive and your case its totally offensive now.
Thanks for the clarification, this is helpful!
I now understood why changing the damage makes it behave different!
(If total damage on both weapons is less than 0, it thinks its repair, but if its more than 0, its offence right?) QUICK_EDIT
If you use negative numbers for Damage, it does negative damage, which grants hit points. It's still damage. According to the engine, it's only repair/heal when you use negative warhead verses. _________________ KGR | AT
AZUR
Discord: theastronomer1836
Steam QUICK_EDIT
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