Product Chat / After Death Sequence

Author
Message
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 16th Nov 2018 04:40 Edited at: 16th Nov 2018 04:42
Quote: "New Script Pre-Exit System

A new way to handle entity demise has been added to the script system and allows the scripter to control exactly how the entity is removed from the game. Previously, the entity would either turn to ragdoll, disappear or explode. Now you can intercept the final moments of an entity removal with additional script code, allowing all manner of last minute tasks such as extra animations, changes to game logic, score handling and even resurrection."


Hi all now that I'm taking GG a bit more seriously in terms of game development, I'm dealing with a pretty long list of issues. But I'd like to bring up one that i cannot find a solution for due to some hardcoded elements with the engine.

When an enemy ragdolls there is no way to then keep the body around so we can create loot scripts or shoot the dead bodies and have blot splatter occur. It seems we are always racing a clock with what we can do with a dead body and i find this restricts various types of game concepts.

Is there any way around this? Or is this more of a request were we can determine if an entity actually can be removed entirely or not? Ive experienced a number of bugs while trying to work within this time frame we have before the entity is removed completely off the map. It would be nice if we can have the option to keep them there even if they have ragdolled.

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
rolfy
17
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 16th Nov 2018 04:55
New Script Pre-Exit System

A new way to handle entity demise has been added to the script system and allows the scripter to control exactly how the entity is removed from the game. Previously, the entity would either turn to ragdoll, disappear or explode. Now you can intercept the final moments of an entity removal with additional script code, allowing all manner of last minute tasks such as extra animations, changes to game logic, score handling and even resurrection.
https://www.game-guru.com/news-post/gameguru-public-preview-update-3
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 16th Nov 2018 05:03 Edited at: 16th Nov 2018 05:16
I quoted that in my original post though i am curious if this actually prevents the enemy from ever being removed from the map? As this is the line that confuses me and makes me assume we are still fighting against a clock:

Quote: "allowing all manner of last minute tasks "


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
rolfy
17
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 16th Nov 2018 05:20 Edited at: 16th Nov 2018 05:22
Yeah, just thought you might have missed that part
Without any idea of what functions are used then can't help much, hopefully Lee has included a list
Otherwise you will have to wait and dig into the source to root 'em out.
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 17th Nov 2018 02:17 Edited at: 17th Nov 2018 02:34
does anyone know the exact usage?

function ai_example_preexit(e) ?

The news post didnt specify
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
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 17th Nov 2018 07:05
This is in the Global.lua file.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 17th Nov 2018 09:19
Thank you very much Myke
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
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 17th Nov 2018 13:22
Your welcome.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 18th Nov 2018 23:31 Edited at: 18th Nov 2018 23:45
Has anyone got this working? Where the bodies remain and can run active code during this state?

Also i dont understand this bit:

if module_combatmelee.preexit(e,ai_movetype_useanim) == 1 then

I'm trying to test this all with custom characters not the default stock soldiers and zombies. So I'd not be using any of that module stuff.
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
Gtox
3D Media Maker
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 19th Nov 2018 10:17
I've stopped using the exit function in my scripts, and I just add 2000 to the entity's health, and create my own death code when the health goes below 2000.
i3 8350k 3GB GTX1060 8GB RAM Windows 10
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 19th Nov 2018 22:01 Edited at: 19th Nov 2018 22:02
I've worked many work arounds, similarly, however I am unable to make my character than ragdoll in that effect.

How do we use the pre exit function?
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
dimoxinil
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location:
Posted: 20th Nov 2018 09:32
Quote: "How do we use the pre exit function?"


I join the request.


Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 20th Nov 2018 11:21 Edited at: 20th Nov 2018 11:26
Do you have the script ai_melee_animmove and the character entitybank\user\experiments\FuseZombieAnimMoveMelee\smartzombie?
With this script you can let him ragdoll and then he stand up and attack again.


Thats how these preexit function work. Very "uncool" programming but it works.

The prexiti function is very usefull, but of course you need to let the engine know that you want to "restart" you AI. So only setting the health and the startpoint does not work, you actually need to recall the init function and set the preexit value to 0 and then he should "respwan".

Ai works now like this:
Init SetPreExitValue(e,0) -> Main
Main SetPreExitValue(e,1) -> Preexit
Preexit SetPreExitValue(e,2) -> Exit
If you never set it to 2, you character never dies
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
dimoxinil
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location:
Posted: 20th Nov 2018 11:25
Thanks so much for the explanation. It has been very useful.


Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 21st Nov 2018 23:43 Edited at: 21st Nov 2018 23:45
So this only works if we are using the stock module system? Of which im not :/

so confused :/
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: 22nd Nov 2018 10:19
Nope, the module system is only a way to call the functions in a different manner, they aren't necessary at all but more a naming convention to make it easier to find the functions in their own respective files.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 22nd Nov 2018 14:46
Quote: "So this only works if we are using the stock module system? Of which im not "

No you not need to use the module system, it would be good to use at least functions, but also this is not necessary.
Here is some pseudo code to explain it a bit better:
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM

Login to post a reply

Server time is: 2024-04-24 07:30:39
Your offset time is: 2024-04-24 07:30:39