-
Posts
13 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Tutorials
Downloads
Gallery
Posts posted by BxPanxi
-
-
Alright seems what I did didn't work. What happened here..? @itchboy
if (v.IsValid() && !v.IsDestroyed() && StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/suv_lapd.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_lapp.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol1.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol2.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol4.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol6.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/rescue_truck02_lapd.e4p") == 0) return true; return false; } } }
-
@itchboyHey! Thanks for you response, I think I got it fixed, haven't tested it yet because of problems with resolution but thank you!
-
Alright so I'm having a few troubles. I tried to do it again and now it says theres an error with the parenthesis.
I don't know what's wrong here?
@itchboy
And, @The LootI'm not really the best at this stuff so I didn't get what you meant by that script at all, sorry!
if (v.IsValid() && !v.IsDestroyed() && StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/suv_lapd.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_lapp.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol1.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol2.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol4.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol6.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/rescue_truck02_lapd.e4p") == 0 return true; return false; } } void PushActions(GameObject *Caller, Actor *Target, int childID) { Vector TargetPos = Target->GetTargetPoint(Caller, TARGET_EQUIPMENTDOOR); Caller->PushActionMove(ACTION_NEWLIST, TargetPos); Caller->PushActionTurnTo(ACTION_APPEND, Target); Caller->PushActionGetEquipment(ACTION_APPEND, Target, EQUIP_NONE); Caller->PushActionExecuteCommand(ACTION_APPEND, DUMMY_BARRICADE, Target, 1, false); } }; object PcmdBarricadeRemove : CommandScript { PcmdBarricadeRemove() { SetIcon("policebarricaderemove"); SetCursor("policebarricaderemove"); SetValidTargets(ACTOR_VEHICLE | ACTOR_OBJECT); SetRestrictions(RESTRICT_NOTDESTROYED | RESTRICT_NOTBURNING | RESTRICT_HASROADBLOCK); SetPossibleCallers(ACTOR_PERSON); SetNeedsCarWithFlagSet(OF_HAS_ROADBLOCK); } /*bool CheckPossible(GameObject *Caller) { if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON) return false; Person p(Caller); if (p.IsCarryingPerson()||p.IsLinkedWithPerson()|| p.GetFirehoseID()!=0 || p.IsPulling()) return false; if (!Game::ExistsNormalObjectWithFlagSet(OF_HAS_ROADBLOCK)) return false; return true; }*/ bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if(!Caller->IsValid() || !Target || !Target->IsValid() || Target->GetType()!=ACTOR_VEHICLE) return false; if(Caller->GetObjectType()==TYPE_PERSON) { Person p(Caller); Vehicle v(Target); if (v.IsDestroyed()) return false; if(p.IsValid() && (p.IsLinkedWithPerson() || p.IsCarryingPerson() || p.IsEquipped() || p.IsPulling() || p.GetFirehoseID()!=0 || p.GetEnteredCarID() != -1)) return false; Vehicle v(Target); if (v.IsValid() && !v.IsDestroyed() && StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/suv_lapd.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_lapp.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol1.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol2.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol4.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol6.e4p") == 0 || StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/rescue_truck02_lapd.e4p") == 0 return true; return false; } }
-
@itchboySorry I don't respond for a while, I don't expect to get a response immediately.
Here's a link to a GIF which shows what section I changed. If you just want the code, it is below; https://gyazo.com/675636db75500ccda8f627721769ff1d
Spoilerif (v.IsValid() && !v.IsDestroyed() && StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/suv_lapd.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/hummerh2_lasd.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/rescue_truck01_lapd.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_lapp.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol1.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol2.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol4.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/cv_patrol6.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/rescue_truck02_lapd.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/swat_armoured_vehicle.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/swat_truck.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 US Army/hmmwv.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/05 US Army/us_army_truck.e4p") == 0)
return true;return false;
}
}void PushActions(GameObject *Caller, Actor *Target, int childID)
{
Vector TargetPos = Target->GetTargetPoint(Caller, TARGET_EQUIPMENTDOOR);Caller->PushActionMove(ACTION_NEWLIST, TargetPos);
Caller->PushActionTurnTo(ACTION_APPEND, Target);
Caller->PushActionGetEquipment(ACTION_APPEND, Target, EQUIP_NONE);
Caller->PushActionExecuteCommand(ACTION_APPEND, DUMMY_BARRICADE, Target, 1, false);
}
};object PcmdBarricadeRemove : CommandScript
{
PcmdBarricadeRemove()
{
SetIcon("policebarricaderemove");
SetCursor("policebarricaderemove");
SetValidTargets(ACTOR_VEHICLE | ACTOR_OBJECT);
SetRestrictions(RESTRICT_NOTDESTROYED | RESTRICT_NOTBURNING | RESTRICT_HASROADBLOCK);
SetPossibleCallers(ACTOR_PERSON);
SetNeedsCarWithFlagSet(OF_HAS_ROADBLOCK);
}/*bool CheckPossible(GameObject *Caller)
{
if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON)
return false;
Person p(Caller);
if (p.IsCarryingPerson()||p.IsLinkedWithPerson()|| p.GetFirehoseID()!=0 || p.IsPulling())
return false;
if (!Game::ExistsNormalObjectWithFlagSet(OF_HAS_ROADBLOCK))
return false;
return true;
}*/bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
{
if(!Caller->IsValid() || !Target || !Target->IsValid() || Target->GetType()!=ACTOR_VEHICLE)
return false;
if(Caller->GetObjectType()==TYPE_PERSON)
{
Person p(Caller);
Vehicle v(Target);if (v.IsDestroyed())
return false;if(p.IsValid() && (p.IsLinkedWithPerson() || p.IsCarryingPerson() || p.IsEquipped() || p.IsPulling() || p.GetFirehoseID()!=0 || p.GetEnteredCarID() != -1))
return false;Vehicle v(Target);
if (v.IsValid() && !v.IsDestroyed() && StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/suv_lapd.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/hummerh2_lasd.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/rescue_truck01_lapd.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/rescue_truck02_lapd.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/swat_armoured_vehicle.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/03 LA Police/swat_truck.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/05 US Army/hmmwv.e4p") == 0 ||
StrCompare(v.GetPrototypeFileName(), "mod:Prototypes/Vehicles/05 US Army/us_army_truck.e4p") == 0)
return true;return false;
}
} -
@itchboy Yeah I edited the files, but now a little far into the game, the LA Police Barricde error comes up saying "Statement took too long"
-
Hi, I am trying to get the Police Barricade tool into a mod called Northview South County. It has the script, but the script points to some .e4p files, how do I make a e4p for a Vehicle? I thought I needed to add the tool name in the unit.xml but I don't know the tool name either. Please help!
i am also aware this is a very old game and I probably won't get a response.
-
I know why it doesn't work. It requires to be administrator. Is there a way I can request it to request admin on start?
-
7 minutes ago, itchboy said:
Now I am super confused. Your logfile shows that the "xres" value is 1360, but the logfile has 1360 as the yres value. It seems to be reversed in the logfile, and now I am very confused.
I cant think of a reason that the logfile values would differ from the cfg file.
Oh ha! My bad, after I posted the post from 6 hours ago ^ I tried switching them, let me switch them back so I don't confuse you.
-
Must be my Anti-Virus? Or it needs administrator permission. Let me try that.
Alrighty got it, here you go.
-
50 minutes ago, itchboy said:
Can you upload the logfile.txt that is found in the same folder as Em4.exe? The logfile should indicate an error message that would clue us into what the specific problem is.
https://gyazo.com/facafeaf98a4567c5baed43f03116f96
There is no logfile.txt :/ -
15 hours ago, itchboy said:
Try setting the resolution in the cfg file based on what your GPU settings are. 800 by 700 seems like a weird resolution, so chances are you may be mistaken with that value.
Also, be sure you aren't reversing the xres and yres values.
In my case, my monitor is a cheap LED one that has 1368 x 768 as the resolution. In my cfg file, I've set xres to 1368 while yres is 768
I tried that, but it still crashes,
https://gyazo.com/7c7290afd332aac55a673281aafcb726
https://gyazo.com/3ab3d6d845be8dcc69d1fa774c258d75 -
Hi I have been playing EM4 for about a week or so, and I set the resolution way too big to the point where I couldn't even change it back, and so I messed with the em4.cfg and screwed up the game, when I messed with it, I set the resolution to the normal resolution, 800 something and 700 something. THat made the game crash and go straight to a black screen for about 2 seconds then crash. After that I tried to reinstall it and delete the installer file too, still didn't work. I tried just deleting the em4.cfg and tried, still didn't work. Nothing works! I dont know if it is my driver but if it is, I don't know how to update it at all. And when I get the request to install a DIrectX at the end of the Em4 installation, it says it's not compatible with my windows. So if you could help me, that'd be great.
--Headed to bed,
BxPanxi
How to add Police Barricade tool to other mod cars?
in Alteration Help
Posted
@itchboy I'm sorry! I don't usually visit the website since I always think it's dead in 2012. My bad. I actually kind of forgot about the problem here, it seems to have fixed itself, or something. It shouldn't matter though since I am getting Emergency 5 so, yeah.