Scripts / New pickuppables script and library.

Author
Message
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 2nd Dec 2018 21:51
Can someone give these a good testing please.

I suggest you create a folder in scriptbank called 'Pick up Stuff' and put the pickuppable.lua in it then copy the pickuplib.lua to scriptbank itself. (that way the pickuppables.fpm you already have should work)

I've split out some of the useful stuff into a library so they can potentially be used in other scripts.

I've also fixed a few 'bugs' and changed it so that if an entity is thrown and it's name has the word "Explosive" in it then it will explode on contact with another entity, also if you throw something at an entity with the word "Explosive" in the name (and the contact is hard enough) then it will also explode.

So you can make simple handgrenades out of anything now, just set them as explodable and add "Explosive" to their name then throw them at your enemies.

In a similar vein AI characters should be killable simply by throwing things at them. The amount of damage done depends on the impact force, so you may need to hit them quite a few times depending on what you are throwing.

Setting the weight of an object will control how far you can throw it btw. (or at least it should, if you find any weird entities that misbehave in this regard please let me know)

If noone has any issues with these I will push them Lee's way for inclusion in the main build.


(btw, barrels are really fun to throw around now that they have the proper physics shape. )


Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
granada
Forum Support
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 3rd Dec 2018 13:03
Set up as you said but nothing happening for me ,normal pickuppables.fpm still working,might be me

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 3rd Dec 2018 15:47
Hi AmenMoses, thank you for this unfortunately it no worky for me rotating makes GG stall I have to ESC to quit and throwing them they just disappear, I made these Grenades they are not stock

Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Test PC - Windows 10 Pro x64 - G4400 @3.3GHz - 16GB DDR3 RAM - GeForce GTX 950 2GB - 500GB SSD
Laptop - Helios 300 Predator - i7 7700HQ - 32GB - Nvidia GTX1060 6GB - 525GB M2 - 500 SSD - 17.3" IPS LED Panel - Windows 10 Pro x64
Various Tutorials by me
granada
Forum Support
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 3rd Dec 2018 16:49 Edited at: 3rd Dec 2018 16:51
Got it now


Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 3rd Dec 2018 16:52
nice one

I have added the Hand Grenade to the store if you have my all models pack just check for updates and you will get it
Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Test PC - Windows 10 Pro x64 - G4400 @3.3GHz - 16GB DDR3 RAM - GeForce GTX 950 2GB - 500GB SSD
Laptop - Helios 300 Predator - i7 7700HQ - 32GB - Nvidia GTX1060 6GB - 525GB M2 - 500 SSD - 17.3" IPS LED Panel - Windows 10 Pro x64
Various Tutorials by me
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 3rd Dec 2018 19:06
Try replacing your physlib with this one.

Currently stuff will only explode if it hits another entity btw. I can make it so they explode on contact with the terrain as well if that is required.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 3rd Dec 2018 19:19
thanks AmenMoses, yeah I think if its thrown and hits terrain it should explode or if possible give users the choice ie grenades could have a 5 second delay or something
Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Test PC - Windows 10 Pro x64 - G4400 @3.3GHz - 16GB DDR3 RAM - GeForce GTX 950 2GB - 500GB SSD
Laptop - Helios 300 Predator - i7 7700HQ - 32GB - Nvidia GTX1060 6GB - 525GB M2 - 500 SSD - 17.3" IPS LED Panel - Windows 10 Pro x64
Various Tutorials by me
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 3rd Dec 2018 21:27
New version.

Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 4th Dec 2018 10:55
I have added another Grenade to the store a 'Stick Grenade'
Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Test PC - Windows 10 Pro x64 - G4400 @3.3GHz - 16GB DDR3 RAM - GeForce GTX 950 2GB - 500GB SSD
Laptop - Helios 300 Predator - i7 7700HQ - 32GB - Nvidia GTX1060 6GB - 525GB M2 - 500 SSD - 17.3" IPS LED Panel - Windows 10 Pro x64
Various Tutorials by me
Earthling45
8
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 4th Dec 2018 16:17
I've tried it and it work very good, i experience some stuttering when rotating but that obviously my pc not being strong enough to handle it i think.
What i did find is that if you have a weapon, you can't rotate a picked up item because when you press the RMB, the weapon will be selected and the item is dropped.
In the coming weeks i'll finaly be upgrading my system and than i will test again.
Kitakazi
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location:
Posted: 5th Dec 2018 02:39 Edited at: 5th Dec 2018 02:42
This script is not working correctly for me. It works fine if I do not have a weapon but if I do have a weapon it bugs out.
I walk up to item. Then I press 0 to hide my weapon. Then once you pickup the item if you press RMB to rotate, the player will drop the item and at the same time reequip their weapon and then you complete lose control of the mouse and cannot look around at all.


---------
Strange I did not see Earthling45's post about the same issue when I posted. Sorry!
Earthling45
8
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 5th Dec 2018 09:46
Quote: "Strange I did not see Earthling45's post about the same issue when I posted. Sorry!
"


Don't say sorry.

You've put some info which i left out, i did get the same lockup as you but on a second try on an empty map and applying the script to a barrel, i was able to rotate the barrel, push it, throw it and make it explode with a medieval knive.
Another point to mention is that the scripts are present in Gameguru, but i had to download the pickupable.zip in order to get the pickupable.fpm in GG.
It could be me my mistake but i thought the map was added to GG along with the scripts.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Dec 2018 19:52
I thought the fpm was added as well.

There is some right mouse button code in one of the GG standard scripts that causes the dropping issue btw, gameplayercontrol.lua I think it's called.

I will have to track it down and fix it at some point, it only happens with some weapons I believe.

Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Dec 2018 09:42 Edited at: 6th Dec 2018 10:30
Give these a go.

At the top of the pickuppable.lua script there is a section of user editable values, I have set the carrying offset to one side to demonstrate one of them, feel free to play around with those and see what they do.

The jerky rotation thing happened to me but there was no FPS drop coinciding with it so I'm not sure what is going on there, it just seemed as if GG stopped processing player input for a second or two, possibly there is an underlying issue with the mouse buffers or something, may even be a DX issue that is only showing up on rotating the carried object because you have a sudden burst of sustained mouse use rather than a normal pattern in the game of short periods of movement with long gaps in between.


Backup your current gameplayercontrol.lua script (or just rename it to old_gameplayercontrol.lua) before putting this one in it's place btw, just in case you need to go back to it.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
Earthling45
8
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 6th Dec 2018 14:00
Yes, this works well.
Earthling45
8
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 6th Dec 2018 14:08
Rotation also seems to take some time to start, while i rotate an item it stutters but if i choose another direction it reacts quite swiftly.

Login to post a reply

Server time is: 2024-11-17 11:27:05
Your offset time is: 2024-11-17 11:27:05