Product Chat / [SOLVED] Trying to remove the red damage/hurt effect

Author
Message
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Location: Sweden
Posted: 20th Apr 2021 20:23
I dont know what Im doing wrong here, I have added the noblood in settings.fx but the red effect is still on?
Anyone knows how to disable the red posteffect when getting hurt?

This is how I did....
Stop being mediocre, be Yourself...

The author of this post has marked a post as an answer.

Go to answer

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 20th Apr 2021 20:38
https://forum.game-guru.com/thread/218937#msg2589981

Go to the end of that thread.
Been there, done that, got all the T-Shirts!
PM
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Location: Sweden
Posted: 20th Apr 2021 22:53
Thanks! I dont know lua very well so I wonder if this simple script works, and what shourld I attach it to???
Stop being mediocre, be Yourself...

Attachments

Login to view attachments
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 21st Apr 2021 01:45
I don't think I'd use "default" script, but it's not impossible, but every object in the game will theoretically be calling the function every frame. So best to follow as suggested; use it as named here (no idea why this isn't supplied in GG script folder by now...........? ) Place on a stock dynamic barrel, ie >> go to properties, AI / 'Main' = script, scroll down; 'Always Active' = yes. For some reason this one only worked sporadically for me. If the zombie NPC's weren't giving some comedian dance recitals, then WAAAAYYYY over zealous soldiers kept shooting their weapons. I'm honestly not much of a threat. What could they possibly be guarding that's so valuable?

function players_noredscreen_init(e)
Hide(e); CollisionOff(e)
end

function players_noredscreen_main(e)
SetGamePlayerControlRedDeathFog(0)
end
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 21st Apr 2021 08:07
default.lua doesn't actually ever get called by the engine so you can't use that!

It is purely there as a template for new scripts.
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 21st Apr 2021 16:53
"default.lua doesn't actually ever get called by the engine so you can't use that!"
Very good. I suspected that might be so, but wasn't 100%.
PM
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Location: Sweden
Posted: 21st Apr 2021 16:54
But I renamed default.lua it didnt matter before? Anyhow Your script dont work, it wont even hide for some reason. Ill try a new lua that its not from default, but I dont think it Will work, I post the results later...
Stop being mediocre, be Yourself...
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 21st Apr 2021 17:17
The filename has to match the function name, so if you have a file called my_script.lua the functions in it must be called my_script_init and my_script_main.
Been there, done that, got all the T-Shirts!
PM
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Location: Sweden
Posted: 21st Apr 2021 17:18
I did write a clean script but The barrel wont even hide(!) Maybe You cant remove the reddead effect nowdays? Any ideas what to do?
Stop being mediocre, be Yourself...
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 21st Apr 2021 18:07
It's working on my end- so
Re-check your settings; dynamic, always active...
BTW, this only turns off the red screen for me, there is still the heartbeat sound
and flashing hud... but the red screen does not activate. You want to turn the sound off?

"--" are symbols to signify LUA comments [ documentation ] which de-activates any line
of code they precede, so........

I went to GamePlayerControl.lua and found @ line 1802;
PlayRawSound ( ttsnd )
added the comment flag to make it look like this;
-- PlayRawSound ( ttsnd ) -- #@#
The little symbols at the end are so you can search for "#@#" in your LUA editor, and locate that
line again right away- if you need to change it back to normal (by removing the comment symbols).
be careful before you do this, and in your scriptbank folder click the file and select copy to
MAKE A BACKUP.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 21st Apr 2021 19:18
If the barrel doesn't hide then it isn't running the script!

When testing a script for the first time put a Prompt command in the _main function to check it is actually being called.
Been there, done that, got all the T-Shirts!
PM
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Location: Sweden
Posted: 21st Apr 2021 21:40 Edited at: 21st Apr 2021 21:42
I did exactly as You Guys said, I have tried other objects, always active and dynamic, but The objects wont hide? Courld I have Your script GubbyBlips sence My script doesnt seems to work?
Stop being mediocre, be Yourself...

Attachments

Login to view attachments
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 21st Apr 2021 21:56 Edited at: 21st Apr 2021 21:58
Is that an internal level ?
Just put a dynamic object outside.
EDIT ..
Oh i see the script isnt working at all.
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Location: Sweden
Posted: 21st Apr 2021 22:11
"Is that an internal level ?"

I tried it outdoors as well, no luck. Hide water and terrain isnt working as well it did work before... :/
Stop being mediocre, be Yourself...
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 21st Apr 2021 22:39
This post has been marked by the post author as the answer.
Try this.

Make sure you save your script as no_red_damage.lua
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 21st Apr 2021 23:11
Mr. Love; No problem if it's your first assigning a lua script experience. Will go step by step and
not assume any prior knowledge, so we all have some patience @ these directions.

Is the script below placed in your GG "scriptbank" folder?
Also... is it named as notated per AM instructions above - and does it have .lua as it's extension?
Please present the steps you have taken. (Don't miss any steps, check them off as you go.)

Blank map; Set start marker.
Add new entity ;; I usually use the top/center blue barrel from barrels folder - put it 10m ahead of your start marker. (It's already dynamic.)
Click barrel, select properties; in AI / Main, click right of selection box to bring the list of scripts forward, you should click on "date modified" in the columns to find the most recent scripts and hopefully as named below; (players_noredscreen.lua) and click it--
next - Move down to Always Active and select that for Yes.
next - Click apply changes

Place a zombie 100m distance on the map so you can test "reddeathfog" upon damage.
Upon testing... what do you observe?

function players_noredscreen_init(e)
Hide(e); CollisionOff(e)
end

function players_noredscreen_main(e)
SetGamePlayerControlRedDeathFog(0)
TextCenterOnXColor(50,50,3, "Script- 13.18 /Lima/Oscar/Victor/Echo -Sequence Active...", 255,195,22 )
end
PM
Mr Love
18
Years of Service
User Offline
Joined: 9th Jun 2005
Location: Sweden
Posted: 21st Apr 2021 23:37
@DVader

Thanks alot! Now it works fine, Im glad it wasnt Me Who screwed up, lol...
Stop being mediocre, be Yourself...
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 22nd Apr 2021 13:11
@Mr Love. I think you just got the naming wrong. Easily done if you are not familiar with lua. If you look at your original you will see you had functions with diff names to the actual file name. Amen mentioned it, but it's easier to show than to explain Glad it's working for you now!
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
Defy
16
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 28th Apr 2021 04:14
Love when I drop by and everyone is adding their insight like the old days.
Just my opinion, reduce always active options with additional entities if possible. Though hey, no one really did like that heartbeat
Modified Gameplayer script attached, same result without the additional (backup og if testing this stuff)

Attachments

Login to view attachments
PM

Login to post a reply

Server time is: 2024-04-14 21:44:00
Your offset time is: 2024-04-14 21:44:00