OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Carroll on 30 May 2007, 22:56:40
-
#Update
_obj= _this select 0
_obj switchmove "AmovPercMstpSnonWnonDnon_seeWatch"
~10
:goto #Update
I have not long been editing AA, but i was wondering if someone could help me to get this little script to function as i intend it to. I simply wish to have a soldier check his watch every 10 seconds. Any help would be appreciated.
Carroll
-
Try playMove instead.
-
Try playMove instead.
Thanks for the advice. What is the difference between the two?
Oops, i think i just fixed my problem using;
_obj= _this select 0
#Update
_obj switchmove "AmovPercMstpSnonWnonDnon_seeWatch"
~10
goto "Update"
Though i have noticed that a soldier can't be killed while performing the "Talking" playmove, until they finish it??? and it goes for quite some time
-
The talking animation will never end, even if shot deat, if started via a playmove. However, the talking animation can be ended via...
_unit switchmove "";
...if the animation was started via switchmove. More on this, plus a tiny sample test mission illustrating the point can be found in this thread:
http://www.ofpec.com/forum/index.php?topic=29113.0
-
Thanks for the advice. What is the difference between the two?
playMove (http://community.bistudio.com/wiki/playMove)
switchMove (http://community.bistudio.com/wiki/switchMove)
With regard to the problem of death, Johnny pretty much nailed it.
If you need more help, then perhaps this script that I wrote could be of assitance to you (note that it is in SQF format):
// Conversation by Dux
// Makes it appear as if two people are having conversation for about 1.5 minutes
// If someone dies, they both stop talking
// Parameters:
// Participant one
// Participant two
// Cancel condition (use "false" if you have wish to have no cancel condition apart from death)
_talkerA = _this select 0;
_talkerB = _this select 1;
_talkerA switchMove "AidlPercMstpSnonWnonDnon04";
_talkerA setBehaviour "SAFE";
_talkerB switchMove "AidlPercMstpSnonWnonDnon04";
_talkerB setBehaviour "SAFE";
sleep 1;
_talkerA switchMove "AmovPercMstpSnonWnonDnon_talking";
sleep 3;
_talkerB switchMove "AmovPercMstpSnonWnonDnon_talking";
for [{_i = 0},{_i < 350},{_i = _i + 1}] do
{
_cancel = _this select 2;
sleep .25;
if (_cancel || !(alive _talkerA) || !(alive _talkerB)) exitWith
{
_talkerA switchMove "AidlPercMstpSnonWnonDnon04";
_talkerB switchMove "AidlPercMstpSnonWnonDnon04";
}
};
if (true) exitWith {}
-
Thanks DucusSumus & johnnyboy, i will look into both replies :good: