User Tools

Site Tools


set_entity_blocks_sight

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
set_entity_blocks_sight [2017/11/27 08:11] justinset_entity_blocks_sight [2021/04/21 18:50] (current) justin
Line 4: Line 4:
 Specifies whether or not the [[entity]] should block a [[character|character's]] line of sight. This is used by the experimental [[fog of war]] feature and will be used in other line of sight calculations in the future. Specifies whether or not the [[entity]] should block a [[character|character's]] line of sight. This is used by the experimental [[fog of war]] feature and will be used in other line of sight calculations in the future.
  
 +====Signature:====
 <code python> <code python>
 set_entity_blocks_sight(entity, blocks_sight) set_entity_blocks_sight(entity, blocks_sight)
Line 9: Line 10:
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|entity|Entity that will have its light enabled or disabled.|[[Entity]]|Yes| +|entity|[[Entity]] that will have its "Blocks Line of Sight" property changed.|[[Entity]]|Yes| 
-|blocks_sight|Determines the light's state (on or off).|[[Boolean]]|Yes|+|blocks_sight|Determines whether or not the [[entity]] blocks line of sight.|[[Boolean]]|Yes|
  
 <WRAP center round info 100%> <WRAP center round info 100%>
-Use the corresponding "Blocks Line of Sight" property on the [[Model Properties]] panel to set its initial value. For example, a closed door should initially block the player's sight.+Use the corresponding "Blocks Sight" property on the [[Model Properties]] panel to set its initial value. For example, a closed door should initially block the player's sight.
 </WRAP> </WRAP>
  
 ====Example:==== ====Example:====
-<code lua+<code bauxite
-set_entity_blocks_sight(self, false)+set_entity_blocks_sight(self, false);
 </code> </code>
-//Results:// The camera's angle is instantly adjusted to aim towards the entity with an ID of "chest01".+//Results:// The [[entity]] to which the [[script]] is attached will no longer block the player's line of sight.
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
set_entity_blocks_sight.1511799081.txt.gz · Last modified: 2017/11/27 08:11 by justin