Quantcast

Jump to content

» «
Photo

Ped.SetDefensiveArea?

8 replies to this topic
Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#1

Posted 12 August 2014 - 11:08 AM

So, i have 3 peds in my LocalPlayer group, but i want 2 of those peds to stay outside they bank and shoot on the police. The other one follows me to the bank save. I tried using Ped.SetDefensiveArea on them, but that does not work.. Anyone knows how i can make this?

 

Thanks in advance


Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

  • Members
  • Joined: 24 Aug 2013
  • United-States

#2

Posted 12 August 2014 - 11:57 AM

Ped.Task.GuardCurrentPosition?


Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#3

Posted 12 August 2014 - 01:07 PM

Ped.Task.GuardCurrentPosition?

 

Hmm, that could be possible. Then the ped has to run to a location, and when he arrives i set him to defend current position. Thanks, hope it will work


Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

  • Members
  • Joined: 24 Aug 2013
  • United-States

#4

Posted 12 August 2014 - 01:12 PM

Use TaskSequence and Ped.Task.PerformSequence to do multiple tasks.

Example:

TaskSequence ts = new TaskSequence();
ts.AddTask.RunTo(position);
ts.AddTask.GuardCurrentPosition();
ped.Task.PerformSequence(ts);
  • Wiebrendh likes this

byteMe420
  • byteMe420

    allah akbar!

  • BUSTED!
  • Joined: 02 Jul 2014
  • United-States

#5

Posted 12 August 2014 - 02:21 PM

does task sequence even work? the current shdn dev said it was bugged in the latest public version


Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

  • Members
  • Joined: 24 Aug 2013
  • United-States

#6

Posted 12 August 2014 - 02:22 PM

I've used it before and it seemed to work. Maybe there are some bugs, but I haven't seen them myself.


Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#7

Posted 12 August 2014 - 02:25 PM

I've used it before and it seemed to work. Maybe there are some bugs, but I haven't seen them myself.

 

Haha my pc crashed on it.. Does not work :)


Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

  • Members
  • Joined: 24 Aug 2013
  • United-States

#8

Posted 12 August 2014 - 02:26 PM

Oh.. ok :/

byteMe420
  • byteMe420

    allah akbar!

  • BUSTED!
  • Joined: 02 Jul 2014
  • United-States

#9

Posted 12 August 2014 - 02:40 PM

Probably better to script out the sequence yourself as I don't see much ability to control how the ped performs the sequence or if you might need to abort the sequence and perform new tasks. Better to use a tick and set conditions for the peds actions and avoid using waits so your ped can react in realtime to the environment.

  • Wiebrendh likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users