setDamageFlash not working

Scripting questions, discussions, etc
10 posts Page 1 of 1
Duion
Posts: 760
Joined: Sun Feb 08, 2015 1:51 am
 
  by Duion » Thu Jan 12, 2017 1:44 pm
I noticed there is a %obj.setDamageFlash(1); function called here: https://github.com/GarageGames/Torque3D ... er.cs#L230
But I never seen it work.
For reference what it is:
http://docs.garagegames.com/torque-3d/r ... 370d679792

So it is a sourcecode function that calls the flash.cs postFX to play a damage flash on the screen, but it does not work.

I could find a very old thread on garagegames speaking of the same problem:
http://www.garagegames.com/community/fo ... read/59064
So is there really a broken function in the templates for like 10 years now?

Does someone has an idea how to make it work, or should we replace it?
J0linar
Posts: 45
Joined: Thu Feb 05, 2015 8:50 pm
by J0linar » Thu Jan 12, 2017 2:11 pm
from what i remember this was used for displaying a postFX Damage screen,
i think that just the PostFx itself isnt there or working...

Check Legends the Game .. its based on some t3d/tgea version
http://www.legendsthegame.net/
and the damage flash is in there but i think it is their own shader (might be wrong here)
anyways the DamageFlash should work you just need to supply a postFx.
Duion
Posts: 760
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Thu Jan 12, 2017 2:21 pm
I know that it is used for damage flash, that is why I'm asking.
And the postFX is there, it uses the flash postFX.

https://github.com/GarageGames/Torque3D ... x/flash.cs
J0linar
Posts: 45
Joined: Thu Feb 05, 2015 8:50 pm
by J0linar » Thu Jan 12, 2017 2:23 pm
well you can compare the legends one with t3d one, from what i remember the legends postfx shader was opengl only, it might verry well be the case that noone bothered to update it and that its just broken in t3d
Duion
Posts: 760
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Thu Jan 12, 2017 2:46 pm
Can't install, that stupid installer always fails.
J0linar
Posts: 45
Joined: Thu Feb 05, 2015 8:50 pm
by J0linar » Thu Jan 12, 2017 2:52 pm
just tried it myself now :/ they must have gone mia totally but
i found a working link from a at least trusted site
http://www.gamershell.com/download_14860.shtml forget this one!!! it seems to be for a older version and best part is that i got a virus warning from the file :roll:

Anyways here http://www.legendsthegame.net/files/legends_windows_0.4.2.2.exe this is the full installer for the latest and last version of it
Duion
Posts: 760
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Thu Jan 12, 2017 3:45 pm
Forget it, I got it working now.
You have to add "FlashFx.enable();" somewhere. The postFx was not enabled.

Alternatively just set it to enabled here:
https://github.com/GarageGames/Torque3D ... ash.cs#L40
So it will always be on.

I wonder how much performance it costs, since the flashFx will always be on, you see it in console wiht trace(1) as well as the gammaPostFx.
Duion
Posts: 760
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Thu Jan 12, 2017 4:43 pm
Using a GuiFadeinBitmapCtrl will probably do the same job with just using an Image in the GUI that fades.
After trying it I found that there is an issue, the fading GUI image only fades to solid color, there is an alpha value in the fade color picker, but it seems to get ignored. If that could get solved it will probably be a better solution, since it is less complicated then having another postFx running all the time.
Duion
Posts: 760
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Thu Jan 12, 2017 6:16 pm
Found another thing:
https://github.com/GarageGames/Torque3D ... cs#L80-L93
It is an engine callback that enables and disables the Flash PostFX it seems:
https://github.com/GarageGames/Torque3D ... #L170-L174
Duion
Posts: 760
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Thu Jan 12, 2017 7:30 pm
Seems like that part makes the flash work:
https://github.com/GarageGames/Torque3D ... cs#L80-L93
I did not have that in my project and it does not exist in the Empty template, so it worked all along, if you use the Full template.
10 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest