Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Nov 14, 2025 2:14 pm
All times are UTC + 0
Have debris spawn when the unit is at a certain health
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [7 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Ousagi
Rocket Cyborg


Joined: 02 Nov 2022

PostPosted: Fri Sep 19, 2025 6:25 pm    Post subject:  Have debris spawn when the unit is at a certain health Reply with quote  Mark this post and the followings unread

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



Debris.gif
 Description:
 Filesize:  17.17 MB
 Viewed:  802 Time(s)

Debris.gif



Convert.gif
 Description:
 Filesize:  4.22 MB
 Viewed:  802 Time(s)

Convert.gif



Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Sat Sep 20, 2025 5:05 am    Post subject: Reply with quote  Mark this post and the followings unread

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?

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Ousagi
Rocket Cyborg


Joined: 02 Nov 2022

PostPosted: Sat Sep 20, 2025 8:04 am    Post subject: Reply with quote  Mark this post and the followings unread

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%.

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Sat Sep 20, 2025 3:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

AffectsBelowPercent= is a Phobos warhead tag, for Kratos attach effects use ActiveWhenHealthPrecent=60%

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Ousagi
Rocket Cyborg


Joined: 02 Nov 2022

PostPosted: Sat Sep 20, 2025 6:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Sun Sep 21, 2025 3:41 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Ousagi
Rocket Cyborg


Joined: 02 Nov 2022

PostPosted: Sun Sep 21, 2025 6:36 am    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
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.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.2732s ][ Queries: 15 (0.0562s) ][ Debug on ]