Home   Help Search Login Register  

Author Topic: Loony loons  (Read 926 times)

0 Members and 1 Guest are viewing this topic.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Loony loons
« on: 29 Jan 2005, 10:38:16 »
I have a scene in which person A walks towards person B.  Person B stands up faces person A and then talks.  I use the instruction:
B doWatch A

About 70% of the time this works fine.  The other times person B stands up and faces in any direction, not even the one they were in originally, and then sometime during the conversation they might turn and face person A.

I have no experience of the disable AI commands.  Is this where I should be looking?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Loony loons
« Reply #1 on: 29 Jan 2005, 11:39:01 »
they do indeed seem loony. i have experience of this also, to the extent of using setdir to position characters at *precisely* the right angle to face the player, and yet about 20% of the time after a dowatch command they still turn away from the player. i'm afraid this seems peculiar to opf.

you could use the disableai "move" command, which keeps loons rooted to the spot, or disableai "autotarget", which stops them choosing a new target if one happens to walk through your cutscene, but otherwise i think that's as far as the control goes, unless you want to set up a looping script which setdirs your characters at a certain angle throughout the cutscene...

hope this helps :)
bedges

Dane

  • Guest
Re:Loony loons
« Reply #2 on: 29 Jan 2005, 11:59:23 »
Try Toadlife's face direction script in ed-depot, works like a charm.
http://www.ofpec.com/editors/browse.php?browsewhat=2&category=2_6
« Last Edit: 29 Jan 2005, 11:59:54 by Dane »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Loony loons
« Reply #3 on: 29 Jan 2005, 12:04:50 »
doWatch is useless in a situation like this.   The problem is that the command is satisfied if the target enters the loon's field of view.      Since the field of view is 160o or something he can in fact be looking way off to the side.

Also, the beauty of this game is the sophistication and randomness of the game engine:   even 2 seconds after a save it will be different.     This is what makes cutscenes such impossibly hard work.

Although I've never used them in a cutscene, disableAI commands would be great.    You can easily enable AI again by deleting the old unit and setPossing in a new one.    There are some tips on disableAI in the Online comref.
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Loony loons
« Reply #4 on: 29 Jan 2005, 14:52:25 »
Thanks guys.  I will play with these ideas.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Loony loons
« Reply #5 on: 29 Jan 2005, 22:37:03 »
I can't use setDir because the person starts off looking at something, then turns to face the person arriving and talks to them , all on camera.  

I have used
this disableAI "AUTOTARGET"
and a doWatch.  

It seems to work but what I have noticed is that to be effective the object of the doWatch should not be close
« Last Edit: 30 Jan 2005, 11:33:04 by THobson »

Dubieman

  • Guest
Re:Loony loons
« Reply #6 on: 30 Jan 2005, 04:09:18 »
If the people don't have weapons maybe try dotarget?

loonA dowatch loonB; loonA dotarget loonB

That might work, and if they have weapons maybe make them have their guns on their backs. :P

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Loony loons
« Reply #7 on: 30 Jan 2005, 11:38:02 »
Thanks,  good idea I will try that. It shouldn't hurt.

So I now tell it who to watch, to target the same person and not to find its own target.

Hard to see anything else I can do.  Let's see.

Edit:  Well what do you know.  She still stand up and looks in a random direction!!
« Last Edit: 30 Jan 2005, 11:48:19 by THobson »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Loony loons
« Reply #8 on: 30 Jan 2005, 13:21:29 »
my only other suggestion would be to 'cheat' and use playmoves/switchmoves to turn the character using "civilturnl" & civilturnr". i haven't tested this, and as far as i know they'll turn a full 90degrees. certainly in AK_moves_v1 the characters seem to moonwalk for civilturns. still worth a go perhaps...

good luck :)
b

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Loony loons
« Reply #9 on: 30 Jan 2005, 14:30:41 »
Thanks

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Loony loons
« Reply #10 on: 30 Jan 2005, 22:12:40 »
Based on what I said about doWatch being more effective at greater distances I tried this and it seems to work (so far):

Code: [Select]
Anna doWatch [(getPos Anna select 0)+300*((getPos Mariana select 0)-(getPos Anna select 0)),(getPos Anna select 1)+300*((getPos Mariana select 1)-(getPos Anna select 1))]
In other words Anna is looking at something a longway behind Mariana
« Last Edit: 30 Jan 2005, 22:13:02 by THobson »

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Loony loons
« Reply #11 on: 31 Jan 2005, 12:52:15 »
I was just going to say, I've recently discovered dowatch being pretty much 100% reliable when used with a position array rather than an object ;)

Now I tend to use:

unit dowatch [ target select 0, target select 1, 1.5]

rather than:

unit dowatch target


May seem like beating around the bush, but it works brilliantly :)

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Loony loons
« Reply #12 on: 31 Jan 2005, 13:13:22 »
permit me a tiny correction, o wise one ;)

Code: [Select]
unit dowatch [getpos target select 0, getpos target select 1, 1.5]
regardless, thanks for that tip - works like a charm :)
« Last Edit: 31 Jan 2005, 13:14:34 by bedges »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Loony loons
« Reply #13 on: 31 Jan 2005, 13:56:54 »
So it might be because I am using an array and not because I am setting a target some way away.  Anyway it seems to work now.

Thanks.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Loony loons
« Reply #14 on: 02 Feb 2005, 10:25:27 »
Opps... yeah, I guess a getpos in there somewhere would be good ;D

I've found that it seems to be much more accurate than telling them to watch the object itself.

In a cutscene I was scripting I could tell the difference between telling them to watch a height of 1.2m and a height of 1.4m... seems so much more accurate ;)