enableCollisionWith: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(cleanup)
Line 51: Line 51:
<dd class="note">
<dd class="note">


'''enableCollisionWith''' is a script that when you apply it to an object, it will be solid and the player will not be able to go through it. However, if you want your unit to go through it, you may want to use the '''disableCollisionWith''' command.
'''enableCollisionWith''' is a script that when you apply it to an object, it will be solid and the player will not be able to go through it. However, if you want your unit to go through it, you may want to use the '''disableCollisionWith''' command. An example for this is:  
<br>
<code>//name of unit in editor such as player1
<br>
An example for this is:  
<br>
<code>
//name of unit in editor such as player1
//name of object in editor such as car1
//name of object in editor such as car1
<br>
 
car1 enableCollisionWith player1;
car1 enableCollisionWith player1;
<br>
 
//to make your unit go through the car, use the below and make sure you know what your doing!
//to make your unit go through the car, use the below and make sure you know what your doing!
<br>
 
barrel1 disableCollisionWith player1;
car1 disableCollisionWith player1;
</code>
</code>
<br>
<br>
Both commands '''enableCollisionWith''' and '''disableCollisionWith''', are very handy codes and could be used for example: map testing, mission editing and even animation cutscenes.
Both commands '''enableCollisionWith''' and '''disableCollisionWith''', are very handy codes and could be used for example: map testing, mission editing and even animation cutscenes.


</dd>
</dl>
<!-- DISCONTINUE Notes -->
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on April 5, 2015 - 00:15 (UTC)</dd>
<dt class="note">[[User:Ranwer|Ranwer]]</dt>
<dd class="note">
May the moderator please quickly change the above word "barrel1" to "car1".
<br>
Thank you!
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->
<!-- DISCONTINUE Notes -->

Revision as of 03:06, 5 April 2015

Hover & click on the images for description

Description

Description:
Enable collision between vehicles.
Groups:
Uncategorised

Syntax

Syntax:
vehicle enableCollisionWith vehicle
Parameters:
vehicle: Object
vehicle: Object
Return Value:
Nothing

Examples

Example 1:

Additional Information

See also:
disableCollisionWith

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section

Posted on April 5, 2015 - 00:13 (UTC)
Ranwer
enableCollisionWith is a script that when you apply it to an object, it will be solid and the player will not be able to go through it. However, if you want your unit to go through it, you may want to use the disableCollisionWith command. An example for this is: //name of unit in editor such as player1 //name of object in editor such as car1 car1 enableCollisionWith player1; //to make your unit go through the car, use the below and make sure you know what your doing! car1 disableCollisionWith player1; Both commands enableCollisionWith and disableCollisionWith, are very handy codes and could be used for example: map testing, mission editing and even animation cutscenes.