Log in to reply

Creating Task Native from Scratch

  • Hi,

    There are FiveM native tasks, like TASK_CLIMB_LADDER, TASK_STAY_IN_COVER, TASK_USE_MOBILE_PHONE, etc.

    How would I go about creating, and incorporating, a custom task native made from scratch that I can reference for future projects?

  • @CapeCon I think by definition a custom native would be like an oxymoron? If you want to create custom functions I suppose you could create your own library like SHVDN, but better off posting on FiveM forums, no?

  • None of those natives are "custom". They are all in the base game. Just search for TASK_ to find all of the task natives (and ignore all of the CFX natives).

    Actually creating a new task would likely be a monumental task (pun intended). I don't think anybody has done that before.

  • @Jitnaught could that be done as as task sequence rather than a new task and then recompiled as a SH5 or SHVDN function? Well beyond my limits, but feasible? Ofc would only work for personal use unless redistributed

  • @Jitnaught @JohnFromGWN

    Yeah, I imagine it would be quite arduous, but I imagine it must be doable?

    I also was coming from the idea of using a task sequence. From my view of that, I was thinking maybe a task sequence could be made and compiled as a single task?

    I am new to all of this and C#, disclaimer. But, I imagine having to copy and paste a whole bunch of code for a sequence of tasks is not as convenient as being able to use a single task reference.

    Essentially, I am attempting to reconfigure ped AI, and officers. There are things I would like for the AI to consider, and for me to be able to reference cleanly, like having an officer take cover behind a car door specifically for cover. So, having things like TASK_SEEK_COVER_VEHICLE_DOOR1 I feel would make things easier.

  • Well, in this case, I guess I could create a class wherein there are numerous task sequences defined by specific names. i would then just reference those using those specific names? Still curious as to how a new task could be created though. :D

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.