Scripts / [QUESTION] Respawn timer?

Author
Message
xSyndicate58
7
Years of Service
User Offline
Joined: 25th Feb 2017
Location:
Posted: 1st Mar 2017 17:27
Hello Community,

I have a question. Is there any way to modify the sequence, when the character dies? (e.g. change time until respawn, show a prompt etc.)

Any help is appreciated

greetings
PM
xSyndicate58
7
Years of Service
User Offline
Joined: 25th Feb 2017
Location:
Posted: 10th Mar 2017 21:42
bump

https://youtu.be/OTYDmSZCHL8?t=13m6s

for example take a look at this part of this video... when he dies a text appears with YOU DIED and he can't respawn anymore.. how to modify the death in general?

greetings
PM
xSyndicate58
7
Years of Service
User Offline
Joined: 25th Feb 2017
Location:
Posted: 17th Mar 2017 15:58
bump
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 17th Mar 2017 23:18
You dont need to bump your thread. When someone gets the answer they will answer you.

Thanks.
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.

smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 18th Mar 2017 10:25 Edited at: 18th Mar 2017 11:07
A respawn timer in single player? Who would want that? :p
You can just check the player health and if it goes below 1 then toggle a variable, then if the variable is changed you can move the player somewhere safe and then show some image or something to hide the world maybe, while counting down... Then move him back when the desired time is reached.

All very possible with GG right now

edit, watched the video, here you go (attach to always active object)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
xSyndicate58
7
Years of Service
User Offline
Joined: 25th Feb 2017
Location:
Posted: 19th Mar 2017 11:46 Edited at: 19th Mar 2017 11:58
first of all, thanks alot smallg for the script. almost exactly what i was looking for

and to your question why a respawn timer in singleplayer:

I dont want the player to respawn as often he wants to, but rather send him to the main menu after he dies (looses progress)

greetz

edit: I tried attaching ur script to a random entity (table) and set its "Always Active" attribute to 'true' but when the character dies, nothing happens. The normal approx 1-2 seconds delay occur and I respawn again (no message in centre of the screen).

What am I doing wrong? I really just want, that the player HAS to go back to the main menu when dying. (But there should also be a message like you wanted to implement where it says, that the character died..)

greetz
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 19th Mar 2017 15:17
Make sure the table is not static - green when highlighted.
Scripts only run on non static items (known as dynamic).
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
xSyndicate58
7
Years of Service
User Offline
Joined: 25th Feb 2017
Location:
Posted: 19th Mar 2017 19:40
i love you smallg, ure the real guru

another question: Now I tried to show an image as soon as the character dies. It shows the image, but the prompt is not visible (propably behind the image). Is there a way, I can show the prompt while showing an image?

This is my code atm:

PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 19th Mar 2017 21:04
assuming your image is here based on your code as you're using the old system
Quote: "scriptbank\\images\\death_timer\\000.png"

if not then update the script to point to the correct location

so the script should look like this (converted to the sprite system)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Login to post a reply

Server time is: 2024-12-23 05:05:25
Your offset time is: 2024-12-23 05:05:25