Posted: Fri Sep 19, 2025 6:25 pm Post subject:
Have debris spawn when the unit is at a certain health
I was already able to achieve what I wanted to happen through Kratos but I want to know if it was possible to do it with Phobos.
In Kratos, I was able to achieve it through attached units. At certain healthpoints the unit attached would get killed or destroyed then the debris from that unit appears.
I have a code that I thought would work, with AffectsBelowPercent=.6 for the warhead so that it would work on units that are on the 60% hp.
The ConvertN.From=,etc. works and only converts the unit when it is in 60% hp but the debris already appears without reaching 60% first.
The conversion is affected, but the debris doesn't.
Is there a way to make the debris spawn when the unit is at a certain hp?
Code:
[CBRSX2WH]
Verses=1%,1%,1%,1%,1%,1%,1%,1%,1%,1%,1%
Convert0.From=CBRSTNK ; List of TechnoTypes
Convert0.To=CBRSTNKX2 ; TechnoType
Convert0.AffectedHouses=owner ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)
DetonateOnAllMapObjects=true ; boolean
DetonateOnAllMapObjects.Full=true ; boolean
DetonateOnAllMapObjects.AffectTargets=all ; List of Affected Target Enumeration (none|aircraft|buildings|infantry|units|all)
DetonateOnAllMapObjects.AffectHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)
DetonateOnAllMapObjects.AffectTypes=CBRSTNK ; List of TechnoTypes
DetonateOnAllMapObjects.IgnoreTypes= ; List of TechnoTypes
DetonateOnAllMapObjects.RequireVerses=false ; boolean
AffectsBelowPercent=.6 ; floating point value, percents or absolute
AffectsNeutral=true ; boolean
EffectsRequireVerses=false ; boolean
MinDebris=1
MaxDebris=2
DebrisTypes=CBRSTURRET
DebrisTypes.Limit=true
DebrisMaximums=1 ; List of integers
DebrisMinimums=1
You can try adding an AE that spawns the debris to the converted unit, so when the unit is converted the AE is triggered.
If all you want is to convert the unit when its at 60% health (plus debris) I dont understand why you're using a DetonateOnAllMapObjects weapon with an AE. Wouldn't it be easier and cause less lag to just attach the AE directly to the unit? _________________
Oh I didn't know that about AE. My setup was that a superweapon is always firing so if a unit does reach that point it would convert.
That's what DetonateOnAllMapObjects is for. Also checked if it does affect FPS, and it doesn't show any affect on it based on my testing.
AffectsBelowPercent= also seems to be for Warheads but I'll check the AE if it works there.
Also in AE there isn't a AffectsBelowPercent in the sample. But like I said I'll check if I can get it to work.
I'll check the AE and show an update if I got it to work.
UPDATE: Nothing in AE worked and what exactly was the AE that I used, to be attached to the unit directly?
Mig Eater wrote:
If all you want is to convert the unit when its at 60% health (plus debris) I dont understand why you're using a DetonateOnAllMapObjects weapon with an AE. Wouldn't it be easier and cause less lag to just attach the AE directly to the unit?
How would I be able to do this? Plus the debris. Everything that I thought could make this was ExpireWeapon,
Animation, and RevengeWeapon. This is all I can see the AttachEffects can make this happen and they all lead to the same result.
Which is that they'll keep spawning debris before reaching 60%. QUICK_EDIT
Ah, you were talking about Kratos. I was asking in the post if it is possible to do it in Phobos.
Like I said, I was already able to do what I wanted with Kratos already.
I think Kratos did cause more lag than DetonateOnAllMapObjects did, being applied through a superweapon in every fraction of a second 3 times
(One superweapon for each damaged state of the tank). That was why I wanted to move from Kratos to begin with. QUICK_EDIT
For Phobos you can give the unit a weapon that shoot itself when it reaches 60% health using CanTarget.MaxHealth= &/or AffectsBelowPercent=, which then triggers the conversion and debris.
BTW Phobos added Image.ConditionYellow= and Image.ConditionRed=, which will change the graphics of a unit depending on its health, which could be used instead of unit conversion. _________________
For Phobos you can give the unit a weapon that shoot itself when it reaches 60% health using CanTarget.MaxHealth= &/or AffectsBelowPercent=, which then triggers the conversion and debris.
CanTarget.MaxHealth= must be new. I'm currently testing it now.
Mig Eater wrote:
BTW Phobos added Image.ConditionYellow= and Image.ConditionRed=, which will change the graphics of a unit depending on its health, which could be used instead of unit conversion.
Tried to use this before from long ago. I don't know if they've updated it, but when I tested it, the weapon doesn't properly align to the new image.
Also the weapon needs to change from Burst=3 to Burst=2 so a conversion is required.
Aside from this, I don't know where to use Image.Condition since like I said the FLH doesn't change when the image change from the last time I tested it.
Making it difficult to use somewhere unless it's just making the unit looked damage without messing with the location for the weapon to fire. 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