Closed zmonoid closed 7 years ago
Hi @zmonoid ,
as far as Supervised Learning mode is concerned, by default data recording starts after 30 seconds.
This is currently hardcoded in line 14 of SLEEnvironment.cpp
lastRecordingTime = std::clock() + ((float) (30.0 * CLOCKS_PER_SEC));
You can tune that parameter to start the recording after a shorter or longer time from the moment in which the hook starts. Otherwise you could add a key listener and associate a certain key to the action of start / stop recording.
@ndrplz ,
Thanks for your reply!
One more question, I notice how to attach the camera onto vehicle:
CAM::ATTACH_CAM_TO_ENTITY(camera, vehicle, 0, 0.5, 0.8, TRUE);
Is there anyway I can use the driver's view?
By trial and error it takes a lot of time to attach to the correct position since every time I have to restart the game...
@zmonoid
Doesn't the game start already in first person view of the driver?
However, if you place an empty file called "ScriptHookV.dev" in your game's main directory, you should be able to attach and detatch the hook at runtime by pressing CTRL+R. So after compilation you don't need to restart the game anymore. From ScriptHook SDK documentation:
Runtime asi script reloading: In order to use this feature you must create empty file called "ScriptHookV.dev" in you game's main dir. While being ingame press CTRL + R, beep sound will tell you that all loaded scripts are fully unloaded and you can replace your .asi, press CTRL + R again to load the scripts, triple beep will indicate that everything is loaded. You must have the call to scriptUnregister() SDK func in your plugin's DllMain in order reloading feature to work correctly, see NativeTrainer\main.cpp for more details. Script reloading can be applied only to the .asi plugins which were loaded normally, i.e. using asi loader when the game was started. Script reloading is performed by script hook and not by asi loader.
This saves LOTS of time!
@ndrplz
Really thank you for your answering.
The camera is currently not driver's view. For driver's view it should be able to see the mirror, car's head, steer wheel etc. However current camera position has no such visual information. Better we can have some shortkey to switch to different views like original game.
Anyway, really thank you on this!
@ndrplz Thanks for your response, I've been sick these days. Much appreciate! :)
@zmonoid Why would you like to use driver's view? You add some useful information but you also add a lot of garbage to it. However it is easily implementable, just remove the code that adds the current camera and set the game to use the First Person View.
Any short key for start and end recording?