Home   Help Search Login Register  

Author Topic: Ending a switchmove  (Read 805 times)

0 Members and 1 Guest are viewing this topic.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Ending a switchmove
« 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:
Code: [Select]
_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
Code: [Select]
_unit switchmove ""and
Code: [Select]
_unit switchmove "null"
but neither one will get him out of the effectstandtalk anim

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Ending a switchmove
« Reply #1 on: 03 Dec 2005, 01:34:28 »
I'm not sure these things work properly from a script.

Did you try using a trigger to test it instead.


Planck
I know a little about a lot, and a lot about a little.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Ending a switchmove
« Reply #2 on: 03 Dec 2005, 02:45:18 »
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

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Ending a switchmove
« Reply #3 on: 03 Dec 2005, 04:01:17 »
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.
« Last Edit: 03 Dec 2005, 04:01:50 by Raptorsaurus »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Ending a switchmove
« Reply #4 on: 03 Dec 2005, 06:03:02 »
lol, he is the player as well  ;D :P :-\

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Ending a switchmove
« Reply #5 on: 03 Dec 2005, 12:31:23 »
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
« Last Edit: 03 Dec 2005, 12:32:48 by THobson »

LoomChild

  • Guest
Re:Ending a switchmove
« Reply #6 on: 03 Dec 2005, 14:56:14 »
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. ;)

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Ending a switchmove
« Reply #7 on: 03 Dec 2005, 17:52:43 »
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.
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Ending a switchmove
« Reply #8 on: 03 Dec 2005, 20:07:20 »
alright thx