Difference between revisions of "lineIntersectsSurfaces"

From Bohemia Interactive Community
Jump to navigation Jump to search
(note)
Line 88: Line 88:
 
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
 
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
 
<dd class="note">
 
<dd class="note">
note...
+
Fast check if object is in a house:<code>KK_fnc_inHouse = {
 +
[[lineIntersectsSurfaces]] [
 +
[[getPosWorld]] _this,
 +
[[getPosWorld]] _this [[vectorAdd]] [0, 0, 50],
 +
_this, [[objNull]], [[true]], 1, "GEOM", "NONE"
 +
] [[select]] 0 [[params]] ["","","","_house"];
 +
[[if]] (_house [[isKindOf]] "House") [[exitWith]] {[[true]]};
 +
[[false]]
 +
};
 +
[[onEachFrame]] {[[hintSilent]] [[str]] ([[player]] [[call]] KK_fnc_inHouse)};</code>
 
</dd>
 
</dd>
 
</dl>
 
</dl>
 
<!-- DISCONTINUE Notes -->
 
<!-- DISCONTINUE Notes -->

Revision as of 14:46, 27 August 2015

Template:Command

Notes

Bottom Section

Posted on August 27, 2015 - 12:44 (UTC)
Killzone Kid
Fast check if object is in a house:KK_fnc_inHouse = { lineIntersectsSurfaces [ getPosWorld _this, getPosWorld _this vectorAdd [0, 0, 50], _this, objNull, true, 1, "GEOM", "NONE" ] select 0 params ["","","","_house"]; if (_house isKindOf "House") exitWith {true}; false }; onEachFrame {hintSilent str (player call KK_fnc_inHouse)};