Jump to content
Sign in to follow this  
gmneal

Sleeping script

Recommended Posts

I am making a mission in which the player has to sneak by four sleeping guards and a few sentry patrols in order to bag and grab an enemy officer.

I am using a anim pack, and the sleep anim is static, I can get the gaurds to sleep but cant get them to rise again once the sentries have discovered the player. I also cant get the officer to wake or rise once the player has captured him or when the player is discovered. Any ideas? Any help will be greatly appreciated. smile_o.gif

Share this post


Link to post
Share on other sites

Hi,

To stop an animation use unitname switchmove ""

The transition between sleeping and waking up would be very abrupt, ...maybe "sitdowntostand" could look better.

Share this post


Link to post
Share on other sites
"Hi,

To stop an animation use unitname switchmove ""

The transition between sleeping and waking up would be very abrupt, ...maybe "sitdowntostand" could look better. "

That's the thing, I tried that; however the unit will not react to switchmove command, and just stays in the original position.

Share this post


Link to post
Share on other sites

Hi here are some sleeping scripts:

For the Ai:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_typ = _this select 0

_pos = _this select 1

#loop

_typ setpos _pos

_typ switchmove "treatedlying"

?(aufstehen):exit

~0.01

goto "loop"

Activation : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[NAMESoldier,[2644.60,4568.33,0.7]] exec "sleep.sqs";

And one script for the Player:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_typ = _this select 0

_posx = 10025.2 (Here u must enter the coordinates)

_posy = 4051.13 (Here u must enter the coordinates)

_typ switchmove "TreatedLying"

#Start

?(ende1) : goto "ende"

_typ setpos [_posx , _posy , 0.8]

~0.001

goto "Start"

#ende

player switchmove ""

Exit

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Activation: [player] exec "sleepers.sqs"

Share this post


Link to post
Share on other sites

23-Down, I used the script that you posted and it worked well, however I cant get the sleeping soldiers to wake up.

Any ideas?

Share this post


Link to post
Share on other sites

23-Down, I used the script that you posted and it worked well, however I cant get the sleeping soldiers to wake up.

Any ideas?

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  

×