Thread: My DtS/MoT mod
View Single Post
  #450  
Old 02-07-2010, 09:32 AM
forlik's Avatar
forlik forlik is offline
Approved Member
 
Join Date: Nov 2008
Location: Minsk, Belarus
Posts: 450
Default

Quote:
Originally Posted by Liz Shaw View Post
forlik, how can you tell an NPC's ID outside the LUA file? This guy's registered in the SWD as "GermanSoldier173".
GermanSoldier173 has empty ID (black area). ID is stored in SWD after 0x3D bytes (yellow area) after the entity name (green area).
You can create ID yourself. Just fill black area with 4-bytes ID in reverse form.
For example, 'S173' should be saved as '371S'. After that you can use this ID in lua: Level.FindActor('S173').
ID should be unique.
Attached Images
File Type: jpg swd1.jpg (52.7 KB, 11 views)
Reply With Quote