enableCollisionWith: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{Feature|Warning|" to "{{Feature|warning|") |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
Line 33: | Line 33: | ||
'''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: | '''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: | ||
<sqf>//name of unit in editor such as player1 | <sqf> | ||
//name of unit in editor such as player1 | |||
//name of object in editor such as car1 | //name of object in editor such as car1 | ||
Line 41: | Line 42: | ||
car1 disableCollisionWith player1; | car1 disableCollisionWith player1; | ||
</sqf> | </sqf> | ||
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. |
Revision as of 19:43, 3 September 2024
Description
- Description:
- Cancels the effects of disableCollisionWith. The collision is always enabled for both objects in the arguments, i.e. vehicle1 with vehicle2 and vehicle2 with vehicle1
- Groups:
- Object Manipulation
Syntax
- Syntax:
- vehicle1 enableCollisionWith vehicle2
- Parameters:
- vehicle1: Object
- vehicle2: Object
- Return Value:
- Nothing
Examples
- Example 1:
Additional Information
- See also:
- collisionDisabledWith 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
- Posted on 2015-04-05 - 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:
Both commands enableCollisionWith and disableCollisionWith, are very handy codes and could be used for example: map testing, mission editing and even animation cutscenes.//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;