Modme Forums

models move when you get close to them

Game Modding | Call of Duty: Black Ops 3 | General Discussion


ModmeBot:

Thread By: Fil he Modder
so i have an ammo crate model that has a lid that can be moved using the pose manipulator, but i was wondering if it's possible for the lid to automatically open or close depending on how close i am to it, can someone show me how to do that?


ModmeBot:

Reply By: Abnormal202

Fil he Modder
so i have an ammo crate model that has a lid that can be moved using the pose manipulator, but i was wondering if it's possible for the lid to automatically open or close depending on how close i am to it, can someone show me how to do that?

could be possible in script using:
dist = Distance2D( player.origin, ammo_box.origin );

if(dist <= 200)
{
     open_the_box();
}

like this for example.

Could this be done using script movement (rotate, MoveTo)? or would it be an animation?


ModmeBot:

Reply By: Fil he Modder

Abnormal202
Fil he Modder so i have an ammo crate model that has a lid that can be moved using the pose manipulator, but i was wondering if it's possible for the lid to automatically open or close depending on how close i am to it, can someone show me how to do that? could be possible in script using: dist = Distance2D( player.origin, ammo_box.origin ); if(dist <= 200) { open_the_box(); } like this for example. Could this be done using script movement (rotate, MoveTo)? or would it be an animation?

I think more of a moveto script than an anim, wouldn't a trigger_radius work with that?
unless it has to be an anim since it's a crate model with joints