Jump to content
Sign in to follow this  
oksman

Player use Animation

Recommended Posts

Hello Bohemia Community!

I have a quick question regarding the use of animations when doing Singleplayer missions. I need to be able to stop my head from spinning about and still use the animation.

This is my init.sqf that spawns the intro.

disableUserInput true;
sleep 1;
playSound "intro";
sleep 3.5;
player switchMove "Acts_UnconsciousStandUp_part1";
sleep .5;
titleCut ["", "BLACK IN", 8];
sleep 34.343;
disableUserInput false;
player setDir 220;
player switchMove "";
intro=true;

When that is called, it works. UNLESS I touch anything. DisableUserInput is dangerous since if you make a slight movement with your mouse while it's called. that is going to stick and you will be turning with your mouse constantly for the duration of the animation. Either going nuts or slow!

Anyway I'm looking for a way to enjoy the animation without having the option of moving your head or moving anything really.

player enableSimulation false;

Came to mind, however that disables the animation from running.

So I'm sort of stuck, so I thought you people of the Bohemia community could enlighten me, please.

Regards OksmanTV

Share this post


Link to post
Share on other sites

Yes, i have the same issue with exactly the same animation. You can try a combination of enableSimulation and disableUserInput but as you say, it's quite dangerous. I prefer to just disable simulation and then enable it right before the anim starts. It's not perfect.

Share this post


Link to post
Share on other sites

Maybe i'm missunderstanding you but the below seems to work!

waitUntil {time > 0};
waitUntil {!isNull player};
waitUntil {player == player};
disableUserInput true;
sleep 0.1;
player switchMove "Acts_UnconsciousStandUp_part1";
titleCut ["", "BLACK IN", 15];
sleep 35;
disableUserInput false;
player switchMove "";

Share this post


Link to post
Share on other sites

Yes, it works but i just don't like to completely disable the user input. Hence i accept the flaws i get whith this animation. ;)

Share this post


Link to post
Share on other sites
Yes, it works but i just don't like to completely disable the user input. Hence i accept the flaws i get whith this animation. ;)

Okay, i just wondered about:

When that is called, it works. UNLESS I touch anything.

Anyway I'm looking for a way to enjoy the animation without having the option of moving your head or moving anything really.

Share this post


Link to post
Share on other sites

Problem with this one is that you don't just move your head but the whole body somehow slides along with your movements. That doesn't look good...

Share this post


Link to post
Share on other sites
Problem with this one is that you don't just move your head but the whole body somehow slides along with your movements. That doesn't look good...

Yes but oksman ask for a way to enjoy the animation without user interruption which disableUserInput should accomplish yet he still have issues!

Share this post


Link to post
Share on other sites

The problem is that it still detects movement even if you disableUserInput.

If somebody moves their mouse while loading and during start, which ever way the mouse moved is saved, so it keeps going to that side until input is enabled again. It's sort of broken because it can break just by a slight movement with mouse during the start of the mission.

This works, but doesn't stop the accidents that can happen.

Share this post


Link to post
Share on other sites

That's what I do, that's the funny part xD

Share this post


Link to post
Share on other sites

Okay now i see what you mean and can repro it by running script from a trigger, but when running script from init.sqf i can't repro the issue.

Maybe me not being able to repro it from the init.sqf is a timing/performance thing?

Anyways, this should be fixed!

Share this post


Link to post
Share on other sites

Are you trying to spam move the mouse around while loading to mimic any movement with the mouse on start? to check if it can be ruined by a slight mistake from a player starting a mission

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
Sign in to follow this  

×