Steven Dang Posted July 26, 2016 Report Share Posted July 26, 2016 well, i made it works. But now i can't pick up the jump pad after deployed it :| Quote Link to comment Share on other sites More sharing options...
Axxif Posted July 31, 2016 Report Share Posted July 31, 2016 @Steven Dang that sounds like your FF/EMTs are missing the "PickUp" command. Assuming LA Mod is still at 2.1, you could try adding a snippet of code to the end of the Usejumppad script in order to ensure that you can pick it back up. Something like the last two lines of code here... //****************************************************************************************** // #Version 1.1# // // Changes: - UseJumppad and RemoveEquipment command will be removed. // //****************************************************************************************** const char DUMMY_EQUIPMENT[] = "DummyEquipmentCommands"; object UseJumppad : CommandScript { UseJumppad() { SetValidTargets(ACTOR_OPEN_HOUSE); SetPossibleCallers(ACTOR_PERSON); SetPossibleEquipment(EQUIP_JUMPPAD); SetPossibleExists(CPE_HOUSE_FOR_JUMPPAD); } /*bool CheckPossible(GameObject *Caller) { if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON || Caller->GetEquipment()!=EQUIP_JUMPPAD) return false; return Game::ExistsHouseForJumpad(); }*/ bool CheckTarget(GameObject *Caller, Actor *Target, int ChildID) { if(!Caller->IsValid() || Caller->GetEquipment()!= EQUIP_JUMPPAD ) return false; if (Caller->GetType() != ACTOR_PERSON) return false; Person p(Caller); if(p.GetEnteredCarID() != -1) return false; if ( Target->GetType() == ACTOR_OPEN_HOUSE ) { OpenHouse house(Target); if ( house.HasJumppadTarget() ) return true; } return false; } void PushActions(GameObject *Caller, Actor *Target, int ChildID) { OpenHouse house(Target); Vector TargetPos = house.GetJumppadTarget(); Caller->PushActionMove(ACTION_APPEND, TargetPos); Caller->PushActionUseEquipment(ACTION_APPEND, Target, ChildID, 3.f); Caller->PushActionExecuteCommand(ACTION_APPEND, DUMMY_EQUIPMENT, Target, 10, false); // go back 300 units Vector BackPos = Caller->GetPosition(); BackPos.x -= TargetPos.x; BackPos.y -= TargetPos.y; BackPos.z -= TargetPos.z; float len = Math::dist(BackPos.x, BackPos.y, BackPos.z, 0, 0, 0); if ( len ) { BackPos.x *= 300/len; BackPos.y *= 300/len; BackPos.z *= 300/len; } BackPos.x += TargetPos.x; BackPos.y += TargetPos.y; BackPos.z += TargetPos.z; Caller->PushActionMove(ACTION_APPEND, BackPos); if(!p.HasCommand("PickUp")) { p.AssignCommand("PickUp"); } } }; In particular: if(!p.HasCommand("PickUp")) { p.AssignCommand("Pickup"); } Edit: I'm not sure whether that is a valid syntax for this usage or if it needs to be formatted around Caller. Lemme know if it works and if not I'll look into it and try it out (particularly when it's not 4:30 in the morning ) Quote Link to comment Share on other sites More sharing options...
Steven Dang Posted July 31, 2016 Report Share Posted July 31, 2016 3 hours ago, Axxif said: @Steven Dang that sounds like your FF/EMTs are missing the "PickUp" command. Assuming LA Mod is still at 2.1, you could try adding a snippet of code to the end of the Usejumppad script in order to ensure that you can pick it back up. Something like the last two lines of code here... //****************************************************************************************** // #Version 1.1# // // Changes: - UseJumppad and RemoveEquipment command will be removed. // //****************************************************************************************** const char DUMMY_EQUIPMENT[] = "DummyEquipmentCommands"; object UseJumppad : CommandScript { UseJumppad() { SetValidTargets(ACTOR_OPEN_HOUSE); SetPossibleCallers(ACTOR_PERSON); SetPossibleEquipment(EQUIP_JUMPPAD); SetPossibleExists(CPE_HOUSE_FOR_JUMPPAD); } /*bool CheckPossible(GameObject *Caller) { if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON || Caller->GetEquipment()!=EQUIP_JUMPPAD) return false; return Game::ExistsHouseForJumpad(); }*/ bool CheckTarget(GameObject *Caller, Actor *Target, int ChildID) { if(!Caller->IsValid() || Caller->GetEquipment()!= EQUIP_JUMPPAD ) return false; if (Caller->GetType() != ACTOR_PERSON) return false; Person p(Caller); if(p.GetEnteredCarID() != -1) return false; if ( Target->GetType() == ACTOR_OPEN_HOUSE ) { OpenHouse house(Target); if ( house.HasJumppadTarget() ) return true; } return false; } void PushActions(GameObject *Caller, Actor *Target, int ChildID) { OpenHouse house(Target); Vector TargetPos = house.GetJumppadTarget(); Caller->PushActionMove(ACTION_APPEND, TargetPos); Caller->PushActionUseEquipment(ACTION_APPEND, Target, ChildID, 3.f); Caller->PushActionExecuteCommand(ACTION_APPEND, DUMMY_EQUIPMENT, Target, 10, false); // go back 300 units Vector BackPos = Caller->GetPosition(); BackPos.x -= TargetPos.x; BackPos.y -= TargetPos.y; BackPos.z -= TargetPos.z; float len = Math::dist(BackPos.x, BackPos.y, BackPos.z, 0, 0, 0); if ( len ) { BackPos.x *= 300/len; BackPos.y *= 300/len; BackPos.z *= 300/len; } BackPos.x += TargetPos.x; BackPos.y += TargetPos.y; BackPos.z += TargetPos.z; Caller->PushActionMove(ACTION_APPEND, BackPos); if(!p.HasCommand("PickUp")) { p.AssignCommand("PickUp"); } } }; In particular: if(!p.HasCommand("PickUp")) { p.AssignCommand("Pickup"); } Edit: I'm not sure whether that is a valid syntax for this usage or if it needs to be formatted around Caller. Lemme know if it works and if not I'll look into it and try it out (particularly when it's not 4:30 in the morning ) Thanks, i will try. I'm using The RiverSide Mod, everything is work fine with jumpad until i copy and replace some scripts such as: Pickup, hoseextension, attachfirehose, watersupply into this mod then i can not pick up the jumpad after deployed :| Edit: Well, it works with ff_emt, but it's not work with usfs :|, i think the problem come from the Pickup.script Quote Link to comment Share on other sites More sharing options...
Axxif Posted July 31, 2016 Report Share Posted July 31, 2016 So, I've compared a couple PickUp scripts I've got, and I think I might have found your possible problem. If I may direct your attention to this segment: bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; if (Caller->GetType() == ACTOR_VEHICLE) { Vehicle v(Caller); if (v.GetVehicleType() == VT_FIREFIGHTERS_FMB) { return v.GetFreeTransports() > 0 && (Game::ExistsNormalObjectWithFlagSet(OF_FLOTSAM) || Game::ExistsDrowningPerson()); } else if (v.GetVehicleType() == VT_THW_FGRR_RL) { return !v.IsCarryingAnything() && Game::ExistsNormalObjectWithFlagSet(OF_CARRYABLE_BY_BULLDOZER); } } if (Caller->GetType() == ACTOR_PERSON) { Person p(Caller); if (p.GetArrestedID() != -1) return false; } if (Caller->HasCommand("Dummy1Cone") || Caller->HasCommand("Dummy2Cones")) return true; else if (Caller->HasCommand("Dummy1Flare") || Caller->HasCommand("Dummy2Flares")) return true; else if (Caller->IsCarryingAnything()) return false; else if (Caller->HasCommand("PcmdTrafficConeGet") || Caller->HasCommand("PcmdFlareGet")) return true; else if (Caller->HasCommand("PcmdWye") || Caller->HasCommand("PcmdExtendhose")) return true; else if (Caller->HasCommand("DriveAwayPerson")) return Game::ExistsInstalledJumppad() || Game::ExistsPickableAnimal(); return false; } Make sure that you have the last tidbit in there (the two lines above "return false;"), and ensure that all of the peds that you have which you want to collect the jumppad have the command "DriveAwayPerson". Without this, the script cannot initialize unless you fulfill one of the other variables. Hope this helps! 1 Quote Link to comment Share on other sites More sharing options...
Steven Dang Posted August 1, 2016 Report Share Posted August 1, 2016 9 hours ago, Axxif said: So, I've compared a couple PickUp scripts I've got, and I think I might have found your possible problem. If I may direct your attention to this segment: bool CheckPossible(GameObject *Caller) { if (!Caller->IsValid()) return false; if (Caller->GetType() == ACTOR_VEHICLE) { Vehicle v(Caller); if (v.GetVehicleType() == VT_FIREFIGHTERS_FMB) { return v.GetFreeTransports() > 0 && (Game::ExistsNormalObjectWithFlagSet(OF_FLOTSAM) || Game::ExistsDrowningPerson()); } else if (v.GetVehicleType() == VT_THW_FGRR_RL) { return !v.IsCarryingAnything() && Game::ExistsNormalObjectWithFlagSet(OF_CARRYABLE_BY_BULLDOZER); } } if (Caller->GetType() == ACTOR_PERSON) { Person p(Caller); if (p.GetArrestedID() != -1) return false; } if (Caller->HasCommand("Dummy1Cone") || Caller->HasCommand("Dummy2Cones")) return true; else if (Caller->HasCommand("Dummy1Flare") || Caller->HasCommand("Dummy2Flares")) return true; else if (Caller->IsCarryingAnything()) return false; else if (Caller->HasCommand("PcmdTrafficConeGet") || Caller->HasCommand("PcmdFlareGet")) return true; else if (Caller->HasCommand("PcmdWye") || Caller->HasCommand("PcmdExtendhose")) return true; else if (Caller->HasCommand("DriveAwayPerson")) return Game::ExistsInstalledJumppad() || Game::ExistsPickableAnimal(); return false; } Make sure that you have the last tidbit in there (the two lines above "return false;"), and ensure that all of the peds that you have which you want to collect the jumppad have the command "DriveAwayPerson". Without this, the script cannot initialize unless you fulfill one of the other variables. Hope this helps! Thank you so much! Edit: this is PickUp.script, right? Quote Link to comment Share on other sites More sharing options...
Axxif Posted August 1, 2016 Report Share Posted August 1, 2016 Yes it is Quote Link to comment Share on other sites More sharing options...
Steven Dang Posted August 1, 2016 Report Share Posted August 1, 2016 Just now, Axxif said: Yes it is well, i will check it. Thanks a lot for helping Quote Link to comment Share on other sites More sharing options...
Steven Dang Posted August 1, 2016 Report Share Posted August 1, 2016 It worked, but after picking up jumpad, they can not remove item. i think it has a relative with remove script Quote Link to comment Share on other sites More sharing options...
Axxif Posted August 1, 2016 Report Share Posted August 1, 2016 Have you checked to make sure that your firefighters actually have all the commands necessary to function properly? Could you load your script folder to a rar or zip file and send it to me? Quote Link to comment Share on other sites More sharing options...
Steven Dang Posted August 2, 2016 Report Share Posted August 2, 2016 8 hours ago, Axxif said: Have you checked to make sure that your firefighters actually have all the commands necessary to function properly? Could you load your script folder to a rar or zip file and send it to me? sure, i will do it, because when the ff take the fire extinguisher, fire axe, saw,.. ithey can put it down (remove them) expect the Jump pad :)) Scripts.rar Quote Link to comment Share on other sites More sharing options...
Steven Dang Posted August 20, 2016 Report Share Posted August 20, 2016 Does anyone can make the second water tanker in a mod? I tried coding but it's not good too much....:( Quote Link to comment Share on other sites More sharing options...
boyscoutews Posted September 19, 2016 Report Share Posted September 19, 2016 Ok so Im trying to use an engine from northview south county, I have it working, its just that I can not get the water suppply to work on that engine, THe deck gun is always on, I cant connect hoses, not letting me do the hydrant to engine. Any help is greatly appreciated Quote Link to comment Share on other sites More sharing options...
Steven Dang Posted October 13, 2016 Report Share Posted October 13, 2016 Help!!! Does anyone know how to change the script "Waterswitch.script" to make it work for more style of cannon in mod? I changed somethings but it does not work properly Here is my edited script....hope to see your support! Waterswitch.script Quote Link to comment Share on other sites More sharing options...
TACRfan Posted October 13, 2016 Report Share Posted October 13, 2016 I am trying to set up the script for a mod of mine and i have managed to get to the pumps, water tanks, connections and supply lines working but for some reason when i go to connect the hose to the engine to start putting out a fire i loose the Cool and Extinguish commands from the fire fighters. The same thing also happens with the DLK, i connect the DLK to a hydrant then as soon as i put the firefighter in the basket and he has gone through the animation of the ladder extending the firefighter loses the command again. 1 Quote Link to comment Share on other sites More sharing options...
Guest e34p Posted January 7, 2017 Report Share Posted January 7, 2017 I'm trying to change the hydrants in freeplay of my private mod. I have changed them to how they appear in the attached images. Without a hose attached they appear with just the yellow sign and yellow plate of the floor. Once a hose is attached to the hydrant the grey 'standpipe' appears and the hose connects to it. Once you disconnect the hose, the grey 'standpipe' disappears again. I used the scripts from the Bieberfelde Mod. The hydrant object is named "water". When a hose is attached to the hydrant a firefighter can extinguish a fire directly from the hydrant. I want to incorporate the limited water script. I can attached the hose from this hydrant to the fire engine, but it does not replenish the tank. What needs to be done to be able to get this to work? Thanks in advance Em4 2017-01-07 23-12-38-38.bmp Em4 2017-01-07 23-13-51-42.bmp Quote Link to comment Share on other sites More sharing options...
itchboy Posted January 8, 2017 Report Share Posted January 8, 2017 I believe the problem here is that those custom standpipes are not 'default' Em4 hydrants, but rather ploppable custom objects that do not have the same properties as a standard Em4 hydrant. Quote Link to comment Share on other sites More sharing options...
Guest e34p Posted January 8, 2017 Report Share Posted January 8, 2017 It must be do-able, the Bieberfelde mod has managed to get it to work Quote Link to comment Share on other sites More sharing options...
itchboy Posted January 8, 2017 Report Share Posted January 8, 2017 You'd need to figure out what their hydrant is. Is it a vehicle substitute or an actual hydrant? Em4's hydrants are hardcoded to only have one connection each. Im curious how they got two to work using the default system, unless they modified LWS so that the fake hydrant object has unlimited water in it. Quote Link to comment Share on other sites More sharing options...
Guest e34p Posted January 8, 2017 Report Share Posted January 8, 2017 Maybe that is it. The standpipe appears on the minimap as a vehicle Quote Link to comment Share on other sites More sharing options...
itchboy Posted January 8, 2017 Report Share Posted January 8, 2017 Yeap, that confirms it. Its a custom vehicle disguised as a fire hydrant. You would need to modify the LWS code so that the fake vehicle has either: An unlimited water supply, or that the water taken from it does not drain the tank. Quote Link to comment Share on other sites More sharing options...
Guest e34p Posted January 8, 2017 Report Share Posted January 8, 2017 45 minutes ago, itchboy said: Yeap, that confirms it. Its a custom vehicle disguised as a fire hydrant. You would need to modify the LWS code so that the fake vehicle has either: An unlimited water supply, or that the water taken from it does not drain the tank. Any idea how I would do that? Quote Link to comment Share on other sites More sharing options...
itchboy Posted January 9, 2017 Report Share Posted January 9, 2017 Lean and understand how to modify code in Em4, then go into LWS and make/change/add values to accomodate the new hydrant. Option B is to observe the code from Bieberfelde and see what they did. Dont copy it directly into your mod though unless you have their permisison. Quote Link to comment Share on other sites More sharing options...
Guest e34p Posted January 9, 2017 Report Share Posted January 9, 2017 I understand how to modify code. I've released a successful mod. I was looking for a bit more of a pointer than just "go and learn yourself" Quote Link to comment Share on other sites More sharing options...
itchboy Posted January 9, 2017 Report Share Posted January 9, 2017 Figure out what they modified in Bieb to get the thing working and then take the same path without copying the content they did 1/1. I dont have much else to say besides that, seeing as how I dont play the Bieb mod or have exp with their code. All I am doing is guesswork as to how they might have done it. Quote Link to comment Share on other sites More sharing options...
Guest e34p Posted January 9, 2017 Report Share Posted January 9, 2017 Ok fair enough thank you Quote Link to comment Share on other sites More sharing options...