Quantcast

Jump to content

» «
Photo

Is there a way to check when a Task or a TaskSequence completes?

7 replies to this topic
vytaslll
  • vytaslll

    Vito

  • New Members
  • Joined: 10 Jun 2015
  • Lithuania

#1

Posted 10 June 2015 - 08:26 PM

Hi everyone!

 

I want to know if there's any way to find out when a Task or a TaskSequence has completed? I tried GET_SEQUENCE_PROGRESS native with no luck (I'm passing a TaskSequence handle as an argument, but it always returns -1). I've seen there is GET_IS_TASK_ACTIVE native, but I don't know how to use it... Can someone help me? Or maybe suggest a different way to achieve my desired result?

 

Thank you :)


Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

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

#2

Posted 10 June 2015 - 08:31 PM Edited by LetsPlayOrDy, 10 June 2015 - 08:31 PM.

AI::GET_IS_TASK_ACTIVE(Entity/Ped not sure, integer) is how you use the function.

2 seems to be driving. 4 seems to be aiming. I don't know of any others and don't know of any list of what each of these do.


vytaslll
  • vytaslll

    Vito

  • New Members
  • Joined: 10 Jun 2015
  • Lithuania

#3

Posted 10 June 2015 - 08:39 PM

Yeah, I searched through the scripts and have seen that the second parameter is most of the time 2 or 4 (sometimes 1), but that doesn't help much because tasks like exit vehicle are nor driving nor aiming...


elsewhat
  • elsewhat

    Rat

  • Members
  • Joined: 14 Aug 2015
  • Norway

#4

Posted 09 November 2015 - 06:10 PM

Did you find a solution to this problem? having the same requirement myself


gtaVmod
  • gtaVmod

    Snitch

  • Members
  • Joined: 25 Apr 2015
  • Ukraine

#5

Posted 11 November 2015 - 06:45 PM

AI::GET_SEQUENCE_PROGRESS


elsewhat
  • elsewhat

    Rat

  • Members
  • Joined: 14 Aug 2015
  • Norway

#6

Posted 15 November 2015 - 06:27 PM

AI::GET_SEQUENCE_PROGRESS

 

Are you able to get it to return anything else than -1? 


gtaVmod
  • gtaVmod

    Snitch

  • Members
  • Joined: 25 Apr 2015
  • Ukraine

#7

Posted 16 November 2015 - 12:26 AM

Sure, works fine for me (i track car driving task with it).


Ezio Baggins
  • Ezio Baggins

    Player Hater

  • Members
  • Joined: 07 Jun 2017
  • India

#8

Posted 17 September 2017 - 05:17 AM

http://gtaforums.com...is-task-active/





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users