Home   Help Search Login Register  

Author Topic: Human shield, How?  (Read 1556 times)

0 Members and 1 Guest are viewing this topic.

Offline @cero

  • Members
  • *
  • Yeah! Get some!!
Human shield, How?
« on: 05 Jan 2008, 17:44:43 »
SCREWBY!!!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Human shield, How?
« Reply #1 on: 05 Jan 2008, 18:07:45 »
Example mission attached below.

The "captive" will follow you, keeping in front of you while you are on foot or getting as cargo in your vehicle.
« Last Edit: 08 Jan 2008, 04:12:13 by Mandoble »

Offline @cero

  • Members
  • *
  • Yeah! Get some!!
Re: Human shield, How?
« Reply #2 on: 06 Jan 2008, 01:36:45 »
SCREWBY!!!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Human shield, How?
« Reply #3 on: 06 Jan 2008, 02:48:56 »
Hopefuly I'll have time to fully test it before Tuesday.

Offline @cero

  • Members
  • *
  • Yeah! Get some!!
Re: Human shield, How?
« Reply #4 on: 07 Jan 2008, 01:32:50 »
SCREWBY!!!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Human shield, How?
« Reply #5 on: 08 Jan 2008, 04:13:13 »
See the example mission above, I didnt have much time to experiment with better animations for the captive ...

Offline @cero

  • Members
  • *
  • Yeah! Get some!!
Re: Human shield, How?
« Reply #6 on: 08 Jan 2008, 15:12:27 »
Hi.
I been playing around with this script just now, I only been back from Spain for an hour, lol.
I been messing about with some values trying to improve the distance, but all ends in disaster. For some reason the civilian unit makes the player unit to slide on the ground depending in what angle the players weapon is facing, but this only happans if I change the values in the line below:

Quote
      _civ setPos [(getPos _unit select 0)+2.1*sin(_dir),(getPos _unit select 1)+2.2*cos(_dir), 0];

As it is now, the way you made it, works good, I just wish that BIS made an animation to have the kidnaper with one hand around the civy's neck and the other one to fire the weapon around the side of the civy ::) Maybe I can sugest that for the next generation game. :confused:
I'll have a go at trying with different animations.
I wonder if I can force the player to walk slow when this script is activated, because surely, there must be an animation to walk sideways for the kidnaped AI.
I know, I'm starting to sound confusing, I can't help it. :blink:
Thanks Mandoble.
SCREWBY!!!

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Human shield, How?
« Reply #7 on: 08 Jan 2008, 19:10:55 »
Other than setpos, another option would be to set up a loop that tracks the player's velocity and direction every 1/2 second or so.  You then switchmove/playmove an animation on the hostage that would move him in the proper direction (forward, back, left, right).  Depending on speed of player, you can use the faster or slower animations. 

Animations would look more natural than setpos, but its tricky timing wise. 


El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...