User Tools

Site Tools


hpl2:tutorials:script:scripting_by_xtron_-_item_that_unlocks_a_door

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpl2:tutorials:script:scripting_by_xtron_-_item_that_unlocks_a_door [2012/06/23 16:11]
silentstriker [THE SCRIPT]
hpl2:tutorials:script:scripting_by_xtron_-_item_that_unlocks_a_door [2013/08/22 15:12] (current)
yourcomputer Corrected references
Line 76: Line 76:
 <code cpp>void FUNCTION(string &in asItem, string &in asEntity) <code cpp>void FUNCTION(string &in asItem, string &in asEntity)
 { {
-    SetSwingDoorLocked(door, false, true); +    SetSwingDoorLocked(asEntity, false, true); 
-    PlaySoundAtEntity("",​ "​unlock_door", ​door, 0, false); +    PlaySoundAtEntity("",​ "​unlock_door", ​asEntity, 0, false); 
-    RemoveItem(item);+    RemoveItem(asItem);
 } }
 </​code>​ </​code>​
Line 106: Line 106:
 void FUNCTION(string &in asItem, string &in asEntity) void FUNCTION(string &in asItem, string &in asEntity)
 { {
-    SetSwingDoorLocked(door, false, true); +    SetSwingDoorLocked(asEntity, false, true); 
-    PlaySoundAtEntity("",​ "​unlock_door", ​door, 0, false); +    PlaySoundAtEntity("",​ "​unlock_door", ​asEntity, 0, false); 
-    RemoveItem(item);+    RemoveItem(asItem);
 } }
    
Line 120: Line 120:
  
  
-<​code>​+<​code ​cpp>
 void OnStart() void OnStart()
 { {
Line 148: Line 148:
  
  
-<font 10pt:​normal/​Arial;;​inherit;;​inherit ​  ​>Edited by SilentStriker</​font>​+<font 10pt:​normal/​Arial;;​inherit;;​inherit ​   >Edited by SilentStriker</​font>​
  
hpl2/tutorials/script/scripting_by_xtron_-_item_that_unlocks_a_door.1340467882.txt.gz · Last modified: 2012/06/23 16:11 by silentstriker