Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Script discussion : Hospital Treatment

So if you were able to read my mod idea I have a script I wanted to try. But scripting is not my best suit.

The script would be to bring a patient to the hospital and then be put into a bed. That would be the only way they would get to full health. Then they are "released".

Any suggestions on how I should approach this?

Featured Replies

So if you were able to read my mod idea I have a script I wanted to try. But scripting is not my best suit.

The script would be to bring a patient to the hospital and then be put into a bed. That would be the only way they would get to full health. Then they are "released".

Any suggestions on how I should approach this?

Hmmmm.

 

  1. Paramedics dump patient onto bed
  2. The patient is "PutInBase" so that feeplay counts it as completed
  3. A new but separate instance of the person is created on the bed. It will basically be a carbon copy of the patient that was deleted by freeplay.
  4. A timer will determine how long they will be there until the script revives then
  5. After they are revived, they are sent to a random person path going off the map.

Itchers idea is quite good. Instead of the carbon copy, you can also just show a generic model laying under the bed sheets. Kinda like how the person on the stretcher is generic too. What if all beds are taken? What alternative do you have then? Think about that too.

If the beds are full, could you do it so the Ambulance crew have to wait until there is a bed? Means having to cope with ambulances delayed as well...

Sent from my SM-G901F using Tapatalk

The idea where they go as a default model actually works pretty good. Have the person disappear and the bed take a health status then, until a certain point, where the bed turns back to empty, and the person goes back to a random path. 

 

Stalling ambulances could be a problem though, since that requires them to basically wait. I don't know the rest of the world, but protocol here is when one hospital is full, we send to one of the others. So there could be a check when you issue the command to see if there are any free beds, and if there are not, for the vehicle to leave the map to go to off map hospital? Have it respawn and return to base a couple minutes later perhaps

Basically it depends on the approach of how you want to handle it, in most instances once the person is dumped at the hospital (meaning put in a hospital bed, the ambulance crew's job is done, so until such a time they're still technically on the callout).

 

Everything itch suggested works perfectly fine in so far as when they arrive in the bed, but as was said by the others what if the hospital's er is full-up?  Well, in that case the emt's quite honestly just sit around with said victim 'till the ER staff finds an opening for them to ditch the patient into... So people who arent critical (or don't appear critical) have to sit on the stretcher with very pissed off emt's standing around waiting for someone in the staff of the ER to open up a bed for them.  Basically you would have to take into account the "triage" nature of how ER's run (they usually have "reserved" rooms for critical patients (adult code and pediatric code for example) so they can leap on them immediately.. Outside of those scenarios they allow the rest to be triaged and have to wait.  If a patient is only extremely minor in injuries it is not at all uncommon for the ER staff to have the paramedics offload them to the waiting-to-be-seen area where they're in line.

 

Basically you have to have them come in, check patient health if below say 30% they put em into the code room (which has a faster heal rate than the others just for the sake of in the game not having ppl die waiting because they're critical). between 31% and 70% goes into a normal "hold" in the intake area for ambulances till a bed opens up, the final lot that is 71% or above would have to be offloaded from the stretcher and go into the waiting area like all the rest the walk-ins.. Since the new person is basically fake and not really the injured person, it is not a problem to make them have to walk to the waiting area, every once in a while though (every couple minutes) you would have to run a "check" on all the patients in the hospital to ensure they're not going critical, and if they are to obviously move them back.

 

@ NFK hospitals basically have to broadcast they're not accepting patients at that time, for the sake of the mod there wouldnt be two hospitals on the map unlike real cities where there are, so the only way to handle it on-map is how i've described (which frighteningly happens more than one would like to realize).

That would work too. In reality here, hospitals being full has never really been an issue I've come across but yeah, we would divert.

We do have hospital delays and ambulances stuck at hospital for fairly lengthy times, but that is more due to delays handing patients over etc.

Sent from my SM-G901F using Tapatalk

When they're literally shit outta space in hospitals and dangerously backed up they tell the ambo's "nope we're not accepting divert to alternative location"... Outside of that it's quite common to have them stack-up since the medical crews cannot "rush" the ER staff to expedite the drop-off process of the patient.  I know first hand as I've had to wait in the hallway with two very pissed off medics who were none too pleased having me rot because the staff didnt care to get off their asses.  Sad when the medics feel compelled to apologize to you for the incompetency of the ER.

 

But as I said for the sake of the gameplay because we don't have multiple instances of hospitals available (and frankly cannot afford the space to do such a thing) it's probably best to just do the triage wait and hold.

  • Author

I would go for what random suggested and have them go off map. But my plan is to have 3 beds in the clinic for the town and 8 beds for the hospital. In my experience you won't even have that many ambulances in play so the ambulance waiting game is not really a problem

Well here we don't have private hospitals, it's all the same network, so they divert quite frequently. You might be going to HSC when the call comes in, and by the time you load up, you're going to St. Clare's. 

 

My question, is would the triage type script overload the system? Regular checks could cause lag, wouldn't it?

 

Thing is though, if there's 11 beds, unless they heal really fast, they can back up real quick. A four vehicle accident has at least four people going in. Blow up a fire truck, and now you have another 6. Doesn't take long to screw the pooch if you're not careful

@ Dave merica most the hosptials are very much private (part of networks yes but usually there are 2-3 competing networks in the area).  So diversions do kinda=lost money,  In the many times I've been thru the system superstorm sandy was a diversion due to the state of emergency in play, and around 4 other times when one was that backed up.

 

Triage type script wouldnt check nearly as often as other ones do so the lag would be minimal, esp considering the limited spaces it has to run through the check.  It isnt just the frequency of a check but also the number of variables it has to check that induce lag.  In an instance of 1500 hospital rooms oh yes it'd screw it up, but in a case of maybe 8 regular beds 4 critical beds I don't believe it would. esp considering it's checking for occupancy of our dummy patient, not the actual random ppl.

 

Running it off map, if you want to be realistic about it, you'd have to basically "hold" the ambo hostage for a set time before allowing it to return to the map, that in of its self would probably put the same load on the game as the triage.  Ultimately though since its a rural map, i cannot say how they'd handle it, since I've never lived that far off the grid.

  • Author

If it is critical then they would be flown using a helicopter from the scene or the hospital. It could force the players to utilize the helicopters more. I rarely use them when gaming because it is not as efficient as an ambulance. But if the hospital would back up you could utilize maybe a off map transport service like amr.

That could be something actually you could do. 

 

If you have it launch an event, similar to the "automatic alarm triggered" from the fire alarm script, whenever the hospital is full, and you need to transfer someone from the hospital iin an AMR or whatever to off map. That could work well actually.

  • Author

I am looking at this from an ems standpoint. Ems is a big part of our player base but it can get very boring. Just load and go. And not much you can do on the treatment side. I think triage and hospital style game play could add something new that hasn't been done before. Isn't that what our mod team is about?

Triage is something I already have kinda planned in my head.

 

80% health = green

50% = yellow

30% = red

dead = black

 

This triage system would be fairly easy to script. Simply "check" each victim and then give them some kind of marker to indicate in how much trouble they are. Next time a doctor gets to them and their health decreases, their status will be downgraded. On the filipside, if their health increases, they can be upgraded into green and then ready to transport.

 

For the hospital problem, the only way I can think of is that when the hospital is full, either send them off map, or do this:

Once the script indicates all beds are full, it will just go back to the first one and delete the patient on that bed and replace him with a new one. This is a concept I already had planned for my LA mod, but due to my inability to model an entire hospital, it never came through. We should really collaborate on this and share ideas, concepts and code.

  • Author

I can do all of the modeling but I the proper code eludes me

I can do all of the modeling but I the proper code eludes me

I can think of 3 ways in code it can be done, but I'm gonna pseudocode it, not actual code.

  1. MoveTo hospital bed VO
  2. PutInBase the patient so the callout is completed
  3. Script creates generic person in bed
  4. Script waits 2 real life minutes, then discharges person
  5. It does this by creating a "new" person at the side of the bed
  6. The generic person on the bed is deleted.
  7. Person is sent on path off map then buh bye

In case of overfilling

  1. Insert the following steps at Step 2 above
  2. Script deletes the existing generic person
  3. PutInBase the victim to complete the callout
  4. Creates new generic person
  5. The rest is the same.

In terms of the triage side of it...the thing I always suggested to add a little realism (going by UK, assuming similar in US) is to have different levels of health care professional. So the green could be treated by say your BLS guys, yellow would require ALS medics to treat, red could require advanced interventions so HEMS or Advanced/Critical Care Medics (or a Doc from somewhere if you have pre hospital Doctors?) . Anything below the required skill level can then only stabilise.

That's how I pictured how I would have done something like that, but then I'm not a scripter, so I don't know ow how easy it would be to implement.

Sent from my SM-G901F using Tapatalk

In terms of the triage side of it...the thing I always suggested to add a little realism (going by UK, assuming similar in US) is to have different levels of health care professional. So the green could be treated by say your BLS guys, yellow would require ALS medics to treat, red could require advanced interventions so HEMS or Advanced/Critical Care Medics. Anything below the required skill level can then only stabilise.

That's how I pictured how I would have done something like that, but then I'm not a scripter, so I don't know ow how easy it would be to implement.

Sent from my SM-G901F using Tapatalk

Idk how it works either. I'm only basing on what I learned during our mandatory military training. It might be different here than in other countries obviously, so its gonna be up to hellijumper to decide wat system he wasnts to use.

  • Author

So levels in US would be thus(Simplified). Stabilize means stop the counter from going down.

 

EMT-Green+Stabalize

Paramedics-Yellow+Stabalize

Flight Medics/ER Doctors/Tactical Medics/ER PA's-Red


I would be glad to work with someone and input it in their mods as well, I can start on a hospital suite with ER and such with modeling and UV Mapping. Like I said, I am no scripter by any means.

I can tell you how UK systems work in terms of all that, even some of the differences between various areas. The system I described is essentially how it works here, ECA/EMT - Paramedic - CCP/ECP/PP/HEMS Para - BASICS/HEMS Doctor.

I just have no experience whatsoever of American systems.

Edit: Helljumper, yeah pretty much that. I don't think that has been properly implemented before, and would definitely add some extra realism in terms of the EMS side. Would also require proper use of resources!

Sent from my SM-G901F using Tapatalk

So levels in US would be thus(Simplified). Stabilize means stop the counter from going down.

 

EMT-Green+Stabalize

Paramedics-Yellow+Stabalize

Flight Medics/ER Doctors/Tactical Medics/ER PA's-Red

That can be done fairly easilly. I'm hoping every mod we release could have this functionality. Would a greater dimension to gameplay.

 

You'd have to make script checks to see who is healing what kind of injured person. If their medic level is not high enough, then there is nothing that can be done by that person.

  • Author

I always found when I played online with other that being ems sucked. You were a transport place. That's when I decided that all th see mods with 400 vehicles and 10 stations just got boring because at any given fire just send all of them. But if you had 1 to 3 stations and a mix of resources it was a challenge and made it fun..

A pet idea of mine was to make a multilayer map with 1 firestation and 4 vehicles. Each person is in charge of 1 vehicle and they try and see how long they last together using teamwork....or a dispatcher if that is used.

Yeah, I agree. I've always been somewhat disappointed by the EMS side of things lacking compared to the other services. But then I am slightly biased!

Sent from my SM-G901F using Tapatalk

  • 1 month later...

Just a quick question for the scipters, slightly related to this...

 

It seems that having 2 hospitals on the map doesn't work. Anyone got any suggestions for a workaround to make a second on map hospital possible?

Just a quick question for the scipters, slightly related to this...

 

It seems that having 2 hospitals on the map doesn't work. Anyone got any suggestions for a workaround to make a second on map hospital possible?

Having to duplicate the virtual objects, and then setting up various conditions for the ambulance to choose the nearest hospital.

 

You'd have to detect if the ambulance is at hospital one, or two, and use the correct virtual objects for correct function. Its do-able.

Guest
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.