*zeewolf* 4 Posted February 15, 2010 I'm trying to find a way of customising the cloudlets generated by the default destrType (explode, smoke and vertex deformed crumple). Is there a way to do this with CfgCloudlets? Alternatively I know I could set AllVehicles's destrType to destructMan and use a killed eventhandler script to generate a drop effect but (having tried this) the eventhandler never seems to get called on remote machines. I.e. calling of the eventhandler script is locality dependant. Is there an easy way to get the killed eventhandler to run on remote machines? Bearing in mind this will be a mod script rather than a mission script (so they'll be no access to pre-placed objects). Share this post Link to post Share on other sites
sanctuary 19 Posted February 16, 2010 for the cloudlet, i am not sure, there is very few you can do with them, as several parts of the effects in ofp are hardcoded (by example the smoke from a burning vehicle) for the eventhandlers, "killed" will unfortunately not work in MP, BIS made it local instead of global for unknown reason, preventing scripts launched by it to reach remote players. As a workaround, use an init eventhandler (that is global) and in the beginning of the script, make a loop that will check when the object is dead before contuining on the script and applying the effect. Share this post Link to post Share on other sites
*zeewolf* 4 Posted February 16, 2010 Thanks Sanctuary. I was going to try that but I read on the Bis wiki entry for local that "In MP remote objects are not initialised in functions called by initline or init eventhandlers." Which I took to mean that init eventhandlers wouldn't be called on remote machines either. Is this entry wrong or am I interpreting it wrong? Share this post Link to post Share on other sites
sanctuary 19 Posted February 16, 2010 Can't say for sure, all i can say is that in my mod i had a killed eventhandler that create an explosion effect followed by burning and smoke. This worked perfectly in single player and for the player being the server, but none of the effects can be seen by players that are clients. Now if i use an init eventhandler with the script first waiting until the vehicle is not alive, then doing the effects, it works for single player, for the player being the server and for the clients. The only problem is that as i don't want to cripple performance, the looped check has a large delay (as it has to run for every vehicle that can be found in a mission), leading then the explosion effect followed by burning and smoke to sometime not being synchro visually with the vehicle dying, but with few seconds of delay. Unavoidable unfortunately as the killed eventhandler for something like this can't work for clients on a server. Share this post Link to post Share on other sites
*zeewolf* 4 Posted February 16, 2010 Say if I were to run an init eventhandler for every vehicle which just did: _v = _this select 0 @!alive _v [_v] exec "\my_mod_scripts\explode_n_burn.sqs" exit I've always steered clear of @ for MP scripts and used delay based loops as far as possible as the performance can easily be tweaked. But when you're doing effects type stuff it's nice to be able to get them bang on. Do you know how efficient @ is performance wise? Share this post Link to post Share on other sites
sanctuary 19 Posted February 16, 2010 Apparently a @ is less efficient for performance than a loop with a small delay. See there : http://forums.bistudio.com/showthread.php?t=18469 As the new board code broke the old quote systems, here is the link to the same thread on the old board version : http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=7;t=20961 Share this post Link to post Share on other sites