Scripts / Change the Color Effect when getting hit

Author
Message
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 6th Feb 2018 16:55 Edited at: 6th Feb 2018 20:57
Hey guys !

Can I give the color effect another color like black ?

I mean the full red screen when you are hurt. Not the indicator or the screen blood. Just the red screen.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 6th Feb 2018 16:56
What colour effect are you talking about?

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 6th Feb 2018 17:34
Its most likely handled in the global player controls lua. I'm at work so i unfortunately cannot check :/
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 6th Feb 2018 17:59
Quote: "What colour effect are you talking about?"


THe one that appears when you get shot at and hit.
Basically the red health indicator.
Windows 10 64bit - Intel Core i7-2600 CPU @ 3.40GHz, 8,0 GB Ram, Geforce GTX 1050ti
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 6th Feb 2018 18:36
If you go through the player lua there is a section that handles the when the player is hit/hurt. It could be in that section.
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 6th Feb 2018 18:48
where can I find the player lua ?
Windows 10 64bit - Intel Core i7-2600 CPU @ 3.40GHz, 8,0 GB Ram, Geforce GTX 1050ti
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 6th Feb 2018 18:51
Though any changes to the player lua can break your game or any other game you make with GG

So you'll have to back it up before you do any changes to it. I'm assuming there is a part of it that controls the color of the damage. Not sure if its a png hud? Again im at work so im no help
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 6th Feb 2018 19:13
I thought this was handled by a shader control here:
https://forum.game-guru.com/thread/218937
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 6th Feb 2018 19:20
thought so too.

But the line wich controls a color is not there..
Windows 10 64bit - Intel Core i7-2600 CPU @ 3.40GHz, 8,0 GB Ram, Geforce GTX 1050ti
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 6th Feb 2018 19:36
In that event.. its hard coded lol
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 6th Feb 2018 19:56
do you mean files/databank/indicator.png ?
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 6th Feb 2018 20:30
no, not the arrow

the full red screen when youre at low health.
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 6th Feb 2018 21:14
I have found this in post-core.fx but I don't know what value you would put or even add


any coders know what need to be changed ? thank you
Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Test PC - Windows 10 Pro x64 - G4400 @3.3GHz - 16GB DDR3 RAM - GeForce GTX 950 2GB - 500GB SSD
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 7th Feb 2018 06:53
"ScreenColor" i wonder if that is a value of RPG combinations that's been created somewhere?
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 7th Feb 2018 13:25 Edited at: 7th Feb 2018 13:25
You can turn it off you know ?
If that helps ..
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 7th Feb 2018 15:07
Quote: "You can turn it off you know ?
If that helps .. "


He does not want to turn it off he just wants to change the colour
Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Test PC - Windows 10 Pro x64 - G4400 @3.3GHz - 16GB DDR3 RAM - GeForce GTX 950 2GB - 500GB SSD
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 7th Feb 2018 15:24 Edited at: 7th Feb 2018 15:27
Quote: "He does not want to turn it off he just wants to change the colour "

I know he hates it ... He may not be aware you can turn it off rather than modify ..
I realise what he's trying to do although Im not quite sure what black will do ...

However you can also set the red for a couple of seconds only if you speed up the regeneration
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
UNIRD12B
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 2nd May 2014
Location: Canada
Posted: 7th Feb 2018 16:10 Edited at: 7th Feb 2018 17:30
Hi all ,,
I think you can find all the direct code to control
Thesse function in the .Lua file in the Scripbank under the name

gameplayercontrol. lua

Around 90% of the way thru the commands you'll see

-- Screen redness effect


ALSO , in the
Global.lua
You can find
GetGamePlayerControlRedDeathFog
command
And the heartbeat one also......so....they do still seem to be hardwired so far.

P.S. I just found out how to kill that effect totally and easily and just added a new thread on the subject.

https://forum.game-guru.com/thread/219314



Unird12b
Let\'s actually make something happen with this one !
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 7th Feb 2018 17:47
Thanks very much UNIRD12B !
UNIRD12B
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 2nd May 2014
Location: Canada
Posted: 7th Feb 2018 22:19 Edited at: 8th Feb 2018 01:49
ok ,
i TRIED to put a basic thing together for you...
lets see if this works a bit.
code and instructions all contained below.



I added these 2 lines to it to make the color NOT go red
and to STOP THE HEARTBEAT SOUND.



let me know if it works or what adjustments you might like.

UNIRD12B
Let\'s actually make something happen with this one !
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 8th Feb 2018 07:20
Will test that today! Thank you
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 8th Feb 2018 08:56
Okay, somehow its not working at all lol...
I did a video because I find it hard to describe..

[video=youtube]5rSr_bya9dg&[/video]

https://www.youtube.com/watch?v=5rSr_bya9dg&feature=youtu.be
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 8th Feb 2018 08:56
Okay, somehow its not working at all lol...
I did a video because I find it hard to describe..



Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 8th Feb 2018 10:26 Edited at: 8th Feb 2018 10:27
I have a feeling (and i might be wrong) that SetGamePlayerControlHeartbeatTimeStamp(0) isn't a simple 0/1 toggle, i think it might need to be set to -1, try that and see if it works.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
UNIRD12B
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 2nd May 2014
Location: Canada
Posted: 8th Feb 2018 15:09 Edited at: 8th Feb 2018 15:13
Hi Duchenkuke ,
judging by the results its not working at all.
so it is possible you didnt put it in as per the instructions.

1- place the script in your scriptbank folder
2- in your level place a TRIGGER and add in the script.
3- place the Playerstart ABOVE the Trigger...so he contacts it when he falls to trigger it right away.
4- let A.I .shoot you....
5- once health falls to 80 or less.....should see screen go darker and hear NO HEART SOUND.
6- once you die....lighting should go back to normal...and all happens again...

Did you do all those steps and it still didn't work ?
It works for me perfectly each time with both those numbers set to (0)
We WILL get it......

P.S. just tried it again right now,,,works as stated at least for me.

Let me know plz.

Thx

UNIRD12B
Let\'s actually make something happen with this one !
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 8th Feb 2018 15:33 Edited at: 8th Feb 2018 15:34
Quote: "Did you do all those steps and it still didn't work ?"


IT WORKED !!!

YOURE THE MAN.

I have to say sorry. I tested it right after I got up today, maybe I made a mistake ....

But how do I enable the heartbeat again?
I actually DONT want it to be removed..


I still get that soundbug too...
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 8th Feb 2018 15:41
I edited your script to make create a nice transition - the lower the health gets the darker.

But it doesnt work lol

maybe you can make it work ?

Attachments

Login to view attachments
UNIRD12B
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 2nd May 2014
Location: Canada
Posted: 8th Feb 2018 15:56 Edited at: 8th Feb 2018 16:23
here ya go
(and anyone else that would like to use it---feel free )



if you want the heartbeat back in,,,just set it to (1) so active
(0) or (-1) both seem to work for deactivating the heartbeat sound ( except one beat at the death scene )

you just had too many end commands
and you were not allowing choices by not using ifelse commands was all.


this should do ,as you want now,,let me know,.

P.S. later on if you'd like to try this with colors , I also have
a script worked up that can do that. it works with a script I wrote a while back
that sets up your start level lighting as you want it at the start of a level.

Thx

UNIRD12B
Let\'s actually make something happen with this one !
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 8th Feb 2018 16:18 Edited at: 8th Feb 2018 16:18
Script doesnt work

Attachments

Login to view attachments
UNIRD12B
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 2nd May 2014
Location: Canada
Posted: 8th Feb 2018 16:20 Edited at: 8th Feb 2018 16:25
hi Duchenkuke ,
oops tiny copy error got in--try it now again ---?
its working perfect for me,,,now--.

its sumtymes weard howe arrers crip inn two code,


Thx

UNIRD12B
Let\'s actually make something happen with this one !
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 8th Feb 2018 16:30
I dont know what to do change.

Would you please just upload the script ?
UNIRD12B
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 2nd May 2014
Location: Canada
Posted: 8th Feb 2018 16:35 Edited at: 8th Feb 2018 16:37
np Duchenkuke ,
we WILL get you working.....



Try this one,,save in ScriptBank folder as damagelightlevel/lua
and all should be ok,,,
KEEP AT IT !

PS. for you I set heartbeat to (1) so you hear it.

Thx

UNIRD12B
Let\'s actually make something happen with this one !
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 8th Feb 2018 16:52 Edited at: 8th Feb 2018 16:52
It works ! Thanks man!!
UNIRD12B
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 2nd May 2014
Location: Canada
Posted: 8th Feb 2018 17:33
wohohoho ok,,,

cool Im glad,,

NEXTTTTTTTTTTTTTT

UNIRD12B
Let\'s actually make something happen with this one !

Login to post a reply

Server time is: 2024-04-25 13:11:11
Your offset time is: 2024-04-25 13:11:11