Scripts / Help with Pickup script

Author
Message
Super Masgamer
Audio Media Maker
5
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 14th Dec 2018 00:47
Could someone help me, please? What am I doing wrong? I'm trying to learn how to script and in-game I'm trying to pick up the flashlight. When the player picks up the flashlight I want it to 1. say press e to pick up the flashlight 2. say the player has collected it than 3. have a little text prompt that says press F to use the flashlight then 4 make the flashlight entity disappear. This is what I have so far and I can't even get the player to pick up the flashlight XD

Super Masgamer
Audio Media Maker
5
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 14th Dec 2018 01:31
I actually found a really helpful thread for exactly what I wanted.

https://forum.game-guru.com/thread/215529#msg2549773

Super Masgamer
Audio Media Maker
5
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 14th Dec 2018 01:33
I have another question. Is there anyway to display an image right after picking the item up?
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 14th Dec 2018 05:18
Hi Super Masgamer.
this is what i use to pick up a battery in my game.
hope this wil help.

Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th Dec 2018 10:33
My newer version has HUD images for the flashlight, don't remember if it includes being picked up or not but you should be able to add that by comparing the version belidos edited to the new one.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 15th Dec 2018 11:09
My version should be the same as the one you linked, it was your flashlight2 that i updated with the puckup stuff, so has the image stuff, hence why i called it flashlight3

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.

Login to post a reply

Server time is: 2024-03-29 00:02:15
Your offset time is: 2024-03-29 00:02:15