Scripts / Drop or remove weapon?

Author
Message
MaximEpihin
User Deleted
Posted: 13th Jun 2015 18:15
Hello, how can i drop current weapon or remove it?
Need to remove current weapon in hand. Is there some functions for these needs?
Create a game - it's like to start a new universe where there is only you and solitude with the environment
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Jun 2015 19:30
CharacterControlUnarmed(e)
RemovePlayerWeapons(e)

+ info

http://steamcommunity.com/sharedfiles/filedetails/?id=398177770

hth

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 8.1 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
MaximEpihin
User Deleted
Posted: 13th Jun 2015 19:42
RemovePlayerWeapons(e) - Remove all player weapons.

I need to remove only 1 weapone which in hand now, active weapon
Create a game - it's like to start a new universe where there is only you and solitude with the environment
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Jun 2015 19:53
Not sure about if I get your point before, so I decide to give you the 2 possible options, and the link for documente it.

If are you asking about Unarmed the player in test mode, just hit 0 number.
If you want caracter unarmed so take a look to ai_soldier script (scripbank folder), you will see CharacterControlUnarmed(e) in action.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 8.1 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 13th Jun 2015 19:55
I couldn't find a way of doing this other than to remove all weapons then reapply those that were not in "hand". It was very cumbersome and I also lost the ammo that was collected, so not very workable really.

There might be a better way to do it, but really I think we need a RemovePlayerWeapon(e) command as well as RemovePlayerWeapons(e). It would be a lot easier if the g_PlayerGunID was the 'e' number or name of the weapon the player has too, but doesn't appear to be related.

3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Jun 2015 20:00
Quote: " It would be a lot easier if the g_PlayerGunID was the 'e' number or name of the weapon the player has too, but doesn't appear to be related."

Unfortunatelly does not, since GG use "Entity id", instead of "e " or name one.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 8.1 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM

Login to post a reply

Server time is: 2024-12-22 01:36:40
Your offset time is: 2024-12-22 01:36:40