Jump to content

NathanDollinger

Members
  • Posts

    172
  • Joined

  • Last visited

Posts posted by NathanDollinger

  1. I'm in troubleshoot mode also.

     

    My vehicle is set up just like the NY engines,, and I have an invisible vehicle set up for the switch command to use.

    The water level looks to be activating on it correctly, as the 100% icon shows up, however pressing it does not bring up the message about water level, so something has to be wrong.

    The waterswitch command activates, person ends up on top of vehicle, vehicle gains the cool and extinguish commands, but will not spray water. nor will it deactivate.

    The rapiddeployment command activates, four people exit vehicle and grab hoses, one connects hose to hydrant and then to vehicle, but hoses cannot be attached to the vehicle, and there seems to be glitches with the people equipped with hoses (they don't have drop or attach/remove commands).

     

    Here are my scripts.

    attachicon.gifCommand.rar

     

    Well i have solved 75% of that so i will try to help!

    Did you give the truck the water supply command in the editor ? If so thats wrong it should appear automatically!

    You have water_supply_main as a object on your map?

    You have supper structure prototypes for hose connections named connector0-3?

    You have child-object names water_supply?

    You have all engines set to GTF?

    ( The above is what would cause issues with the water level script showing up and giving the correct display along with any bug with the rapid deployment script such as not hooking to the truck, )

     

    If your doing this with the LA mod 

    You have water_supply_main as a object on your map?

    You have supper structure prototypes for hose connections named connector0-3?

    You have added attachfirehose command to personal in the editor?

    You have deleted the LAEquipmentCommand.script ( For some reason this cause a issue )

    You have also removed all Get(W/E).script other then the GetExtinguisher.script ( Also cause issue )

    ( Should fix bugs with FF's with hoses and hooking to truck! )

     

     

    As for the Waterswitch script im stuck in the same spot as you! Hopefully hoppah will be kind and lend us some helpful advise! 

  2. Will give this a shot!

     

     

    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.

     Okay so i tryed this out and got it working to the point of the fire fighter setting on the truck, the icons for cool and extinguish show up, and i believe the invisible vehicle shows up 

    however i get no water flow nor will the script deactivate 

     

    Thoughts?

  3. So i have every thing working but!....

     

    I can't get the supply line to un hook form the truck.... It all goes together fine but when the fires out and where cleaning up 

     

    that craps stuck! 

     

    any ideas?

     

     ( P.S. It shows the get in car icon instead of the unhook hose icon )

     

     

     

    Edit.....! I got it to work! 

    Thanks though!

  4. Just some interesting playing around i did until hoppah gives us instruction to add this to other mods ( I tryed didn't go so well so now im waiting! ) 

     

    Based off the US general pump rated of 1000 Gallons / Minute I found that with the following settings 

    int MAX_WATER_TLF	 		= 1300;int MAX_WATER_LPF	 		= 400;int MAX_WATER_GTF	 		= 1000;int MAX_WATER_DLK	 		= 500;int OUTTAKE_HOSE 			= 30;	//outtake per secondint OUTTAKE_TLF_CANNON 		= 50;int OUTTAKE_LPF_CANNON 		= 50;int OUTTAKE_DLK_CANNON 		= 50;int INTAKE_SUPPLYLINE 		= 80;

    You can run 3 hose lines at a time with out depleting your water source( 4 or more will work until the tank is empty ), Or you can run one hose line and the deck cannon. ( 2 ore more hose lines and the deck cannon works until the tank is empty)

     

    With this it ads more to the script to limit just how much water you can flow, Hydrants have limits to you know! 

  5. @ NathanDollinger,

     

    Nice try, but that's not gonna work I'm afraid. If you'd execute your command the second time, it will reset the water level back to ETL (1000). The script has to be set up to check the water levels like once per second so it can update and save the water level for each vehicle and thats not very easy to realise. One of the few ways to do that is using a hidden dummy object which keeps track of the vehicles.

     

    However, I've got some good news. Got a little bit bored today and did it myself. That means:

     

    You can have limited water supply in freeplay too now

     

    So shit just got real.

     

    Pictures first:

     

    Original TLF on the default EM4 freeplay map:

     
     
    Fire Engine with supply line on the EM4 deluxe map:
     

     

    As you can see the vehicles have an extra command (instead of the information panel) which shows the relative water tank level in 100, 80, 60, 40, 20 or 0% by changing the icons. In game, you can click the command and it will inform you of the actual water levels in gallon and the exact relative amount (as shown in the screenshots too). To make the logic as useful as possible for everyone, I decided to use the vehicleclasses (TLF, LPF and GTF) as references for the maximum water tank amounts. That means it should work with ALL vehicles that are either a TLF, LPF or GTF type and that's it. Other than that, the limited water supply works the exact same as in the demo mission, although the logic is implemented differently. I still need to give the freeplay logic a few extra tests and will release the entire functionality tonight or tomorrow.

     

    Hoppah

     

     

    .... Grr lol 

     

    Good job Hoppah! 

    Hope to see it soon!

  6. Surely you could rename the mission script to 'fp_freeplay' and it would hopefully work in freeplay right?

    No it is two completely different ways of writing the script, 

     

    Also I worked out my previous issue and believe i will have a working free play version some time later this after noon! 

     

    Will post updates later but for now its time for sleep!

  7. Sure,

     

    The following part gets all the GTF type vehicle in a vehiclelist, then checks per found vehicle if there are any active hoses, deck guns or suppy lines. Then changes the water level, and -when required- disables (or re-enables) the hose connections or deck gun(s) when the tank is empty.

    The part below this code in the missionscript is only dedicated to the visual aspect, the information panel.

     

     

    Okay so here is what i got, when  loading i get limitation statement to long as an error ( Around line 60 )

     

    This is playing for about an hour with the code any thoughts?

    int ETL[]				=  1000;const char OBJ_E04[]			= "mod:Prototypes/Vehicles/02 Fire Department/engine01.e4p";int OUTTAKE_HOSE 			= 6;int OUTTAKE_CANNON 			= 10;int INTAKE_SUPPLYLINE 		= 24;int WaterLevel;int Engine01Level;object VcmdWaterLVL : CommandScript{	VcmdWaterLVL()	{		SetCursor("");		SetIcon("");		SetGroupID(DummyGroup); 		SetGroupLeader(true);		SetRestrictions(RESTRICT_SELFEXECUTE);	}	Vehicle veh(StrCompare(v.GetPrototypeFileName(), OBJ_E04);			{							if (veh)->HasCommand("DummyLimitedWater"))						{							int numActiveHoses = 0;							int numActiveCannons = 0;							int numSupplyLines = 0;							int Outtake = 0;							int Intake = 0;							if (veh.HasCommand("DummyWaterSupplyOn"))								numSupplyLines++;							if (veh.GetVehicleType() == VT_FIREFIGHTERS_GTF && veh.IsInstalled())						}		{			PersonList Pconnected(ROLE_SQUAD);			for(int k = 0; k < Pconnected.GetNumPersons(); k++)			{				if (Pconnected.GetPerson(k)->GetEquipment() == EQUIP_FIREHOSE && Pconnected.GetPerson(k)->GetType() == ACTOR_PERSON && Pconnected.GetPerson(k)->GetFirehoseID() != 0 && !Pconnected.GetPerson(k)->IsFlagSet(OF_HIDDEN))				{					Vector TargetPos;					GameObject Phydrant = Pconnected.GetPerson(k)->GetHydrant();					if (Phydrant.GetID() == veh.GetID())					{						Person p(Pconnected.GetPerson(k));						if (p.IsCurrentAction("EActionExtinguish") || p.IsCurrentAction("EActionCool"))							numActiveHoses++;					}				}			}		}		if (veh.HasCommand("VcmdWaterSwitch") && veh.IsCurrentAnimation("activate"))		{			GameObjectList cannonlist = Game::GetGameObjectsWithPrefix("engine_water_cannon");			for(int j = 0; j < cannonlist.GetNumObjects(); j++)			{				Vehicle cannon = cannonlist.GetObject(j);				if (cannon.GetUserData() == veh.GetID() && (cannon.IsCurrentAction("EActionExtinguish") || cannon.IsCurrentAction("EActionCool")))					numActiveCannons++;			}		}		Intake = numSupplyLines*INTAKE_SUPPLYLINE;		Outtake = numActiveHoses*OUTTAKE_HOSE+numActiveCannons*OUTTAKE_CANNON;		if (veh.GetID() == v.GetID())		{			Engine01Level = Engine01Level+Intake-Outtake;			if (Engine01Level < 20)				veh.AssignCommand("DummyEmptyTank");			if (Engine01Level > ELT)				Engine01Level = ELT;			else if (Engine01Level < 0)				Engine01Level = 0;		}		if (veh.HasCommand("DummyEmptyTank"))		{			PersonList Pconnected(ROLE_SQUAD);			for(int k = 0; k < Pconnected.GetNumPersons(); k++)			{				if (Pconnected.GetPerson(k)->GetEquipment() == EQUIP_FIREHOSE && Pconnected.GetPerson(k)->GetType() == ACTOR_PERSON && Pconnected.GetPerson(k)->GetFirehoseID() != 0 && !Pconnected.GetPerson(k)->IsFlagSet(OF_HIDDEN))				{					Vector TargetPos;					GameObject Phydrant = Pconnected.GetPerson(k)->GetHydrant();					if (Phydrant.GetID() == veh.GetID())					{						Person p(Pconnected.GetPerson(k));						if ((veh.GetID() && Engine01Level < 20))						{								if (p.IsCommandEnabled("Extinguish"))							{								p.EnableCommand("Extinguish", false);								p.EnableCommand("Cool", false);								p.EnableAutoTarget(false);								p.ClearActions();								p.PushActionWait(ACTION_NEWLIST, 2.f);							}						} else						{							p.EnableCommand("Extinguish", true);							p.EnableCommand("Cool", true);							p.EnableAutoTarget(true);						}					}				}			}			if (veh.HasCommand("VcmdWaterSwitch") && veh.IsCurrentAnimation("activate"))			{				GameObjectList canlist = Game::GetGameObjectsWithPrefix("engine_water_cannon");				for(int j = 0; j < canlist.GetNumObjects(); j++)				{					Vehicle can = canlist.GetObject(j);					if (can.GetUserData() == veh.GetID() && ((veh.GetID() && Engine01Level > 20)))					{						can.EnableAutoTarget(true);					} else					{						can.EnableAutoTarget(false);						can.ClearActions();						can.PushActionWait(ACTION_NEWLIST, 2.f);						System::Log("Disable cannon");					}				}			}			if (veh.GetID() && !Engine01Empty)			{				Engine01Empty = true;				Game::ShowHelpTextWindow("Water tank of Local Fire Truck is empty!");			}			if ((veh.GetID() && Engine01Level > 20))			{				veh.RemoveCommand("DummyEmptyTank");				if (veh.HasCommand("Extinguish"))					veh.EnableCommand("Extinguish", true);				if (veh.HasCommand("Cool"))					veh.EnableCommand("Cool", true);				if (veh.GetID() && Engine01Empty)					Engine01Empty = false;			} else			{				if (veh.HasCommand("Extinguish"))					veh.EnableCommand("Extinguish", false);				if (veh.HasCommand("Cool"))					veh.EnableCommand("Cool", false);			}		}	}};
  8. I like it. If I still had Winterberg installed I'd try to look at the method they found, though theirs is way too restrictive considering an American-style engine usually has a tank capable of holding a few hundred gallons at the least.

    I looked at trying to find it in the winterberg mods ones and quickly realized i don't read German very well!

  9. Appreciate the input, but even with classes of units the game still has to check each individual vehicle because each vehicle must have an individual unique water tank. The problem is not how the game shows the update to the player, but how updating the water tanks is done in the background and how the water levels of EACH tank/vehicle are stored and saved. The way of adding and subtraction can be copied from the demo I made which is not really a problem.. :)

     

    I do have a couple of ideas though, which I will look into later.

     

     

    As i said next to number one  "Possibly even a different script for each truck would be necessary to keep track of its water level better"

    Thinking about it further i would about say that is with out a doubt the best option, Each truck with its own script would make for a simplistic start to finding a solution!

     

    Hoppah could you break down the part of the code that dose adding and subtracting? I don't really know the mission scripting stuff but if i had the basics to put in to a command script i might be able to play around with it a bit better!

  10. This is so very frustrating as a moder, and EM4 player this in freeplay would be so great, However it acts to escape  every one!

     

    Here has what i came up with, and maybe will give some with more knowledge and skill a way to look!

     

    1. The best way would be to assign a tank level to one class of units, ( Possibly even a different script for each truck would be necessary to keep track of its water level better )

    2. Then have preset way of adding and subtraction between 0 ( tank empty ) and the tank full level ( W/E Its set at )

    3. To update on tank level you could do a text at the top of the screen or as hoppah suggested icons ( However i think this is the lest import aspect of the script)

    4.  Lag would be a potential problem due to the fact that each truck is constantly updating its water level

    5. A code idea ( i am fully aware that this is not actually right it is just a brain storm! )

     

    const char ETL[]				=  "1000";const char OUTTAKE_HOSE 			= 6;const char OUTTAKE_CANNON 			= 10;const char INTAKE_SUPPLYLINE 		= 24;object VcmdWaterLVL : CommandScript{	VcmdWaterLVL()	{				SetGroupID(DummyGroup); 		SetGroupLeader(true);			}Vehicle v(Caller);		if (v.GetVehicleType() == VT_FIREFIGHTERS_GTF)			// Some how set Water level ( ETL )		if (v.HasCommand(DUMMY_HOSESON))		// some how set OUTTAKE_HOSE		if (v.HasCommand(WaterOn))		// some how set OUTTAKE_CANNON 

     

    Please any suggestions or ideas off this would be welcomed 

    between all of us we can make it work, Even with a little lag! 

     

    Ideas ??

  11. This would actually be really simple! almost a copy and past set up!

     

     

    The way the scripts work is it follows the order in which its written so in theory if you copy and pasted the core part of the change clothes script to in front of the core part of the rapid deploy script the fire fighters would get out, change clothes, go get the hose, connect the hose , and be ready to fight fire in the correct order!

     

    You would have to do some tinkering to get every thing lined up right and work the bugs out but it should work with very little effort! 

  12. you said you did this but~!

     

    Set your resolution in the config file manually 

     

    Use a text editor

     

    Go in to your EM4 game directory 

    Open em4.cfg ( Make sure its not set to read only )

    find

        <var name="r_xres" value="1600" />
        <var name="r_yres" value="900" />
    And set the values to your screens resolution ( Go to your control panel and make sure you set it to the resolution displayed under Appearance & Personalization  )
    Change the compatibility mode to windows XP EM4 Is a XP era game not windows 7 also make sure that run as administrator is checked for every start up!
    U could also try lowering your UAC level to see if that helps!  ( it will block file changes and other crap on occasion) 
     
    Should solve your problem, However if you try the above listed ( Actually try them! )
    Ill troubleshoot some more stuff with you i had this issue on windows 8 as well and the game is running great 
  13. The best way to be a beta tester is to make friends with modders, Asking to be a beta tester with out being requested to do so or a modder posting looking for beta testers kinda make you look like a "mod hunter" 

     

    Mod Hunter lol thats a good one! new gaming term for mod trollers~!

  14. go under UI -> Game -> Icons -> Commands

     

    Make the imiage and save it in that folder 4 times like so

     

    image_normal

    Image_over

    image_disable

    image_mousedown

     

    Find in the command script this" SetIcon " in the code

    set to image name such as Ex image

    Do not include the _normal and so forth

     

    simple as that

  15. We will be publishing a new thread with more up to date information during this week, can an administrator please close this thread? I do have permission from the clan leader.

    thanks,

    -marc

    --eoc captain

    What are captain means to say is!

    We would like to publish a new thread if the admins on the forum are okay with it and would be willing to close or delete this one, If not its fine we will stay with this one.

    Thanks for allowing us to post here!

  16. Here is the format you must follow!

    ccar_1 = Main accident

    ccard_1_x = any other object that that is related to the crash but people, such as ccard_1_a, ccard_1_b and so forth

    ccarp_1_x = people so its ccarp_1_a, ccarp_1_b ect..

    Where the number 1 is the accidnet grouping and the letter is the identification of each part of the accident other then the main vehicle which the script uses to trigger such accident!

    *** Sorry for the dubble post my screen didn't refresh that it posted ***

  17. Here is the format you must follow!

    ccar_1 = Main accident

    ccard_1_x = any other object that that is related to the crash but people, such as ccard_1_a, ccard_1_b and so forth

    ccarp_1_x = people so its ccarp_1_a, ccarp_1_b ect..

    Where the number 1 is the accidnet grouping and the letter is the identification of each part of the accident other then the main vehicle which the script uses to trigger such accident!

×
×
  • Create New...