Jump to content
Chris07

Hose connection mechanics

Recommended Posts

I would like some clarification as to how the LA Mod fire engine hose connection mechanism actually works. As far as I know this is how it works:

By default, engines are type TLF (water canon engine). If you attempted to hook a hose to the hose connection children of a TLF type vehicle it would cause a game crash. To remedy this, an invisible GTF type vehicle with visible hose connection children is spawned on top of the engine. Hose connections are made to this invisible GTF vehicle and not the actual TLF engine.

Is this correct?

Link to comment
Share on other sites

I would like some clarification as to how the LA Mod fire engine hose connection mechanism actually works. As far as I know this is how it works:

By default, engines are type TLF (water canon engine). If you attempted to hook a hose to the hose connection children of a TLF type vehicle it would cause a game crash. To remedy this, an invisible GTF type vehicle with visible hose connection children is spawned on top of the engine. Hose connections are made to this invisible GTF vehicle and not the actual TLF engine.

Is this correct?

Yes. The cool thing is that even though one selects the attachfirehose to the engine, the FF's connect to the invisble one instead. This is achieved by the SetUserData() and GetUserData() functions. The mod also disables some commands (moveTo, goHome, any functions involving vehicle movement) as long as the invisible GTF exists. Very innovative solution.

 

Now for the inverse of this. If you're using LA Mod with Limited Water script, then the engines are now GTF types with the default connectors (like original EM4). To make them function with water cannons, an invisible TLF vehicle is created that has a water cannon. The water cannon on the GTF vehicle is just a prop and serves no function.

Link to comment
Share on other sites

How is tank water level data stored for each individual engine in the limited water supply script?

Looks like each vehicle has its own execution stack within the game and each execution stack stores an int value RelativeWaterLevel. The childID int for each push action function is then assigned to be equal to the RelativeWaterLevel so that each time the water script runs again, the water level is passed to the function and processed by the script to either go lower or higher depending on number of hoses or water cannons (or both) and the prescence of a supply line.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...