Garry's Mod

Garry's Mod

Control Map Entities - Entity:fire() E2 Function (Wiremod / ent_fire)
 Denne tråd er blevet fastgjort, så den er sikkert vigtig
LibertyForce  [udvikler] 13. aug. 2014 kl. 5:00
Example E2 Codes
Get Entity IDs and names

Here is a little but very useful E2 code, that will give you information about every entity you right-click on. Uses custom functions that depend on this addon. Simple spawn the chip anywhere, then right-click on any entity and look in the console for the information.

@name Get Entity IDs # How to use: # Place the E2 chip, then right-click on any entity # to get it's ID, class, unique name and owner. runOnTick(1) M2 = owner():keyAttack2() if(changed(M2) & M2) { print("ID: " + owner():aimEntity():id()) print("MapCreationID: " + owner():aimEntity():getMapID()) print("Class: " + owner():aimEntity():type()) print("Name: " + owner():aimEntity():getEntityName()) }
Sidst redigeret af LibertyForce; 21. feb. 2017 kl. 9:53
< >
Viser 1-5 af 5 kommentarer
GHOST_ECHO 18. feb. 2017 kl. 11:28 
what would be the code to lock a door? i am having serious headaches trying to lock a door in headattackcity.thanks for your time and efforts,this is a nifty tool
LibertyForce  [udvikler] 19. feb. 2017 kl. 6:55 
For most doors (func_door*):
Ent = entityMapID(123) Ent:fire("lock")
Of course, replace 123 with the actual ID you got with Easy Entity Inspector
Also read the tutorial!
19. feb. 2017 kl. 11:49 
@LibertyForce, "Get Entity IDs and names" E2 code is not valid because there is an extra pair of parentheses on line 12.
LibertyForce  [udvikler] 21. feb. 2017 kl. 9:54 
Thanks for the info!
It's been forever since I had time to look at this mod...
Intuitive 28. dec. 2017 kl. 18:35 
Thank you. Thank you. :-)
< >
Viser 1-5 af 5 kommentarer
Per side: 1530 50