I am trying to make a H2 Fiesta mode script for Halo Ce but I am running into a lot of synchronization issues. I'm trying to adapt the player_add_equipment command for use in this script with unit_get_health and some global variables as my loop controls.
In starting equipment I gave everyone a pistol, then using my script I will give them a random secondary weapon. For now its not random for debugging purposes but here are some of the crazy things that happen after the script has been running for awhile:
Quote:
* Player switches from their secondary to their pistol and on everyone else's screen the secondary appears to have been left in midair where they switched. If they switch back it dissappears. Both weapons behave normally otherwise, make sound, and do damage.
* Player switches from the pistol to their secondary but everyone else sees the owner holding their pistol out. If the owner shoots the weapon no one takes damage, no one sees the damage effect, and no one hears a weapon being fired. If they switch back to the pistol they can do damage again but not with the secondary out.
* Player switches from the pistol to their secondary and again no one can see the secondary. This time though the owners hands are out and appear to be holding it. It can not be heard and the projectiles can not be seen but it does damage anyway.
I partially understand how a vehicle syncing script works (there is a sample in EHSv2) and thought some of the same principles might apply. However, I can't name weapons for use with the player_add_equipment command and when I tried to include the is_server concept the script only affected the host player but with all the aforementioned issues still present.
I guess if I can't get player_add_equipment to sync I guess this idea is sunk. Any suggestions would be appreciated. If you want to use this script idea go ahead, all I ask is credit for the original idea and that if you get it to work you share it with the rest of us.
* I can post the code if people are interested, though its still buggy and far from being complete.