Scripts / Help with Jump scare death script

Author
Message
Super Masgamer
Audio Media Maker
6
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 15th Nov 2019 23:08 Edited at: 15th Nov 2019 23:10
So I have been playing around with different scripts trying to accomplish what I need. I'm using the ai_zomebiewalk script because I want the enemy to chase me and that works well with the in-engine configs but what I'm having an issue with is how do I show an image and kill the player at the same time when the enemy is at a certain range. I can get either the image to show (jump scare) or the player to die but not both working at the same time.

*Edit* oh i forgot to ask. I would also like to have a sound file play during the jump scare
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 16th Nov 2019 02:28
Just guessing, but you would probably have to show the image,
and play the sound then wait to let the player press a button--
where they croak! I think at death, it restarts, or goes to main menu?

This thread might help; https://forum.game-guru.com/thread/221159
PM
Super Masgamer
Audio Media Maker
6
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 16th Nov 2019 18:07
I basically want Five nights of Freddy jump scare. How can I accomplish that with a moving entity when it comes into range a.k.a touches the player
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 16th Nov 2019 19:00 Edited at: 16th Nov 2019 19:29
This is pretty simple, and at the same time a little tricky
because you are working with the NPC AI -- therefor you would need to
know what ((and where)) to put a line of code in there.
Each Scarey JUMPY dude AI could then know it's distance from the player,
and when close enough - viola, it's looks can kill!

add to AI script
if GetPlayerDistance( e ) < 413 then
// Run Scare code //
or in other words, show the image, play the sound and then--
wait for input then kill player.

Look further into the script forums for the technique details,
Found a thread that someone created a type of jumpscare in;
https://forum.game-guru.com/thread/207801?page=7#msg2516046
Here are some global.lua functions to get you started--

LookAtPlayer(e)
LoadImages(str,v)
SetImagePosition(x,y)
ShowImage(i)
PlaySound(e,v)
if g_KeyPressE = 1
HurtPlayer(e,v)
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 16th Nov 2019 19:09
BTW, I would recommend looking into getting at least familiar with
the very basics of LUA syntax as soon as you get time by studying
some of the threads and free scripts. You would be well off being
able to make a very simple script from scratch before digging into
the complexity of the GG AI
PM
Super Masgamer
Audio Media Maker
6
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 17th Nov 2019 01:01
I don't have to use the Hardcodes from the AI. I'm open to any suggestions lol
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 18th Nov 2019 01:51
BTW, you can use a timer if you prefer (just like that script I linked to,)
instead of player input for maybe better effect.
And why not use that script for a temp compromise and see how it works?
PM

Login to post a reply

Server time is: 2024-12-22 09:38:37
Your offset time is: 2024-12-22 09:38:37