Jump to content
Sign in to follow this  
demonized

Automated Medic [SCRIPT]

Recommended Posts

Incredible work :) I was going to post about a medic stop bug but it seems that I'm already a couple of versions behind ;)

I like it.

Share this post


Link to post
Share on other sites

I've been trying to get this to work with VTS (where you can spawn units on the fly). I found that only the FULL AUTO works however - but that is probably because as GameMaster I start without any units attached to me, until I join them. Of course as I have already spawned I cant re-init myself!

However, with the full auto, I spawn a medic with the FULL AUTO, then join it onto me, and any other units as well, and ALL units want to be healers :)

I have noticed that when this happens EVERY unit wants to go to the hurt person! The 'in reach' hint I have removed, as it was annoying :)

Great work mate !

Do you think there is anyway to check for groups that group leaders (AI or human) so that they get the actions even after initial init ?

Edited by Kremator

Share this post


Link to post
Share on other sites

Hi Demonized

Thanks for all your work on this. Quick question:

I don't know if its possible - but if compiled into a mission (i.e. as a .pbo for release) currently there would seem to be be no way to change the options as these need to be done by editing the script. Would it be feasible to use a .hpp or other config file?

Cheers

Orca

Share this post


Link to post
Share on other sites

@Kremator the hint was just something i forgot to delete when creating/testing, it should not be present in v 1.13.

did i miss it again before release? X)

ill look more into spawning groups and function and actions, the important thing i think is that the unit has the player as leader before the script is run on him.

maybe i can add in a cansel script part, if used in AI group and then it can be rerun when player joins group or something.

@Orcinus

dont know about the .hpp or config files.

but would be a whole lot easier publishing your mission as unpacked folder (as saved in my documents\........) if the reciever should be able to change options, then he can just open the script and change whatever and save his mission as pbo.

Or you decide what is the best for your mission.

there is also the MP select daytime ext options from mission start menu.

For future updates i will look into adding variables to the unit to activate/deactivate options, and use different values for specific units, like some units in one group uses mash function, player group medic1 does not etc.

Share this post


Link to post
Share on other sites

Cool mate! Thanks.

EDIT: Ooooh just noticed that I turned into a Chief Warrant Officer .... go me :)

Share this post


Link to post
Share on other sites

Using the latest version I noted a couple of occasions where my medic apparently left the vehicle autonomously without me noticing (either just after he boarded, or when I stopped to read the map) and legged it off somewhere. I presume he was off to aid some injured guy somewhere but I don't know if this activity is by design.

Share this post


Link to post
Share on other sites

ah yes, ive not implemented any if in vehicle checks so that would probably be it :D

i asumed the AI could not eject by himself if he was inside a vehicle.

He should only auto heal any units in his own group, for units outside of group you need him to be an actual medic, and order him yourself.

i never tested with AI inside a vehilce, will look into that and add failsafes for if in a vehicle if my script is the issue.

---------- Post added at 12:51 AM ---------- Previous post was at 12:47 AM ----------

@DMarkwick

the obvious question i should have asked right away:

did the medic run towards any group member?

i just asumed no, since you did not specify and it seemed to me you meant he was just running away..

Edit: using fullAuto option makes medic eject vehicle on his own, wich can be somewhat messy even if it should be auto.

i will fix that.

Edited by Demonized

Share this post


Link to post
Share on other sites
the obvious question i should have asked right away:

did the medic run towards any group member?

i just asumed no, since you did not specify and it seemed to me you meant he was just running away..

When I eventually noticed he was gone, he was running away :) obviously I can't know what he was running toward, or why, only that he was doing something apparently outside of the squad's interest. The thing he was running toward was not close either, there was no obvious destination but there were units toward that direction far away.

Share this post


Link to post
Share on other sites
Automated medic v 1.13

updated to v 1.13 - 15 July 2011

OA required as discovered by a Arma 2 only user.

/QUOTE]

Hi Demonized

Upgraded to CO this weekend - woohoo! It works great, thank you. Using option 1 (CloseWounded) seems to suit my style of play best, but will explore all the other options as well.

CO is so much better than A2 alone, but having this script working is itself reason enough to upgrade (hint to other A2-only laggards - you don't know how much you're missing).

:cheers:

Orcinus

Share this post


Link to post
Share on other sites

Seems like a great idea, I'm going to try that tonight :)

Share this post


Link to post
Share on other sites

Sorry to bring this old post up but I have been trying to get the script to work for MP after the SL respawn back after being killed. Does anyone know this can work after respawn of a playable unit. The script works great but after you die it will not work for that SL. Any imput would be great. Avibird

Share this post


Link to post
Share on other sites

I have being trying to get this script to work after a player respawns

player addEventHandler ["killed",

{

[] spawn {

waitUntil { alive player }; // waitUntil player has respawned

null = [this,"closeMedic"] execVM "medicAuto.sqf";

Am I looking in the right direction to make this work again after a player gets killed.

Share this post


Link to post
Share on other sites

Could someone please tell me if this is possiable to get this script to work with respawns. I have put many hrs into it and still have no clue why I can't get it to work after a player is killed

Share this post


Link to post
Share on other sites

AVIBIRD 1, the killed eventhandler can return the killed (_this select 0), or killer(_this select 1).

Try your script with: _this select 0

And check for missing braces/brackets...

What are you using for respawn script, as this should be implemented into the respawn?

Is this for MP? If so, maybe the use of MP eventhandler "MPRespawn"?

player addMPEventHandler ["MPRespawn", {Null = [_this select 0,"closeMedic"] execVM "medicAuto.sqf";}];

Edited by panther42

Share this post


Link to post
Share on other sites

Hi Demonized

Great script. When I found it I thought " Aha! this is what I was looking for our squad's base Hospital!.

We are playing ACE MSO with option that only medics can apply medkits. The Idea was to plant the medic in the base's hospital and leave it there to assist anyone who needed medical assistance, specially for those who get separated of the main squad got broken legs and could not walk. (eg. In case someone was medevaced to the hospital and could not walk, the AI medic would rush to the helipad next to the hurt guy (regardless of the squad he is in) and perform a full healing.) ... Yes, I know that anyone can drag himself to the hospital, get a medkit and apply it himself while he is inside the place. But we wanted to add some more inmersion.

We tried, with "full auto" and unfortunately it is not working as we hoped. Most of the time the medic ignores the injured players. Some other times the medic rushes to meet the guy but does nothing. And in a few (very few ocassions), the medic actually cures the guy. Still trying to understand why sometimes does work and some others doesn't.

The main thing, is that the medic needs to be attached to a specific squad to be effective, and we are planting it on the base, by itself, unlinked to any group. Expecting it to run in a different way from what it was designed to.

I looked into the sqf, but i can't understand most of it. (the other day i grinned like a wolf when after a LOT of unskilled search I was able to make a trigger to animate the base barrier, go figure )

I do not know if that would be possible at all in the current envelope of your existing mod, but could you consider to create a fourth option in your mod, so the medic could be placed in a fixed position (like a base hospital), detect -regardless of the squad- injured people at a due distance (maxdist) arround a fixed fallback marker placed in the hospital, and rush to their aid?, or perhaps when players are within a certain distance of the hospital, an action is enabled to the player to call for the medic (addaction with a trigger?) so the medic rush to his position and heal him. After the action, the medic would return to his fallback marker in the hospital.

Otherwise, I would appreciate help in making a standalone mod to get a hospital medic.

Edited by CC_Kronus

Share this post


Link to post
Share on other sites

Hey cc kronus demonized has not be around on the forums for a while. Hope you get the issue workout and if you do post the results AVIBIRD take care.

Share this post


Link to post
Share on other sites
Hey cc kronus demonized has not be around on the forums for a while.

Not correct if you look at his profile, though he may not be monitoring this thread. Try a PM.

Agree this is a great script (at least in SP, haven't tried MP).

Cheers

Orc

Share this post


Link to post
Share on other sites
Not correct if you look at his profile, though he may not be monitoring this thread. Try a PM.

Agree this is a great script (at least in SP, haven't tried MP).

Cheers

Orc

You are definitely wrong about that he has not been on since last March however today was his first activity since then we should be so lucky for him to become active again he is a great help to this community and in making scripts for us. I did pm him and hopefully he is back.

Edited by AVIBIRD 1

Share this post


Link to post
Share on other sites
You are definitely wrong about that he has not been on since last March however today was his first activity since then we should be so lucky for him to become active again he is a great help to this community and in making scripts for us. I did pm him and hopefully he is back.

No mate, I was not wrong :)

I saw Demonized had been on yesterday 'cos I checked his profile, last visit was earlier in the day. He came back at least once thereafter (10:03 pm).

Delighted to say that he left a visitor message on his page on Jan 16 announcing his return & intention to update his scripts. I love Automedic :D

Cheers

Orc

Share this post


Link to post
Share on other sites
Hey cc kronus demonized has not be around on the forums for a while. Hope you get the issue workout and if you do post the results AVIBIRD take care.

well, got it sorted out but without this script.

look here

http://forums.bistudio.com/showthread.php?93523-Corpsman-with-heal-trigger&p=1541118&viewfull=1#post1541118

just what I needed for a medic in the hospital at base.

Share this post


Link to post
Share on other sites

Hello gentlemen of the fourms. I have been trying ot test out this script getting it ready to add to a dedicated server. However I cant for the life of me figure out what you mean by "fallback" for the mash set up. Can someone explain to me how to get the mash function to work. As it seems theres no such squad command as fallback.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×