Garry's Mod

Garry's Mod

Control Map Entities - Entity:fire() E2 Function (Wiremod / ent_fire)
 Tämä aihe on kiinnitetty, joten se on todennäköisesti tärkeä
LibertyForce  [kehittäjä] 13.8.2014 klo 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()) }
Viimeisin muokkaaja on LibertyForce; 21.2.2017 klo 9.53
< >
Näytetään 1-5 / 5 kommentista
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  [kehittäjä] 19.2.2017 klo 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.2.2017 klo 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  [kehittäjä] 21.2.2017 klo 9.54 
Thanks for the info!
It's been forever since I had time to look at this mod...
Thank you. Thank you. :-)
< >
Näytetään 1-5 / 5 kommentista
Sivua kohden: 1530 50