@ikt Thank you for your timely answer I have seen your previous posts and they have helped me a lot!
specialDude
View profile on GTA5-Mods.com »
Posts made by specialDude
-
RE: ASI Mod: Is scriptRegisterAdditionalThread() in ScriptHookV actually creating a fake thread like fiber in RPH?
-
ASI Mod: Is scriptRegisterAdditionalThread() in ScriptHookV actually creating a fake thread like fiber in RPH?
I hope you are having a great start to the week
So in the main.cpp file when coding the asi mod, we use the scriptRegisterAdditionalThread() function to add one more thread to the mod.
My question is: is it actually creating a fake thread? Because you will have to call WAIT(0) in one thread to let other threads run concurrently. Otherwise, if it is creating a real thread like std::thread library, we may have to use the mutex lock when iterating through the same vector from different threads to avoid the game crashing.
It would be really nice of you to share your experience on this kind of threading issues
-
RE: Make the peds move even they are not within_brain_activation_range
@mcal9909 Thank you for this inspiring breakdown of the simulation! A dedicated thread could probably simulate all these far-distance events. Another thread can then be responsible for choosing whether to let the object have real behaviour based on its distance from the player.
-
RE: Make the peds move even they are not within_brain_activation_range
@mcal9909 This seems to be the best solution for now, I realised maybe the ped / vehicle is not even initialised if you create it far from you. It only gets initialised when you are close to it enough and then could do the movement. Thank you for this great idea!
-
RE: Make the peds move even they are not within_brain_activation_range
@JohnFromGWN Nice try! This test looks amazing
.
However, what confuses me so much is if this pilot and plane were created far from you (like from the other side of the map), they might not even do any tasks. I tried to stand on the westside beach and spawn a taxi from the north part of the city (Downtown Cab Co.), but it never moves until I fly nearby. -
RE: Make the peds move even they are not within_brain_activation_range
@JohnFromGWN Oh thanks for your timely comment:D Sorry for the late reply as I have been working on a mod throughout the whole week...
So what I want to do is reach a mechanism like the Sims 3, so the peds could do their own works regardless of the player's position. -
Make the peds move even they are not within_brain_activation_range
Hello everyone,
Do you know how you can CREATE_PED and let this ped TASK_GO_TO_COORD even if this ped is far from you? For example, the distance between you and the target ped could be from Fort Zancudo to Los Santos International Airport.
The possible reason for the ped not moving at all could be this ped object is out of the brain activation range (using IS_OBJECT_WITHIN_BRAIN_ACTIVATION_RANGE to check) even it already exists in the world. Due to my limited knowledge, the decompiled scripts did not give me enough ideas on how to let this ped move from this long distance.
So is there any way to get this work?
Thanks!
-
RE: Script as tool to position prop for ped
Man this looks amazing! Where can we try your script? I tried to position a burger and a bottle to the ped's right hand in C++ but they all went into a mass