Jump to content
AidenJ

disableCollisionWith not working

Recommended Posts

So Basically im using the Apex Breaching animation and I want them to stay in a spot, however the trigger starts a bit late and well they move before it activates, meaning that they get out of position. I tried the disableCollisionWith and it didn't work. Is there an Easier method of doing this? Like for example I do 
 

Flashbang disableCollisionWith Doorman;

And it doesn't work. Is this a bug or is there an easier method?

Share this post


Link to post
Share on other sites
1 minute ago, sarogahtyp said:

Is there a way to stop them from being pushed about upon entering the game? or making the trigger load fast enough so that they dont get pushed?

Share this post


Link to post
Share on other sites

You can (temp) 'freeze' a unit by disabling the simulation. In case of Eden, put the following in the init box of a unit:

 

this enableSimulation false;

 

Share this post


Link to post
Share on other sites
4 minutes ago, whiztler said:

You can (temp) 'freeze' a unit by disabling the simulation. In case of Eden, put the following in the init box of a unit:

 


this enableSimulation false;

 

But if it needs to play an animation then wont it just not allow the animation to go through, the problem im having is that they move around before it plays which is like a split second, but it puts them off course. Would I put a sleep command on this to wait to enable it?

Share this post


Link to post
Share on other sites
2 hours ago, AidenJ said:

So Basically im using the Apex Breaching animation

So, a vanilla animation?

2 hours ago, AidenJ said:

and I want them

Who?

2 hours ago, AidenJ said:

 to stay in a spot,

what does that mean?

2 hours ago, AidenJ said:

 however the trigger starts a bit late

which trigger? A trigger checks its condition twice a second. You can replace it by an "onEachFramed" EH.

2 hours ago, AidenJ said:

well they move before it activates, meaning that they get out of position.

Who? what move? animation or path? If path, just try to disableAi "path"

2 hours ago, AidenJ said:

I tried the disableCollisionWith

Why???? what for?

 

  • Thanks 1

Share this post


Link to post
Share on other sites
2 minutes ago, pierremgi said:

So, a vanilla animation?

Who?

what does that mean?

which trigger? A trigger checks its condition twice a second. You can replace it by an "onEachFramed" EH.

Who? what move? animation or path? If path, just try to disableAi "path"

Why???? what for?

 

I tried the disable collision before I knew that it wouldn't work, by them I mean the Units that are breaching. The units get pushed by collisions 

Share this post


Link to post
Share on other sites

Usually, you can apply disableCollisionWith on players and buildings. Just try on AIs as well.

 

Trigger, placed on the building, large enough to trigger before the unit reaches the door/wall:

anyBody, Present, repeatable

cond: this && isNil "passed"        (or what variable name you want, non already existing)

on act: {_x disableCollisionWith (nearestTerrainObjects [thisTrigger,["house","tourism"],20])#0} forEach thislist; passed = true

on deact: 0 = [] spawn {sleep 0.1; passed = nil}

 

 

  • Like 2

Share this post


Link to post
Share on other sites

You can also use BIS_fnc_attachToRelative to keep them in place and facing the direction you want.  Then detach them all when you want the animations to begin.  Maybe if you delay detaching each one, so leader detached first and starts moving, then a second later 2nd guy detaches and starts, etc.   Units definitely push each other sometimes if too close, even when you disableCollisionWith.  And if not pushing each other, they seem to cause friction, where a unit playing a walking animation walks in place because some AI is too close to him.  Good luck.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×