Product Chat / Getting Entity ID easily

Author
Message
Northern
13
Years of Service
User Offline
Joined: 5th Nov 2010
Location: Brazil
Posted: 2nd Aug 2014 19:05 Edited at: 2nd Aug 2014 19:08
Hello everyone,



Now, if necessary, you will may easily to disclose the 'entity id' and 'entity object number' of any dynamic object into your game level, just using a small Lua script file, which you may find it attached or using the link below. Besides, a video tutorial explaining how to use it, will be soon available on Video gallery page as well.



https://dl.dropboxusercontent.com/u/64612150/disclosingobjid.zip







Enjoy!



Northern
PM
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 2nd Aug 2014 19:18
This looks like it could be quite helpful. Do the ID numbers change if one of the items is removed?

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
tomjscott
User Banned
Posted: 2nd Aug 2014 19:22
You can get entity ID now by just hovering over the entity in the editor and it shows the ID in the status bar. Also, you can put a command in an entity's init function to store the ID globally and then access it from other scripts. Having to run a test level, walk up to an object, and then press E to reveal the info is not really the best method.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071
Northern
13
Years of Service
User Offline
Joined: 5th Nov 2010
Location: Brazil
Posted: 2nd Aug 2014 20:30 Edited at: 2nd Aug 2014 20:33
@Teabone:



After saving your game level, the ID number of existent objects remains unchanged, However, if you move any of those entities, there will be a change in 'Object Number', but not the ID number. That was what I found when I was testing the sc
PM
Sparrowhawk
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 12th Apr 2011
Location: Planet Magrathea
Posted: 2nd Aug 2014 22:09
The thumbnail of the video before I press play, looks like it has a Sunburst effect from PaintShop Pro

If I am correct, I am very pleased

Good video by the way

Custom Mac Pro (2014): OSX 10.10 (Yosemite) and Windows 8.1 Pro:

Octa-threaded Xeon E5 v2 @ 3.7Ghz [9775]; Dual AMD FirePro D500 (3GB VRAM Each) [3769]; 12GB RAM [2517]; 512GB SSD [9074];
tomjscott
User Banned
Posted: 2nd Aug 2014 22:34
@Northern,

I was just trying to help out. This idea of using a script and walking around to find out entity Ids has been around for a while and most have learned the better approach now. I just don't want you to be left in the dark ages. After all, you
Northern
13
Years of Service
User Offline
Joined: 5th Nov 2010
Location: Brazil
Posted: 3rd Aug 2014 02:17
@Sparrowhawk:

Thank you.

Yes, you are right; it's sunburst effect from Corel PaintShop Pro shown in the video title.


@tomjscott

Thanks for your commentary.

I may understand your point of view; however, what about you sharing with the com
PM

Login to post a reply

Server time is: 2024-05-02 20:05:42
Your offset time is: 2024-05-02 20:05:42