I'll give some examples,
-My mod, story mode vehicles and THUG1 vehicles - if I could broadcast these composite objects on the server everyone could see them.
-Mortens level editor, I know that his level editor is client side, and I'm pretty sure that Morten would love to have this functionality in his mod so others on the server could enjoy the fun of the custom level.
There are probably some more examples, but these are all I can think about right now.
In THUG1, it's possible to use vehicles in online mode, and have those vehicles broadcasted. It uses a function called $BroadcastEnterVehicle$. In THUG2, scavenger hunt uses $ReportObjectPlacement$ and $BroadcastObjectPlacements$ to broadcast the placement of the coins. Firefight might even use a similar function. There is a broadcast in projectiles, too. It's called $BroadcastProjectile$.
But guess what? All of these functions are stored in the EXE. That gives us almost no room to try and figure this out. I think some people might be able to disassemble the exe and find out vaguely how it works, however, I'm still not sure if that would be enough.
Quazz and I have decided that we are going to try and figure out how to broadcast something online. Please, if anyone else is willing to help, we would greatly appreciate it.
back on to the coding... since it's impossible for me to see inside any of the functions listed above, I'll need to guess as to how it works.
Code: Select all
:i call $ReportObjectPlacement$ arguments
$objId$ = %GLOBAL%$objId$$pos$ = %GLOBAL%$new_pos$
Code: Select all
:i $BroadcastObjectPlacements$
:i call $change$ arguments
$SentObjectPlacements$ = %i(1,00000001)
I'm going to assume that first the client must report the object has been placed, and then it must broadcast it to the players in the server. There is only one single entry of $BroadcastObjectPlacements$ inside the entire scripts folder.
Under the function ReportObjectPlacement, I'm going to assume that $objId$ would be the composite objects name. Pos could simply be the skater pos and the other player on the server could stand on you and tell you if he sees the spawned composite object.
I've tried to do that, but still, Quazz didn't see it.
Please guys, I believe that if we can pull this off, the THUG2 modding experience will increase tenfold. Honestly, just IMAGINE what you could do with something like this. Possibilities would be endless. This would be the next chapter in THUG2 modding, in my opinion.
Please, if you have the time, help with this project, it would be amazing if we could do this.
Thanks.