Zum Inhalt wechseln


Foto

[Released]Call Coroner Script and Call Tow Truck Script


  • Please log in to reply
41 replies to this topic

#1 Quincy

Quincy

    Captain

  • Members
  • 181 Beiträge:
  • Gender:Male
  • Location:Gloucester, MA
  • Interests:Computers
    Law Enforcement
    Emergency Vehicles
    Fire & EMS

Geschrieben 17 Mai 2013 - 03:50

Here are the first two scripts I have created, CallTow and CallCoroner. They currently call from off the map and WILL NOT dispatch a unit from the map. Like if you have a coroners van already parked on the map and you hit the dispatch command it wont dispatch that unit, it will call a new one off the map.

Download Link is below video!!

Credits: Hoppah for the scripts for which i made these from and Myself (Quincy) for doing the edits.

Instructions:
  • Add .script files to Scripts\Game\Command directory
  • Open Editor
  • Add Commands to the units you want.
WARNING: DO TO A TECHNICAL LIMITATION ONLY 11 EQUIPMENT COMMANDS CAN BE ASSIGNED TO A SINGLE UNIT. THIS IS NOT SCRIPT RELATED IT IS A HARDCODED GAME LIMITATION.

Try my new Command Post Script!! http://forum.emergen...d-post-scripts/

http://www.youtube.com/watch?v=1zWSxmYadzQ
Fixed the Coroner Van issue.
Angehängte Datei  Command_scripts.zip   3,32K   182 Anzahl der Downloads

"Hey! It compiles! Ship it!"


#2 CFDDIVE11

CFDDIVE11

    Captain

  • Members
  • 171 Beiträge:
  • Gender:Male

Geschrieben 17 Mai 2013 - 04:32

Looks good can't wait to see what the command post script would look like!

Signature Removed due to size


#3 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Beiträge:
  • Gender:Male

Geschrieben 17 Mai 2013 - 08:02

Oo! Looks like you use YSB's version of the 4x4 submod? That works for me.

#4 Handsup!

Handsup!

    Battalion Chief

  • Members
  • 980 Beiträge:
  • Gender:Male
  • Location:Staffordshire
  • Interests:Emergency services, photography,
    other stuff.

Geschrieben 17 Mai 2013 - 01:42

Looking forward to your 'Command Post' script.

Regards,

Joseph - Handsup!

Emergency Services Enthusiast

Photographer

Staffordshire Police Cadet

 


#5 Quincy

Quincy

    Captain

  • Members
  • 181 Beiträge:
  • Gender:Male
  • Location:Gloucester, MA
  • Interests:Computers
    Law Enforcement
    Emergency Vehicles
    Fire & EMS

Geschrieben 17 Mai 2013 - 04:06

The command post thing is going to be the last thing I make, and yes in the video I'm using ysb's 4x4 sub mod edit in the video but the script can run on any version of the LA Mod as long as the directory for the prototype for the van hasn't been changed. As of right now the script is set to always call a unit from off the map, I'm working on making it so if you have a van or truck on the map in standby it will call that unit instead of dispatching the unit from of the map. I just got permission from Hoppah to release the scripts I have made, I'll edit the topic and release the scripts when I get home.

"Hey! It compiles! Ship it!"


#6 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Beiträge:
  • Gender:Male

Geschrieben 17 Mai 2013 - 09:46

Sounds good.

#7 Quincy

Quincy

    Captain

  • Members
  • 181 Beiträge:
  • Gender:Male
  • Location:Gloucester, MA
  • Interests:Computers
    Law Enforcement
    Emergency Vehicles
    Fire & EMS

Geschrieben 18 Mai 2013 - 01:26

Released, first post edited.

"Hey! It compiles! Ship it!"


#8 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Beiträge:
  • Gender:Male

Geschrieben 18 Mai 2013 - 02:21

For the coroners, I think you have some wrong values for "n.SetMaxPassengers" and "n.SetMaxTransports". I believe transports would be the bodies, and the passengers should be crew, plus you have one value set at zero. Otherwise, nice work.

#9 Quincy

Quincy

    Captain

  • Members
  • 181 Beiträge:
  • Gender:Male
  • Location:Gloucester, MA
  • Interests:Computers
    Law Enforcement
    Emergency Vehicles
    Fire & EMS

Geschrieben 18 Mai 2013 - 02:34

Thank you, I fixed the script and reuploaded it so it should work fine now.

"Hey! It compiles! Ship it!"


#10 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Beiträge:
  • Gender:Male

Geschrieben 18 Mai 2013 - 07:25

When it comes to equipment commands, what counts? The PCMD ones?

#11 Quincy

Quincy

    Captain

  • Members
  • 181 Beiträge:
  • Gender:Male
  • Location:Gloucester, MA
  • Interests:Computers
    Law Enforcement
    Emergency Vehicles
    Fire & EMS

Geschrieben 18 Mai 2013 - 06:10

Anything command that has the "SetGroupID(CGROUP_GETEQUIPMENT);" in it. Meaning it gets put in the secondary "Get Equipment Category.

"Hey! It compiles! Ship it!"


#12 FranciscoDoCarmo

FranciscoDoCarmo

    Lieutenant

  • Members
  • 73 Beiträge:
  • Gender:Male
  • Location:Lisboa, Portugal
  • Interests:Gaming addicted

Geschrieben 18 Mai 2013 - 07:23

Cool!

Posted Image

? Please Subscribe to My Youtube Channel ?


#13 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Beiträge:
  • Gender:Male

Geschrieben 18 Mai 2013 - 10:13

Anything command that has the "SetGroupID(CGROUP_GETEQUIPMENT);" in it. Meaning it gets put in the secondary "Get Equipment Category.


Ah, where is that set? I'd like to stick the Get Stretcher and Get EMT Bag into the main command group; I remember the SG submod had both of those like that. I wonder if the limit for that is just space on the UI, or if it has a number limit.

I tried to modify a script to call the SWR truck on YSBs map, but I never could get it to actually call the vehicle. If you plan to try to whip up scripts to call the other vehicles on the map, that'd be awesome. At least a script to call the Chief and Captain vehicles. Oh, could you take a look at the Hazmat script? It won't buy a vehicle from off map, even after re-enabled it.

#14 Quincy

Quincy

    Captain

  • Members
  • 181 Beiträge:
  • Gender:Male
  • Location:Gloucester, MA
  • Interests:Computers
    Law Enforcement
    Emergency Vehicles
    Fire & EMS

Geschrieben 18 Mai 2013 - 10:49

Just open up the command script and its the first loop
like the second to last line in this snippet, remove

SetGroupID(CGROUP_GETEQUIPMENT);

and it will make it appear in the main section of commands.
PostCallAmbulance1()
{
SetIcon("callambulance1");
SetCursor("callassistance");
SetValidTargets(ACTOR_FLOOR | ACTOR_VIRTUAL);
SetDeselectCaller(false);
SetSelfClickActivation(true);
SetHighlightingEnabled(false);
SetGroupID(CGROUP_GETEQUIPMENT);
SetGroupLeader(true);
}
I'm currently making the command post script but after that I will make the SWR and Chief ones for you. And I will look at the hazmat script for you and see what's wrong with it (i have an idea of what the issue probably is). Also good news I am about 80% done with the command post script. And do you still need help with the medical bag and police barricade thing you mention in your signature?

"Hey! It compiles! Ship it!"


#15 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Beiträge:
  • Gender:Male

Geschrieben 18 Mai 2013 - 11:06

Ah, there's the SetGroupID.

The Command Post sounds interesting. I'd ask for some details, but I think it'll be worth waiting for a video of it in action.

As for the medical bag and barricade issue, I was told it is script controlled and nothing the editor controls, but as to how to change things, not sure.

#16 Quincy

Quincy

    Captain

  • Members
  • 181 Beiträge:
  • Gender:Male
  • Location:Gloucester, MA
  • Interests:Computers
    Law Enforcement
    Emergency Vehicles
    Fire & EMS

Geschrieben 18 Mai 2013 - 11:10

Medical bag and Barricade go based off Vehicle type instead of specific vehicle prototype.

"Hey! It compiles! Ship it!"


#17 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Beiträge:
  • Gender:Male

Geschrieben 18 Mai 2013 - 11:19

Yeah, that's what it seemed like, I just wasn't sure how to find what the exact names were for each vehicle. I assume it's the same for changing into a diver and back.

Now that I'm thinking of it, I wanted to do the same with the ALS/BLS engines (and also the Light Forces) that I did with the Ambulances, e.g. that it would find the nearest engine, no matter the type, and just change crew depending on the script used. It looked a bit daunting since there wasn't a base script that called all engines like the police EMS call.

Edit: So, commenting out the "SetGroupID(CGROUP_GETEQUIPMENT);" line with "//" sends the commands to the first list of them, and it opens up more space in the normal equipment commands. I've got 13 commands in total for the EMS Captain now, with no glitch for the command list.

Edit2: Still can't get my Water Rescue Truck script to work completely, but at least it calls a unit from off map. Don't know why it won't find the vehicle on the map. I've added on the correct "const char" entries and made sure to change them over.

Spoiler


I changed the "Audio::PlaySample3D" line, so you'd have to change it back to the normal line that your scripts use; I've done a lot of small tweaks.

#18 Quincy

Quincy

    Captain

  • Members
  • 181 Beiträge:
  • Gender:Male
  • Location:Gloucester, MA
  • Interests:Computers
    Law Enforcement
    Emergency Vehicles
    Fire & EMS

Geschrieben 19 Mai 2013 - 06:15

Un // this line "// Before CollidingWith - && !aCar->HasCommand(DUMMY_VCALLED) && (aCar->HasCommand(CMD_STANDBY_OFF)"
And im 90% done with the command post script, just working out a call command glitch where the commands to call the units dont show up on the post.

"Hey! It compiles! Ship it!"


#19 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Beiträge:
  • Gender:Male

Geschrieben 19 Mai 2013 - 07:05

Well I restored the line (I don't remember why I removed those):
if (StrCompare(aCar->GetPrototypeFileName(), OBJ_SWR) == 0 && aCar->GetPlayerMP() == Caller->GetPlayerMP() && !aCar->HasCommand(DUMMY_VCALLED) && (aCar->HasCommand(CMD_STANDBY_OFF) || aCar->IsCollidingWithVirtualObject(VO_SWR)))

But still no luck. Hopefully when you release the Chief and Captain I can do a quick change to those scripts for the other vehicles, as long as you get both station's command vehicles done.

#20 Quincy

Quincy

    Captain

  • Members
  • 181 Beiträge:
  • Gender:Male
  • Location:Gloucester, MA
  • Interests:Computers
    Law Enforcement
    Emergency Vehicles
    Fire & EMS

Geschrieben 19 Mai 2013 - 09:33


Well I restored the line (I don't remember why I removed those):

if (StrCompare(aCar->GetPrototypeFileName(), OBJ_SWR) == 0 && aCar->GetPlayerMP() == Caller->GetPlayerMP() && !aCar->HasCommand(DUMMY_VCALLED) && (aCar->HasCommand(CMD_STANDBY_OFF) || aCar->IsCollidingWithVirtualObject(VO_SWR)))

But still no luck. Hopefully when you release the Chief and Captain I can do a quick change to those scripts for the other vehicles, as long as you get both station's command vehicles done.


I'll work on the Call SWR, EMS Captain, Battalion Chief Commands during the week. In the mean while enjoy this. http://forum.emergen...d-post-scripts/ its the command post i've been working on for the last 36 hours. :D

"Hey! It compiles! Ship it!"