Home   Help Search Login Register  

Author Topic: Cancelling playmove/switchmove  (Read 2491 times)

0 Members and 1 Guest are viewing this topic.

Offline Arctic

  • Members
  • *
  • In Utero
Re:Cancelling playmove/switchmove
« Reply #15 on: 10 Feb 2003, 02:59:31 »
Hey it worked! ... for a moment... then they sat back down. Grrr.....

I tried it again and nothing happend

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Cancelling playmove/switchmove
« Reply #16 on: 10 Feb 2003, 03:06:30 »
den goes oder prob wid OFP nd switchmove  ;D

- wen u give em lots of switchmove (i know its wid da sitin anim but can prooly b wid oders also)dey want 2 complete all deir anims (or at least da last 2-3 of em) - ull have 2 make da script smarter ordering em 2 switchmove only wen needed (every 8.2 secs i think)

if u wont figure dat out till zomoz ill give u som snipit ;D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Arctic

  • Members
  • *
  • In Utero
Re:Cancelling playmove/switchmove
« Reply #17 on: 10 Feb 2003, 03:14:46 »
Ahh, no free answer? ;)

I think i got it... do a loop until the condition is met?

So i think i'll need to use the if then else command... right?
I've never used this command b4...  :-\ so i'll giver 'er a go...

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Cancelling playmove/switchmove
« Reply #18 on: 10 Feb 2003, 03:17:25 »
u would have got free answer if it was eariler now  ;D

but its 4:12 AM nd i cant think right  :o

just dis grreent things r trin 2 eat me  ::)

so after i sleep (nd prooly get sober again) ill make som nice things 4 u :D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Arctic

  • Members
  • *
  • In Utero
Re:Cancelling playmove/switchmove
« Reply #19 on: 10 Feb 2003, 03:22:12 »
I'm given this a shot...

Code: [Select]
_unit = _this select 0
_marker = _this select 1
_standnow = false

#Sit
?(_standnow = true): goto "posPlayer"
[_unit] exec "distance.sqs"

if (_unit knowsabout player > 1) then ([_unit playmove "null") && (_standnow = true)] else (_unit playmove "EffectStandSitDown")
~8.2

goto "Sit"

#posPlayer
_marker setpos [getpos player select 0,getpos player select 1,1]
#alert
?(!alive player): exit
?(!alive _unit): exit

_unit setcombatmode "RED"
_unit setbehaviour "Combat"

~0.05
_unit commandmove getpos _marker

~4
?((_unit distance _marker) <= 1.5): goto "Patrol"
goto "alert"

Offline Arctic

  • Members
  • *
  • In Utero
Re:Cancelling playmove/switchmove
« Reply #20 on: 10 Feb 2003, 03:23:27 »
oops... ok. lol

i'll give this if then else stuff a shot... but i can wait.

EDIT:
LoL, it came out funky. And made the standnow cariable with '==' signs. So, i'll wait till tomorrow.
« Last Edit: 10 Feb 2003, 03:29:18 by Arctic »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Cancelling playmove/switchmove
« Reply #21 on: 10 Feb 2003, 03:31:16 »
i dont think wat u did is good ;D

u know wat ? i think ull have 2 use somthin like dat ;D

Code: [Select]
_unit = _this select 0
_marker = _this select 1
_standnow = false
_count = 0

#Sit
?(_standnow = true): goto "posPlayer"
[_unit] exec "distance.sqs"

if (_unit knowsabout player > 1) then
{
_unit playmove "null"
_standnow = true
}
else
{
if (_count == 82) then
{
_unit playmove "EffectStandSitDown"
_count = 0
}
}

_count = _count+1
~0.1

goto "Sit"

#posPlayer
_marker setpos [getpos player select 0,getpos player select 1,1]
#alert
?(!alive player): exit
?(!alive _unit): exit

_unit setcombatmode "RED"
_unit setbehaviour "Combat"

~0.05
_unit commandmove getpos _marker

~4
?((_unit distance _marker) <= 1.5): goto "Patrol"
goto "alert"

will prooly work ;D

now i realy gotta sleep

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
Re:Cancelling playmove/switchmove
« Reply #22 on: 10 Feb 2003, 14:35:17 »
Hi,

This is the script I use in a mission I've made a while ago called 'Hill 107'.
I call the script to make 3 civilians sit and when I want them to do something else I just set the variable 'vCivSit' to false (vCivSit = true before calling the script)

; civsit.sqs
; Keeping the civilians quiet
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

#Loop
   civil1 playMove "EffectStandSitDownVer1"
   civil2 playMove "EffectStandSitDownVer1"
   civil3 playMove "EffectStandSitDownVer1"
   ~2
? vCivSit : goto "Loop"
exit

It works fine for me
Hope it helps
AliMag

Offline Arctic

  • Members
  • *
  • In Utero
Re:Cancelling playmove/switchmove
« Reply #23 on: 10 Feb 2003, 22:40:44 »
@LCD

Looks good, but I get an error message that says:

'|#|}' Error invalid Number

Or something along those lines... Not sure about the bracket...

Offline Arctic

  • Members
  • *
  • In Utero
Re:Cancelling playmove/switchmove
« Reply #24 on: 11 Feb 2003, 00:18:05 »
Doesnt work, although the soldiers look at me and spontaneously 'bunp' themselves away from the fire...

That error is: '|#|}' Error invalid Number in expression

I dunno what caused it... I might try making that if then else thing on one line...

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Cancelling playmove/switchmove
« Reply #25 on: 11 Feb 2003, 00:41:21 »
u can try makin it 1 line ;D and it prooly work :D - just remember 2 put ; between da cmmands ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Arctic

  • Members
  • *
  • In Utero
Re:Cancelling playmove/switchmove
« Reply #26 on: 11 Feb 2003, 01:04:42 »
The people stood! LoL, I just have to solve this error:  '(_standnow #= true)' error unknown operator

___

I changed the statement to
Code: [Select]
?standnow and the error goes away, but when i go to the right side of the house, the guys are already  standing up and sit down when they see me. If I go to the left side, everything goes as planned.