Projectiles with ShrapnelWeapon=

Bug #1048597 reported by Gluk-v48
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ares
Triaged
Wishlist
Unassigned

Bug Description

I want to make a weapon that shoots out to the infinite lightning. If I use the following code:

;Weapon
[Weapon]
Projectile=Projectiles

Damage=150
ROF=150
Range=7
Speed=100
Warhead=ShipElectric
Report=TeslaTankAttack
IsElectricBolt=yes
Bright=yes

;Projectiles
[Projectiles]
ShrapnelWeapon=Weapon
ShrapnelCount=1
Inviso=yes
Image=none
SubjectToCliffs=yes
SubjectToElevation=no
SubjectToWalls=no

Sometimes when the weapon shoots - the game freezes. I know reasons: getting into the unit with the tag Natural=yes, getting into AircraftTypes and some other situations.

I found a workaround:
;Weapon
[Weapon1]
Projectile=Projectiles1
….
[Weapon2]
Projectile=Projectiles2
….
[Weapon3]
Projectile=Projectiles3
;and so on
;Projectiles
[Projectiles1]
ShrapnelWeapon=Weapon2
ShrapnelCount=1
….
[Projectiles2]
ShrapnelWeapon=Weapon3
ShrapnelCount=1
….
[Projectiles3]
ShrapnelWeapon=Weapon4
ShrapnelCount=1
;and so on

But in order to achieve the desired result (infinity lightning), i need to create 65 025 weapons and ammunition to them.

Revision history for this message
Gluk-v48 (glukv48) wrote :

If corrected with raging Ares versions will be difficult and will have to spend a lot of time, I think it can wait a long time. But if it is still not too difficult to fix, please do it in 0.2 or 0.3.

P.S: I am grateful to you for what you are doing.

Revision history for this message
AlexB (alexander-b) wrote :

As far as I see you indeed got some infinite lightning there. If [Weapon] uses a [Projectiles] that fires [Weapon] as shrapnel, you are creating an infinite loop. Because of Speed=100 the shrapnel should impact immediately, spawning another shrapnel until it hits a building.

Changed in ares:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Gluk-v48 (gluk-v48) wrote :

The problem was in the tag NotHuman = yes, in fact, units with NotHuman = yes die only after the animation will be completely lost. I redid all units with NotHuman = yes. I replaced it with a DeathAnims = and the problem does not return. «I found a workaround:» it did not help.

also, the game freezes when lightning strikes in the cluster units are on the influence of the Iron Curtain, because lightning tried to hit the same unit an infinite number of times per frame. I fixed it by a pause of one frame every 10 lightning strikes, to fix the problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers