processInitCommands – Talk

From Bohemia Interactive Community
Revision as of 04:48, 3 August 2007 by Doolittle (talk | contribs)
Jump to navigation Jump to search

According to the comref the version of this command is 1.33.

Unless you have updated information and haven't just guessed that it should be 2.33. We can all make assumptions, but it might be safer to ask BI.

Planck 13:47, 21 August 2006 (CEST)

Yes, 2.33 is correct here. --Suma 12:34, 29 September 2006 (CEST)

It seems like people are using this command incorrectly all over the known universe!! Why are people having the server createVehicles, then setVehicleInit them, then run processInitCommands right after??? Isn't the idea/approach to setVehicleInit and then have the client run processInitCommands when they connect AFTER the fact. Any clients that are CURRENTLY connected will need to run something else for the object that was created. Thoughts? --Doolittle 20:44, 2 August 2007 (CEST)

Well, processInitCommands is not needed for JIP clients as those run init commands automatically when they conne. processInitCommands is only really useful when you want already connected clients to run newly set setVehicleInit commands, the reason this is done is that then you can use the same init function for already connected clients and JIP connecting clients, atleast thats the theory. I never really got that to work as i wanted so I used setVehicleInit only for JIP clients and processInit not at all, but others are perhaps having more success.. --Salisan 20:52, 2 August 2007 (CEST)
Okay, thanks! Guess I had it wrong.. the known universe is safe once again.. What do you mean by "that's the theory"? How did you never get it to work? --Doolittle 21:08, 2 August 2007 (CEST)
My problem was that it seemed processInitCommands sometimes didn't run init commands for some objects and sometimes ran them too many times. It's possible that was my fault though. The theory part is because none of this has been documented really, these pages were all pretty much blank when I started experimenting with it, now me and others have added info but until BI says 'this is correct' it's all educated guesses. Salisan

This is a local command only? So if I setVehicleInit an obj, every client connected would need to run processInitCommands to have the init "run" on their machine? --Doolittle 22:42, 2 August 2007 (CEST)

It seems to be if you DON'T execute processInitCommands after doing a setVehicleInit.. then any future connecting client will not execute the setVehicleInit you created. It would also appear any scripts you have that are run with setVehicleInit are executed instantly for any JIP client.. meaning no waitUntil or sleep (which makes sense because that stuff can't be used in an object's init field in the editor either) --Doolittle 05:48, 3 August 2007 (CEST)