This thread was automatically marked as Locked.
Solved. Please PM me if you'd like to know in detail, exactly how my custom value system works.
This thread was automatically marked as Locked.
Solved. Please PM me if you'd like to know in detail, exactly how my custom value system works.
Hey!
I know it is possible through use of the Data Editor for damage effects to display floating texts on damage. I have opted to use triggers and hope to work out a way to 'merge' damage done within x time.
Example:
5 Marines attack a Structure with no armour. The basic
Unit takes Non-Fatal damage
Set Damage(integer) to (triggering damage)
Create Floating text at (Position of (Triggering Unit)).
Would return a series of five 6's more or less at the same time.
Is there an efficient way to merge the value into 30, in this case?
I was going about adding a unit that took damage to a specific unit group, using one of its custom values as the total damage taken.
After x seconds of not being attacked, the unit is removed from the group and the relevant text tag is created.
Along with the relevant custom value being reset to '0.0'
Will this method cause problems when 10 to 15 units exchange fire, multiple times (between 1 and 5), per engagement (turn)?
If you do it properly, this should not cause any issues.
Thanks, managed to get it to work.
I have three triggers, when units take non-fatal damage, when units take fatal damage and a periodic check which runs every 0.1 game seconds but only carries out actions IF there are any alive units in the Unit Group.
My question is if this periodic check is heinously inefficient? I presume it runs the check every 0.1 seconds regardless, if only to first check that units are in the unit group - whereby then it will carry out the relevant custom value arithmetic, either delaying and increasing the 'Current Damage Taken' figure, or deducing that enough time has elapsed - and resetting the ticker and displaying the 'Current Damage Taken' value as a floating text tag.
Would it be more 'efficient', to have a 4th trigger, which activates the periodic check whenever a unit is added to the group, increasing a global variable by +1, and every time a unit is removed from the group, decreases said global variable by -1, and triggering the periodic check to 'Off'?
Edit:/ On a related note, is it possible to have Text Tags velocity act in a parabolic manner? My current implementation has them shooting 'upwards' and then fading until their lifetime expires. Would it be possible to make them 'jump' upwards, and then gradually fall down and disappear?
You don't need to separate between fatal and non-fatal afaik, there should be an option, which covers both cases (either non-fatal does this already, or there is an 'any' option).
I would use a periodic check myself. You can start and stop the periodic check dynamically and it would be slightly more efficient, if you expect a huge amount of downtime for the damage tags, but it will be slightly worse, if you constantly add and remove units from the group. You will propably hardly notice a difference ingame anyway.
Also you need to specify, how exactly you want your damage tags to work: Do you want to combine every single bit of damage into one tag? This could cause problems with prolongued attacks on one unit; the tag might not appear for a long time, until the damage stream is broken.
I personally would probably go for a specific interval and combine all damage done in this interval. If you take, lets say, a 2 seconds interval, you can increment the custom value for every point of damage taken and run the periodic check every 2 seconds, which displays the current custom value of the unit and resets it, if it is > 0.
Not sure, but I think, you can set the velocity or position dynamically? In this case, you can periodically modify either one to represent a parabolic function.
@Kueken531: Go I separate Fatal and Non-Fatal because if a unit dies, I simply display "Killed". All Non-Fatal damage appears every 2 in-game seconds, alongside whether or not any debufs were inflicted.. such as Arterial Wound, Slashed Tendon, Fractured Bone or Concussion etcetera.
As for the efficiency; it is a turn based game that I am working on. At most there will be between 10 and 15 units fighting (per player, per turn). So, the trigger has variable downtime between player 'turns'. However, it works in its current implementation and causes no problems when I test. So I will leave it as it is and get started on the thousands of other things that need fixing, or... creating :).
As for the 'parabolic functions'. I am a math noob. I understand that a parabola is an arc, and I'd recognise a graph with one plotted on it. I just do not understand a mathematical formula to create on. I will play around with altering the velocity so that the text goes up and then down, and then I'll play around with giving it a random 'direction'.
Thanks, Kueken. If this were the Hive i'd give you some Rep :)