Scripts / lowering weapon while reading a note

Author
Message
nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 30th May 2016 23:38 Edited at: 30th May 2016 23:38
hi there! i have request and i think it's easy.
i have used this great script by smallg:



when you attach this script to an entity like a paper you can press e to pick it up and then you see a picture. i have made some different pictures of the player holding a folder and a cell phone.

you can see in the pictures attached that the player does not lower the gun. usually this isn't necassary but with my pictures it is essintial to let the player lower the gun or it looks like he has three hands. what command must be added to the script to make the player lower the gun (like pressing the "0" key in game) as long as he looks at the picture and raise the gun again after he put it away. this last task is optional.
can you help me with this?

screenshots:
01: this is how it looks like before the folder is taken by pressing "E"
02: when he holds the cell phone it looks weird.
03: here it's not so bad but you can see the "third" arm with the gun.
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti

Attachments

Login to view attachments
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 31st May 2016 05:50 Edited at: 31st May 2016 05:56
How about adding HIdeHuds() when it shows the note and ShowHuds() when it hides the note?

not sure the exact format or where to put it thought

Edit: nope that doesn't hide the weapon just the hud

i7, NV960 4GB, 16GB memory, 2x 4TB Hybrid, Win10.
i5 , AMD 6770 1GB, 8GB memory, 512GB Generic SATAIII + 2TB Seagate Baracuda SATAIII, Win7.
i3, Radeon integrated graphics, 4GB memory, 512gB Generic SATAII, Win8.1.
Q6600, Intel integrated graphics, 2GB memory, 180GB Generic SATAII, WinXP.
Isagabe
10
Years of Service
User Offline
Joined: 12th Sep 2014
Location:
Posted: 31st May 2016 06:12
this is what i use when reading notes etc -
SetPlayerWeapons(0) while reading or what ever else i am doing
and once whatever is done or note read i then use
SetPlayerWeapons(1)

it works for me
Isagabe
10
Years of Service
User Offline
Joined: 12th Sep 2014
Location:
Posted: 31st May 2016 06:28 Edited at: 31st May 2016 06:40
I use different read and pick-up scripts but I tested with smallg's script and it works BUT once read I can't get the hands to return. Thanks as always smallg. This is the bit of code for hands to disappear as note is read (press E) (edited for clarity)


press 1 for weapon and hands to return. not ideal for but it is a start.
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 31st May 2016 14:18


should work
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Isagabe
10
Years of Service
User Offline
Joined: 12th Sep 2014
Location:
Posted: 31st May 2016 18:06
Thanks smallg.
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 31st May 2016 20:35
You might want to use:

remember_weapon = g_PlayerGunID
ChangePlayerWeaponID(remember_weapon)

To return the last held weapon if player has a few in inventory.
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 31st May 2016 21:15
What's about using:

Quote: "SetAttachmentVisible: SetAttachmentVisible(e,1). 1 sets the entities attachment to be visible (such as their weapon), 0 switches it off"


3com
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

PM
nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 31st May 2016 23:08
@smallg: i tried it and it does work
@rolfy: where do i have to insert these lines? looks interesting.

@all: thank you for your quick help! this is a very friendly place here!
the first script does work, maybe i will try to make the player raise the weapon again after putting the paper / item away.
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 31st May 2016 23:50 Edited at: 1st Jun 2016 00:28
I don't have the time to be going into showing the note etc but here is a quick and dirty script to show how to use the commands. Place a few weapons down and pick them up, use the script in a barrel and whatever weapon you have selected it will remove and replace using distance (use a keypress if it suits you). You can then show your note or whatever functions you want to happen. It would also be a decent visual that something to read is nearby if you show a graphic or prompt, up to you,



Edit* Using 3com's suggestion may work for your needs but no harm in knowing there are other ways that might suit you for future requirements. You do all the same want to be sure the same weapon is replaced that player was holding before reading the note.
nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 5th Jun 2016 01:34
i have tried several times to insert this into the original script but because i don't know how to do this i always did it wrong and got error windows. but nevermind, i tried the one where the weapon is lowered after the note and must be changed by mousewheel and that's okay for me. thank you for al your help, this was really great (and fast)!
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti

Login to post a reply

Server time is: 2024-12-22 17:20:39
Your offset time is: 2024-12-22 17:20:39