Product Chat / Updated source code+Global.lua to allow access to entity Head Limb

Author
Message
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 12th Mar 2020 10:34 Edited at: 12th Mar 2020 10:37
Not sure if this is for everyone, but I have updated the main source code and global.lua to access the 'Head' limb ID so that I didn't have to load into a modelling package or write code outside of GG.
This allows me to return the head limb id within LUA using Entity[e]['headlimb']. For example attached, I used 'SlowZombie1' which returned a value of 53 as the Head Limb Id. I can then use this ID to Set and Rotate the head limb while the zombie moves toward me.
Is this useful to anyone else in the community?
I will be opening up LUA and the engine a bit more for my own needs including adding ability to return any limb ID within LUA. Any constructive comments welcome.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro, Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.

Attachments

Login to view attachments
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 12th Mar 2020 15:24
Dude, this is important to many people, although not everyone comes here to say it.
Knowing the id of a thing or npc is crucial to be able to interact with it via lua.
The "headlimb" has many uses, it is not only used to detect when an npc is hit by a shot, it can also be used to detect a collision, for example, to open the drawers of a cabinet with the mouse. I think Rolfy used something similar.

How would we like GG to provide us with an api and libraries to access GG via VS. I'm sure it might help to community to develop 3rd party tools and integrate them into GG.

It's funny how you have to change the chip when you program with VS, I was surprised myself using (- -) to comment a line, using (..) to concatenate values. LOL
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
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 12th Mar 2020 16:09
Nice work BOTR! What I think would be valuable to go along with this
is if all those infected Zombies would be cleaned up and made to look
like "normal", everyday people!

You would still have the same zombies galore to hack up!
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 12th Mar 2020 16:18
thanks for the response both, I thought I was going to be talking to myself

I can (for now), upload a zip file containing the updated Guru-MapEditor.exe , global.lua and test scripts if anyone interested, so you can play around with it.

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro, Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 12th Mar 2020 18:49
Working on standalone system, and automatically generating new folder with the map filename within GG mapbank folder as project folder.
That pro folder will contain all the level files being ready to use as project-based level for later use when user decide to make standalone.
If user add/remove items from the map, just will has to repeat the process.
And just searching map file via openFileDialog + one click.

Anyway I can to give a go as soon as posible.
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
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 12th Mar 2020 19:53 Edited at: 12th Mar 2020 19:54
Um … I'm going to be adding a GetLimbName( obj, li ) function soon, takes the object Id and a limb id and returns the name if it exist or 'nil' if it doesn't.

Allows you to quickly iterate to find either a specific limb or build a list of them.

I'm using it in my BVH file reader effort whereby you have a BVH file with the animations in and the script applies it in real time to the model in GG.

Edited to add: if you want the code to add it yourself let me know!
Been there, done that, got all the T-Shirts!
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 12th Mar 2020 20:10
Sounds good I've tried to use the normal rotate limb commands in the past and they never seem to do anything. Think I got a clock to work years back using it, but generally end up animating in Blender.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 12th Mar 2020 20:18
Yes, they are a bit difficult to use. I am toying with the idea of either improving them or adding complementary ones that will be more intuitive to use.
Been there, done that, got all the T-Shirts!
PM
rolfy
17
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 12th Mar 2020 20:32 Edited at: 12th Mar 2020 20:40
This does look pretty cool and using limb detection has a lot of uses.
Back in the day scene commander released an app to display limb numbers when the mouse hovered over the bone, maybe you could expand on this the same to show all limb numbers in same way. This enables progressive damage where a leg shot triggers a limp animation for example.
https://forum.thegamecreators.com/thread/180808
This still works with .x character models. It will in fact work with any skinned and rigged model so not limited to only characters.
Yeah, I did use limb detection for drawers,doors etc and the interactive hand was a weapon basically. That way you could trigger things very specifically using the door handle or whatever rather than the whole object.
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 12th Mar 2020 21:43
Id be careful uploading compiles of GG as I imagine it won’t have the encryption code in it - inadvertently might get used to build unencrypted standalone builds. Just a thought.

Cheers

GPU: GeForce RTX 2070 SUPER PassMark: 14817
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 13th Mar 2020 06:42
@cybernescence: certainly will be keeping it locally now.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro, Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Mar 2020 07:41
I agree.
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
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 13th Mar 2020 09:29
cool, I have also now added more limb commands in the source. more to add and not just limb stuff. this is kinda fun and easy.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro, Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.

Login to post a reply

Server time is: 2024-05-01 11:08:49
Your offset time is: 2024-05-01 11:08:49