Jump to content

Hoppah

Members
  • Posts

    7,379
  • Joined

  • Last visited

  • Days Won

    283

Posts posted by Hoppah

  1. The only vehicle-vehicle function that Hoppah is planning is the tanker. Anything beyond that might be too complicated to bother with.

     

    That's indeed my view for now, depending on how the logic for the tanker works out that may change ofcourse. Getting the tanker to work is going to be a little more complicated, because the logic has to mess with 2 limited water sources, the tanker's one and the engine's water tank. We'll see how that is going to play out.

    There are a lot of models out there of tankers ( Google Search ) 

    However some one with modeling knowledge would have to convert them for EM4

     

    And technically the LA mod water tender is a tanker! In the US on the west cost a tender is a tanker and on the east coast a tanker is a tanker!

    Reason being on the west cost in large wildland fires the fire fighting air planes are referred to as tankers

    It all depends on where you are in the country

     

    For now, I've sent Freakingmusket a PM and I'm hoping he will give me the water tanker model, otherwise I may model my own.

  2. And Hoppah, since you were asking for a water supply truck for use with some vehicle to vehicle supply functionality in the future, Freakinmusket did make one for his LA County submod.

     

    Can't seem to find it.  :1046276372_bawling:

     

    Is there any 3d-modeller who is willing to do a vehicle like this?

     

    N-Canton-2000-e1291848055719.jpg

     

    or this?

     

    26377.jpg

     

    I doesn't need to be 100% the same, I just want a vehicle like that so I can do the water tanker addition. As long its detailed enough and has an American cab I'm happy.

  3. Haven't run into either, but Bug 1 makes sense, as all the cannon vehicles it creates are named the same; there should be a way to keep them separate I assume. Haven't a clue about number 2, but I can confirm it.

     

    Have a bug of my own.

    Sometimes when removing the supply line, a person will switch prototypes! I've had SCBA and non-SCBA switching switching to the other.

     

    The name has almost nothing to do with finding the right cannon. Upon installing the cannon the unique vehicle-ID gets assigned as UserData to the cannon, so it should find the correct cannon. I'll take a look into the demo mod soon.

     

    The the bug with the switching prototypes is caused because when you install the supply the person gets hidden and its prototype is copied and respawns. When you remove the supply line that hidden person shows again.

  4. makes sense, I'll look into that for a simple fix myself :)

     

    Cool, but still that wouldn't make it compatible with the limited water logic though.  :blush: Every single addition (especially when they're custom made) requires a change in the limited water script. That's why I did add the custom water cannon (or deck gun) to this demo mod, so there is at least 1 way to have the combination of a GTF+TLF that'll work with the limited water logic. It gives mod-creators who want to do an American mod at least a way to add fire engine's to their mods that feel more realistic.

  5. The hose extension idea, something I've wanted to do for some time. Would it be doable if I simply changed the script to allow one connection, I'd need to look at the script but I'm guessing it references 2 child names that it connects to or something similar, would changing the model and removing on of the reference points make it a 1:1 hookup?

     

    The wye script basically spawns a tiny GTF vehicletype model with only 2 hose connections. It's fairly easy to change that to only 1 hose connection (which would be the extension object), however an extended script to have the fire fighter automatically reattach the hose to the extension object would be the thing you want to give it the best result.

  6. YvEN9.png

     

     

    I just removed the push action for attach hose 3 and it sorted it out I prefer that guy to act as a pump monitor for realism :)

    Awesome work

     

    You're welcome. There's 3 reasons why I switched to a custom water cannon command instead of a custom hose connections command: 1. a disabled water cannon on the engine's by default. 2. the controller guy  that spawns on the roof for a more realistic feeling, (although he's only there for aesthectic purposes) 3. easier script implementation (the custom hose connections script in the LA Mod was more complex).

     

    That worked, Hoppah!

    Thanks every thing is running smoothly now!

     

    Glad to hear that too.

     

     

    Apparently, the files provided in the second demo release seem to work smoothly. :)

     

    I probably won't work on this demo mod for a while, although I will take the following ideas and improvements into consideration for a future update:

    1. Enable/disable pumps command. You would need to enable the pumps on each engine (in EM4 jargon: each GTF vehicletype) first, before you can use any hose connection and need to disable the pumps before the engine can move again. The command would require at east one fire fighter to control the pump/engine. The command will probably get 'rapid deployment'-command compatibility too, so one of the fire fighters will enable to pumps and act as a controller.

    2. Hose extension command, basically the gated wye logic, but with only 1 hose connection instead of 2 (lol), so you can have longer hoses.

    3. Water tanker logic. The tanker could act as a hydrant substitute in areas without hydrants. Beside that, I will definately NOT do an engine to engine supply line command, because a hydrant connected to engine 1 which is connected to engine 2 (so engine 2 gets water from engine 1) is 1. total bullshit in EM4, 2. kinda complex to script and 3. just simply isn't necessary and 4. nobody would probably use it. A simple water tanker with only 1 hose connection which can be used to supply a single engine shouldn't be that hard to script and would give modifications another unique feature.

     

    The only thing I do not like in the demo mod are the provided water level icons (for the freeplay variant). If there's anyone who's willing to make new and better looking icons, feel free to release them. I made mine in Photoshop and I think the .psd file can still be found in the "...\Limited Water Supply Test Mod\Ui\Game\Icons\" folder.

     

     

    Also, is the pdf guide clear enough, or is it hardly understandable or are there so many textual errors you'd rather kill yourself?

     

     

    Hophop

  7. Ah, missed that. Hopefully that will be it, or at least let me hit any other errors on the way.

     

    Edit: Nope, no change, still the same errors in the log and nothing working. All missing semi-colons were added, so it's something else that isn't actually bringing up an error.

    attachicon.gif WaterSupplyFreeplay.rar

     

    Found another mistake in the script:

                else if (StrCompare(v.GetPrototypeFileName(), VEH_CRASH) == 0 || v.GetPrototypeFileName(), VEH_CRASH2) == 0 || StrCompare(v.GetPrototypeFileName(), VEH_FOAM) == 0)

    You forgot to add 'StrCompare(' in front of the VEH_CRASH2 part, so that line should look like:

                else if (StrCompare(v.GetPrototypeFileName(), VEH_CRASH) == 0 || StrCompare(v.GetPrototypeFileName(), VEH_CRASH2) == 0 || StrCompare(v.GetPrototypeFileName(), VEH_FOAM) == 0)

    If that still doesn't fix your issue, I suggest you switch back to the original script and see if that one works.

     

     

    Haha, how peculiar? Whats up with your supply monitor? Mine works great  :) although I'm not using the deck gun  :)

     

    Edit, having some issues trying to stop the 4th guy hooking up again after he adds the supply line. Any help would be appreciated, I'm guessing it's something to do with child 3 of the attatch firehose script, but I'm dumbfounded haha

     

    Is the script LAEquipmentCommands.script present in the Manhatter Modie? If so, the following advice applies:

     

    As for the disappearing attachhose/removehose commands. Open up LAEquipmentCommands.script and delete all lines that involve those 2 commands.

     

     

     

     

    I think it's one of those pushactions that would control it. Comment out one of the lines and see what effect it has.

     

    As for another problem of mine, my tender waterswitch doesn't want to work correctly. It activates and deactivates fine, but it won't extinguish or cool. I wonder if setting the cannon vehicle it creates to the LPF type instead of TLF is causing issues. I'd like the tender and my crash engines to have the more powerful deck gun so they have a difference between the regular engines.

     

    I suggest you first get everything to work using the reguler and adviced settings, thus a TLF vehicletype for the watercannon vehicle.

     

     

    Freakinmusket did make one for his LA County submod.

     

    Frkng cool. I'll take a look into that.

     

     

    Hoppah, what kind of max range is safe for the hookup hydrant search? I suppose max reach of the hoses, but I don't know how that would pan out to the number in the script.

     

    I don't know what the maximum reach of the hoses is and the logic searches for the closest hydrant directly, regardless of objects in the way. If you'd use the absolute maximum of a stretched hose and the fire fighter has to move around objects before he can attach the hose, he won't make it to the engine. Know what I mean?

     

     

     

    For everyone having issues with the script: I suggest you do not make any personal changes to the scripts before you get it to work with the default scripts from the demo mod. After that, start making personal changes slowly.

  8. Another thing about the brush truck. Since I've got a crew of two, how can it be worked so that they both get out, one hooks a hose while the other just connects a supply?

     

    Also, is there a way to limit the amount of people who get out with rapiddeployment when you have less crew than hose connections? I've got my tender with three seats (since it isn't an extended cab), and 4 hose connections, but I'd like to keep the 3rd guy inside for the water cannon command.

     

    So far, the water isn't working at all. Vehicles that get spawned on startup at least have the water level icon, but I sent more onto the map and they didn't get assigned that dummy.

     

    Noticed this is my logfile for the startup, too. Something's amiss.

     

     

    Scripts here: attachicon.gifCommand.rar attachicon.giffp_freeplay.rar

     

    Maybe my use of proto compares instead of vehicletype is messing up something?

     

    Edit: Just noticed something. I don't have the correct file for "GameObject mDummy = Game::CreateObject("mod:Prototypes/06 Objects/Misc/empty.e4p", "WaterTankDummy");", though I noticed your test mod doesn't either and it worked.

     

    It says the command 'DummyUpdateWaterLevel' is unknown, so that probably means the commandscript cannot be loaded because of mistakes in it which are caused by your personal changes. However, I've taken a look at the script and noticed that there's at least missing symbols in the script.

     

     

    Make sure to add a ; after the following 4 lines (lines 72-81 AND lines 208-217).

    WaterLevel = MAX_WATER_TENDERWaterLevel = MAX_WATER_LADDERWaterLevel = MAX_WATER_ENGINEWaterLevel = MAX_WATER_ENGINE2

    You forgot to add that symbol in at least two locations in the script.

     

    Other than that, the script seems to look good (I may have missed other things).

     

     

    Hoppah

  9. Yes that's possible and there are at least two ways. I personally prefer a code in the PushActions section of the commandscript.

     

    In the US Army Mod I used the following code to get the medic case from the closest ambulance:

    	Vector CmdPos = Caller->GetPosition();	Vehicle *t = NULL;	float bestCar = 0.;	VehicleList list(VT_AMBULANCE_ITW, VT_THW_FGRT_BH);	for (int i = 0; i < list.GetNumVehicles(); i++) 	{		Vehicle *aCar = list.GetVehicle(i);		if (!aCar->IsCurrentAction("EActionFindPath") && !aCar->IsDestroyed() && aCar->IsValid() && (aCar->GetVehicleType() == VT_AMBULANCE_ITW || aCar->GetVehicleType() == VT_AMBULANCE_NEF || (aCar->GetVehicleType() == VT_AMBULANCE_RHC && aCar->IsOnGround()) || aCar->GetVehicleType() == VT_AMBULANCE_RTW || (aCar->GetVehicleType() == VT_THW_FGRT_BH && aCar->IsOnGround())))		{			float distCurrCar = Math::dist(CmdPos.x, CmdPos.y, aCar->GetPosition().x, aCar->GetPosition().y);			if (distCurrCar < bestCar || bestCar == 0.) 			{				t = aCar;				bestCar = distCurrCar;			}		}	}	if (t)	{		Vector TargetPos = t->GetTargetPoint(Caller, TARGET_EQUIPMENTDOOR);		Caller->PushActionMove(ACTION_NEWLIST, TargetPos);		Caller->PushActionTurnTo(ACTION_APPEND, t);		Caller->PushActionExecuteCommand(ACTION_APPEND, "PcmdGetEMTCase", t, 1, false);	}

    What it does is that it first gets all vehicles that are a certain vehicletype in a list, it checks each found vehicle for certain traits (such as 'not destroyed', 'vehicletype itw or rtw' etc..). Then it checks the absolute distance to the caller and compares that with all other found vehicles with the same traits. The closest vehicle is defined as target 't'.

  10. Make sure the objects that can be picked up have a flag set that's called 'RECOVERABLE'. That seems to be the only restriction for objects that are no vehicles. The rubble probably only has the flag set 'PULLABLE', so you may want to change that for either the object in the editor, or change the script so the heli can also pick up objects with the flag set 'PULLABLE'.

  11. A quick question about the LA Brush Truck. If I set max connectors for those prototypes to 1 in the rapiddeployment script, will it work correctly?

     

     

    Also, limitedwater doesn't seem to be working, at least with the cannon. The vehicle shows the waterlevel icon, so it gets the command added by the scripts, but the water never depletes and no message shows when I click on the command. That last seems to indicate it's not just a deal with it not recognizing the cannon.

     

    As for the brush truck, yes you will have to set the max to 1 in the script, just like it's kinda done in the older rapid deployment script.

     

    Does the limited water at least work for the hose connections?

     

    Can you post your edited scripts here? I'll take a quick look. :)

  12. Yes, I can kind if I want to.  :happy:

     

    To get the cannon to deactivate you will have to add a little 'fake' animation to the vehicle. Open the main .v3o file of the vehicle (fire_engine1.V3O / fire_engine2.V3O) and add the following at the bottom of the file:

    M, activate0, 1M, deactivate0, 1

    That's all. The script uses the animation to check if the watercannon is either activated or not. The animation itself doesn't do anything visually, it's just another check.

     

    Hereweard Fyning's WaterSwitch.script seems to look fine. :)

     

    As for the disappearing attachhose/removehose commands. Open up LAEquipmentCommands.script and delete all lines that involve those 2 commands.

  13. Okay, for setting up LA engines with hoses and cannon based on your two NYFD engines in the test.

     

    Set type to GTF.

    Have four connectors under the "superstructures" list (labeled "connector0-3"?).

    For child-objects list, have a cannon (must be labeled "cannon"?), and then the connection named "water_supply". Also need an object named "controller", is that where the person put on top of the vehicle goes?

     

    And then some semi-complicated script modifications afterwards.

     

    Correct, as for the water cannon, you also need an entirely invisible TLF vehicle with the water cannon superchild. That's the proto that spawns over the engine. Check out the folder Prototypes/Vehicles/06 Objects/ for the demo mod's example. :)

×
×
  • Create New...