Garry's Mod

Garry's Mod

Control Map Entities - Entity:fire() E2 Function (Wiremod / ent_fire)
 此主題已被置頂,因此它可能很重要
LibertyForce  [開發人員] 2014 年 8 月 13 日 上午 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()) }
最後修改者:LibertyForce; 2017 年 2 月 21 日 上午 9:53
< >
目前顯示第 1-5 則留言,共 5
GHOST_ECHO 2017 年 2 月 18 日 上午 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  [開發人員] 2017 年 2 月 19 日 上午 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!
2017 年 2 月 19 日 上午 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  [開發人員] 2017 年 2 月 21 日 上午 9:54 
Thanks for the info!
It's been forever since I had time to look at this mod...
Intuitive 2017 年 12 月 28 日 下午 6:35 
Thank you. Thank you. :-)
< >
目前顯示第 1-5 則留言,共 5
每頁顯示: 1530 50