OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Triggerhappy on 03 Dec 2005, 01:22:19
-
i know i should know this by now, but i can't get it to work.
in a script im making, i give a man this command:
_unit switchmove "EffectStandTalk"
i want, after 2 seconds (i know that part ;D) to end the switchmove, and set the unit back to normal control (not stuck in the anim)
I've tried
_unit switchmove ""and
_unit switchmove "null"
but neither one will get him out of the effectstandtalk anim
-
I'm not sure these things work properly from a script.
Did you try using a trigger to test it instead.
Planck
-
no i didn't, but it has to be scripted, so even if i could get it to work in a trigger, it wouldn't help me (didn't think about that though), thx, i'll give it a go just to see if what im doing works at all
-
If the unit is not the player, then you can reset all his parameters (including ending switchmoves and disableAI) by doing this in the script:
_unit setDamage 1; _unit setDamage 0
He will die and revive so fast that the player will not even see it happen, but any switchMoves he is "stuck in" will end and all disableAI conditions will also turn off.
-
lol, he is the player as well ;D :P :-\
-
I have tried to fight this problem - and failed - many times. The "null" or some other switchmove sometimes works - for a time - but then they sometimes go back to finish off what they were doing. My solution has been: if I can't beat it after a bit of experimenting , find some other way round it, like moving the camera
-
Just a thought. You need to do this in a script, which fails. You can (probably) do it with a trigger, but can't use triggers.
So why not combine the best of two worlds?
Just make the script set a global variable and make a trigger check for that variable and do it's thing when it's set. Should work...in theory. ;)
Hope this is a good idea and not my "n00b" brain trying to be smart again. ;)
-
The only way I've found to end a switchmove is override it by having the switcher do another switchmove!
So if hes stuck in effectstandtalk
Have him when you want him to stop do "_dude switchmove "CivilWalkF"
Also whether this is in a script or in a trigger it doesnt matter.
-
alright thx