Home   Help Search Login Register  

Author Topic: Manhunt not working (perhaps she likes me..?)  (Read 1482 times)

0 Members and 1 Guest are viewing this topic.

Corben Dallas

  • Guest
Manhunt not working (perhaps she likes me..?)
« on: 11 Jun 2005, 11:27:29 »
I've got a unit called Natasha who guards a Major. Using a trigger to try and get her to spot me when I shoot the Major, I call a script from OFPEC.

The trigger is;

  Activated by: West
  OnActivate: Natasha exec "huntme.sqs"
  Conditional: not alive TheMajor

The script is:

_huntUnit = this select 0
#loop
_huntUnit DoMove GetPos player
~10
?(Alive _huntUnit):goto loop
exit

Doesn't work  ???

I tried _this instead of this, but no go. When I shoot TheMajor she just runs in the opposite direction, all hot to trot. Stumped. :-[
« Last Edit: 11 Jun 2005, 11:28:42 by Corben Dallas »

Offline 456820

  • Contributing Member
  • **
Re:Manhunt not working (perhaps she likes me..?)
« Reply #1 on: 11 Jun 2005, 11:36:25 »
your very close and will probaly beet your self up because i think the problem is
[Natasha] exec "huntme.sqs"
your missing the brackets have a go then and if it doesnt work it must be the actual script

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Manhunt not working (perhaps she likes me..?)
« Reply #2 on: 11 Jun 2005, 11:36:33 »
If the unit is called Natasha then try:

[Natasha] exec "huntme.sqs"

EDIT: beaten by 8 secs



Planck
« Last Edit: 11 Jun 2005, 11:37:17 by Planck »
I know a little about a lot, and a lot about a little.

Corben Dallas

  • Guest
Re:Manhunt not working (perhaps she likes me..?)
« Reply #3 on: 11 Jun 2005, 11:44:08 »
Thanks guys, but I've just tried:

  [Natasha] exec "huntme.sqs"

with

  _this select 0

in the script. Still no go. (Maybe it's because I'm a BlackOp and she can't see me...)

Boggle ???

Offline 456820

  • Contributing Member
  • **
Re:Manhunt not working (perhaps she likes me..?)
« Reply #4 on: 11 Jun 2005, 11:46:43 »
Code: [Select]
_huntUnit = this select 0
#loop
_huntUnit DoMove GetPos player
~10
?(Alive _huntUnit):goto loop
exit

try this one instead

Code: [Select]
#loop
natasha DoMove GetPos player
~10
?(Alive natasha):goto loop
exit

and call the script by
[] exec "hunt.sqs" or what ever the script is called

edit - just becasue your a black op desnt mean you cant be seen plus its domove so she will follow you even if she cant see you oh wait hang on i think domove is for groups try the move command if domove doesnt work.
« Last Edit: 11 Jun 2005, 11:48:30 by 456820 »

Corben Dallas

  • Guest
Re:Manhunt not working (perhaps she likes me..?)
« Reply #5 on: 11 Jun 2005, 12:14:56 »
I was joking about the BlackOp..!

Still no go. I shoot the Major, she runs like hell in the other direction all angry and looking for me - in the wrong place!  :-\

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Manhunt not working (perhaps she likes me..?)
« Reply #6 on: 11 Jun 2005, 12:24:18 »
This is a puzzle.

Try
this allowFleeing 0

in Natasha's init field.

Also put some hints in script to tell you what is happening.

Code: [Select]
_huntUnit = _this select 0
#loop
hint format ["Player at = %1\nNatasha at: %2",getPos player, getPos _huntUnit]
_huntUnit DoMove GetPos player
~10
?(Alive _huntUnit):goto loop
exit

NB you do need to use _this not this

Instead of doMove try
move
commandMove

Check to see that she is not being given any other commands - is she part of a group for example?

Corben Dallas

  • Guest
Re:Manhunt not working (perhaps she likes me..?)
« Reply #7 on: 11 Jun 2005, 12:36:42 »
Tried all that, still no go! Argh!

One thing; the Hint comes up only once - shouldn't that update as it's in a loop while she's alive?

Should I be setting the trigger to Repeat, or just fire once? Seems to me firing once, then the script looping should do it.

OFP 1.46, btw.

Edit:

Plus, she and the Major are grouped, along with another bodyguard. Would the two still being alive and grouped stop the script working?

Ah.... Should I name the group and tell the *group* to hunt me instead..? If so, pointers appreciated (still mucho noobie)
« Last Edit: 11 Jun 2005, 12:38:38 by Corben Dallas »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Manhunt not working (perhaps she likes me..?)
« Reply #8 on: 11 Jun 2005, 12:49:42 »
i think the problem lies "here" -

Code: [Select]
_huntUnit = _this select 0
#loop
hint format ["Player at = %1\nNatasha at: %2",getPos player, getPos _huntUnit]
_huntUnit DoMove GetPos player
~10
?(Alive _huntUnit):goto "loop"
exit

goto commands need inverted commas ( "" ) around the loop anchor....

;)
« Last Edit: 11 Jun 2005, 12:50:31 by bedges »

Corben Dallas

  • Guest
Re:Manhunt not working (perhaps she likes me..?)
« Reply #9 on: 11 Jun 2005, 12:52:54 »
Does that mean it won't work if the commas are verted though..? ;)

Thanks, I'll try that.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Manhunt not working (perhaps she likes me..?)
« Reply #10 on: 11 Jun 2005, 12:55:00 »
Well spotted bedges.

Now, why did I miss that?

 ::) ::)


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

Offline 456820

  • Contributing Member
  • **
Re:Manhunt not working (perhaps she likes me..?)
« Reply #11 on: 11 Jun 2005, 12:56:26 »
yep i just then noticed it to it should work now with those " " in it means that it wont loop and will just exit.

Corben Dallas

  • Guest
Re:Manhunt not working (perhaps she likes me..?)
« Reply #12 on: 11 Jun 2005, 13:08:58 »
Seems to partially work. Mostly they run in the wrong direction (I've init'd them to not flee), and sometimes they come after me.

I have the group waypointed to walk somewhere nearby - would that still affect them even though they're in combat mode once I shoot the Major?

Offline 456820

  • Contributing Member
  • **
Re:Manhunt not working (perhaps she likes me..?)
« Reply #13 on: 11 Jun 2005, 13:12:12 »
yeh i think it would affect becuase once theyve moved to where the player was they are now told to move to their waypoint

Corben Dallas

  • Guest
Re:Manhunt not working (perhaps she likes me..?)
« Reply #14 on: 11 Jun 2005, 13:20:00 »
So what can I do about that?

Also, I have another group of folks driving in and meeting them. However, if I've shot the Major and the bodyguards are after me, the new group drive up, get out, and act like there's nothing odd going on. AI, huh?!

So, there are a mix of East and Resistance (Resistance are friendly to East, btw) - some react and some don't, so what do I need to do? Sound an alarm or something? Throw bagels?

Gawd, a simple mission is eating up my life!  :o
« Last Edit: 11 Jun 2005, 13:21:57 by Corben Dallas »