ENG51INE Posted April 17, 2014 Report Share Posted April 17, 2014 I am trying to find a way to script this simple concept. I am creating a new mod based off of Manchester, NH, USA. In real life, like with many other cities and towns, many stations are staffed with 4 people that crossman an engine and a ladder. I am looking for a script that will make it so that vehicles can only be moved if they have at least 1 person in them (driver). I have looked around and have not seen any other scripts like this. If anyone has any ideas or can offer any assistance, I would greatly appreciate it. Thank you. Quote Link to comment Share on other sites More sharing options...
FFMeredith Posted April 17, 2014 Report Share Posted April 17, 2014 I am trying to find a way to script this simple concept. I am creating a new mod based off of Manchester, NH, USA. In real life, like with many other cities and towns, many stations are staffed with 4 people that crossman an engine and a ladder. I am looking for a script that will make it so that vehicles can only be moved if they have at least 1 person in them (driver). I have looked around and have not seen any other scripts like this. If anyone has any ideas or can offer any assistance, I would greatly appreciate it. Thank you.I think a script like this appears in the Manhattan Mod v3?FFMeredith Quote Link to comment Share on other sites More sharing options...
bma Posted April 17, 2014 Report Share Posted April 17, 2014 Actually guite simpleGo to the move script, find the lines which checks the targetThe line starts with bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { and add this in there: if(Caller->GetType() == ACTOR_VEHICLE) { Vehicle v(Caller); if(v.GetFreePassengers() > 0 && v.GetNumPassengers() == 0) return false; } return true;This should give you something that looks a bit like this:bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { mr = Commands::CheckMoveConditions(Caller, Target, childID); if (mr.Mode == MOVE_ABORT) return false; if(Caller->GetType() == ACTOR_VEHICLE) { Vehicle v(Caller); if(v.GetFreePassengers() > 0 && v.GetNumPassengers() == 0) return false; } return true; } Quote Link to comment Share on other sites More sharing options...
The Loot Posted April 17, 2014 Report Share Posted April 17, 2014 Ah, I didn't think of using "GetFreePassengers" when I did it; I just ended up putting space and personnel for every vehicle. I did this for pretty much all the vehicle commands that made sense. Quote Link to comment Share on other sites More sharing options...