Product Chat / How to make a character non killable?

Author
Message
Duchenkuke
GameGuru BOTB Developer
3
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 20th Sep 2019 10:04 Edited at: 20th Sep 2019 13:22
Setting entity health to zero doesnt work. Also ridiculous high amounts are not a good solution either.
Wolf
Forum Support
11
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 20th Sep 2019 13:24
Import the character as an animated entity.
3com
5
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 20th Sep 2019 14:37
Quote: "How to make a character non killable?"

You'll need the ZLotion. LOL

What GG version are you using for?

Does this happens with all chars, or just stock one?
Wich char are ypu tried so far?

If someone like to reproduce your issue, need to have more related info.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Duchenkuke
GameGuru BOTB Developer
3
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 20th Sep 2019 16:47
I think I also could set "is character = 0 "
maybe this helps ?
Corno_1
GameGuru Tool Maker
8
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 20th Sep 2019 17:25 Edited at: 20th Sep 2019 17:26
If he gets damage, reset his health
Or always reset his health each loop
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
synchromesh
Forum Support
5
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 20th Sep 2019 17:47
You haven't actually said what you want … Just someone that attacks that you cannot kill ?
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Duchenkuke
GameGuru BOTB Developer
3
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 20th Sep 2019 17:49
Quote: "You haven't actually said what you want"


Sorry, I just want a character that you can not kill. You shoot at him but nothing happens. I want to prevent the player from shooting important characters.
smallg
Community Leader
13
Years of Service
Recently Online
Joined: 8th Dec 2005
Location:
Posted: 20th Sep 2019 18:04
Quote: "If he gets damage, reset his health
Or always reset his health each loop"

and remember to remove the headshot code
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
3com
5
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 20th Sep 2019 18:10 Edited at: 20th Sep 2019 18:14
And this char should be such as:

1- he behaves like a soldier, so he can kill everybody but not one can kill him. So you has to modify script to make him as unkillable.
2- He behaves like a civilian, unarmed, he don't want to kill not one, but he want to walk, run, jump, speak with anothers chars, even with the player. So can attach him just some script than do so.
3- He do notjing so you can set him as static, and issue is fixed.

Note: If you decide to make it immortal, remember that there can be only be one. LOL
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
osiem80
User Offline
Joined: 24th Jan 2019
Location: Poland
Posted: 20th Sep 2019 18:22
Quote: "Sorry, I just want a character that you can not kill. You shoot at him but nothing happens. I want to prevent the player from shooting important characters.
"

U mean something like friendly fire?
https://forum.game-guru.com/thread/207801?page=1#msg2488513
PM
Duchenkuke
GameGuru BOTB Developer
3
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 20th Sep 2019 18:41 Edited at: 20th Sep 2019 18:44
Quote: "U mean something like friendly fire?"


lol no !

Just A character that doesnt take any damage just like a normal entity ! unfortunately I cant make the characters static because they need animations
Quote: "

1- he behaves like a soldier, so he can kill everybody but not one can kill him. So you has to modify script to make him as unkillable."


basically yes
Wolf
Forum Support
11
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 20th Sep 2019 20:09
My dudes, didn't you read what I just wrote? Import him as an animated entity and you are fine.
3com
5
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 20th Sep 2019 20:44
@ Duchenkuke
Backup your files: module_combatcore.lua and module_combatshoot.lua and replace them with those below.





it works for me.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Flatlander
GameGuru Master
12
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 20th Sep 2019 21:42
Wolf, don't you know, it's human nature wanting to do things the "hard" way. :LOL:
Alienware Aurora R7 with SSD 256GB boot drive ( C: ) and a secondary drive ( D: ) that is 2TB
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19 with Intel Turbo-burst
Installed RAM 16.0 GB
64-bit operating system, x64-based processor
Windows 10 Home
NVIDIA GeForce GTX 1070 with 8192 MB GDDR5 and 8095 MB shared system memory
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 20th Sep 2019 21:46 Edited at: 20th Sep 2019 23:56
@Wolf : your solution has the downside that the GG AI stuff is hard coded to only work on characters, so a lot of the AI scripts won't work with non-character entities.
Been there, done that, got all the T-Shirts!
PM
Wolf
Forum Support
11
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 20th Sep 2019 23:52
I was under the impression he just wanted a character to stand there looping the idle animation, maybe I misread that though
synchromesh
Forum Support
5
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 20th Sep 2019 23:55
Quote: "Backup your files: module_combatcore.lua and module_combatshoot.lua and replace them with those below."

But wont that mean Non of the NPC's will die ?
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
synchromesh
Forum Support
5
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 20th Sep 2019 23:58 Edited at: 21st Sep 2019 00:06
What about a script attached to a Dynamic with a replace health to " Ifused " so it can be used on any character ?
Sounds do-able but im clueless
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
3com
5
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 21st Sep 2019 00:43
Quote: "But wont that mean Non of the NPC's will die ?"

Fixed.
Just name all the unkillable such as: "soldier uk" without the quotes, of course.
In the vid just one soldier is unkillable.



Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

Attachments

Login to view attachments
PM
Duchenkuke
GameGuru BOTB Developer
3
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 21st Sep 2019 08:12
Quote: "I was under the impression he just wanted a character to stand there looping the idle animation, maybe I misread that though"


Wolf was right

I just need him standing around and do his idle animation.. no combat or anything!
Wolf
Forum Support
11
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 21st Sep 2019 14:38
Then import him as an object and give him a script that just loops the idle animation.
Teabone
Valued Member
13
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 21st Sep 2019 16:17
Without scripting all I can think you can do really is make their health insanely high.
Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Duchenkuke
GameGuru BOTB Developer
3
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 25th Sep 2019 19:25
Quote: "Just name all the unkillable such as: "soldier uk" without the quotes, of course."


Thanks 3com for your effort! But my characters dont use the stock AI - could you please tell me how you did it ?
3com
5
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 25th Sep 2019 23:20
For civilian chars.



Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

Attachments

Login to view attachments
PM
Duchenkuke
GameGuru BOTB Developer
3
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 26th Sep 2019 00:51 Edited at: 26th Sep 2019 00:52
Teabone
Valued Member
13
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 27th Sep 2019 22:20 Edited at: 27th Sep 2019 22:26
Another way is by using the old health > new health check and heal as a result. Make sure "strength" health is set to 10000

(not actual variables just saying in theory)
Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960

Login to post a reply

Server time is: 2019-10-17 22:31:41
Your offset time is: 2019-10-17 22:31:41