GhostXoP Posted June 7, 2012 Share Posted June 7, 2012 I've done some reading, possibly not enough, on how i can get my (what ever piece of script it may be) to be triggered every frame. My current project involves getting a pedestrian to move on his/her own, using my AI script. I know what id like to do as the API given (to my surprise) lets me to and monitor ALOT of whats going on, which is great. My only problem, I have not found a way, to have my script (generates ped, watches ped and moves ped depending upon its AI script) called every frame tick, another question however would be, should it be every frame tick? A link to what you think answers my question, or suggestions are welcome. Thank you for reading. If you still do not understand my question id be more then happy to rephrase. Link to comment
Castillo Posted June 7, 2012 Share Posted June 7, 2012 You mean a event which is triggered every frame? If so, then this is what you're looking for: https://wiki.multitheftauto.com/wiki/OnClientRender This event is triggered every time GTA renders a new frame. It is required for the DirectX drawing functions, and also useful for other clientside operations that have to be applied repeatedly with very short time differences between them. Link to comment
GhostXoP Posted June 7, 2012 Author Share Posted June 7, 2012 Thank you for responding, That looks very useful for what i need. However, it being client side, will it still run as a server script? Id like for players to get on and see the NPC's and watch them move around, but not have their computers generate the Peds, rather my server do that instead. Link to comment
Castillo Posted June 7, 2012 Share Posted June 7, 2012 That event is client side only. Link to comment
GhostXoP Posted June 7, 2012 Author Share Posted June 7, 2012 That is fine, ill adapt to the use of it. Thank you very much. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now