Jump to content
KC Grimes

Grimes Simple Revive Script

Recommended Posts

Ok so I have a question. I have a script that currently spawns my vehicles with the VAS script so that I have unlimited C4 charges if needed. Currently when I start a mission everything works great. I can deploy the vehicles as mobile spawns, but as soon as one dies it wont let me use as a respawn point. I belive my script is taking over and repawning them before your can. Is there a place in your script I can add a Init script to the vehicle after it respawns? I need to add this line to the vehicles when they respawn _this addAction ["<t color='#ff1111'>Virtual Ammobox</t>","VAS\open.sqf"

Edited

Also Mobile respawn vehicles are not respawning for me I have names in place and deploy and undeploy work fine they just dont respawn after being destroyed.

Edited by mech79

Share this post


Link to post
Share on other sites

How are you broadcasting animations?

I am working on stabilizing my medical system (heavily modified BTC revive) for release, and encountering some animations that aren't being sent to other players.

Any tips re getting animations to sync?

example:

occurring on client:

player approaches field hospital

player actions AI doctor

player is switchMove to prone and attachTo the table (server then comes in and takes care of the doctor animations/medical variables)

the switchMove is not shown to an observer, and the observer sees the player standing up until the playMove animation after detached.

---------- Post added at 17:48 ---------- Previous post was at 17:40 ----------

Ok so I have a question. I have a script that currently spawns my vehicles with the VAS script so that I have unlimited C4 charges if needed. Currently when I start a mission everything works great. I can deploy the vehicles as mobile spawns, but as soon as one dies it wont let me use as a respawn point. I belive my script is taking over and repawning them before your can. Is there a place in your script I can add a Init script to the vehicle after it respawns? I need to add this line to the vehicles when they respawn _this addAction ["<t color='#ff1111'>Virtual Ammobox</t>","VAS\open.sqf"

Edited

Also Mobile respawn vehicles are not respawning for me I have names in place and deploy and undeploy work fine they just dont respawn after being destroyed.

You need a vehicle respawn manager ... If you put a line in the Editor init field of a vehicle, it will only apply to that vehicle. If that vehicle dies, it's gone. The respawned vehicle is a new vehicle, a clone. You need something to execute on that vehicle, and perhaps also something to broadcast that code to JIP players. Two ways to do it ... The hard way is with getVariable/setVariable .. the Easy way is using BIS_fnc_MP ... something like this:

on the respawned vehicle, named _veh:

[[_veh,mech79_fnc_addActionVAS],nil,true] spawn BIS_fnc_MP

inside mech79_fnc_addActionVAS function:

_this addAction ["<t color='#ff1111'>Virtual Ammobox</t>","VAS\open.sqf"];

That is only a basic outline. It will execute that function on the target vehicle.

...

The third option is a HandleDamage event handler to prevent the vehicle from being destroyed, keeping the first vehicle alive with its addAction intact.

Share this post


Link to post
Share on other sites

I currently use a script that looks like this; fnc_vehAction2 =

{

_this addAction ["<t color=#ff1111'>Virtual Ammobox</t>","VAS\open.sqf",

nil, 1, false, true, "",

"alive _this && {speed _this == 0}];

publicVariable "fnc_vehAction2";

};

if (!isServer) exitWith {};

_vehicle = _this;

_vehiclepos = getPos _vehicle;

_vehicledir = getDir _vehicle;

_classname = typeOf _vehicle;

// Add vehicle actions

_vehAction2 = [_vehicle,"fnc_vehAction2",nil,true] spawn BIS_fnc_MP;

waitUntil{!alive _vehicle};

sleep 5;

deleteVehicle _this;

sleep 5;

_vehicle = _classname createVehicle _vehiclepos;

_vehicle setPos _vehiclepos;

_vehicle setDir _vehicledir;

_vehicle execVM "scripts\vehicleInit.sqf";

It respawns the vehicles as a VAS but does not respawn with ability to deploy mobile respawn as Grimes has set up. Problem is that without this script the vehicles don't respawn because the original Revive script doesn't respawn the vehicles either. I cant figure out why either.

Share this post


Link to post
Share on other sites

Ok so this has just started happening and I am not sure if it is due to the recent update, but even with G_Init_Start = 0; I am still starting the mission at the respawn postition and not the editor position that I placed the player to start.

Share this post


Link to post
Share on other sites

Great work!

As everybody, i'm very impatient to see AIs are able to reviving player or each other...

Share this post


Link to post
Share on other sites
Great work!

As everybody, i'm very impatient to see AIs are able to reviving player or each other...

This is certainly possible however would advise against it for 'big' missions with many players and AI.

Reason is you would likely have to add an EventHandler (ie handle damage) to every single AI that you want to be covered under this medical system.

That will create a very large performance drain.

It is not so big a deal on players, because each players machine only has to do the constant calculations for one event handler.

If its on AI, then the server CPU has to do the constant calcs for each AI.

Share this post


Link to post
Share on other sites

Hello everyone,

I use Grimes simple script(thank to Grimes for this super script) in my mission and i have saw a bug, when you are unconscious and a teammate revive you, you can press escape and you are immediately revive, for the reviver the script say the revive is abort and for the people revive the script say revive is complete.

Sorry for english mystakes.

Share this post


Link to post
Share on other sites

Trying to use this for single player, I can revive (some) AI units but they don't seem to come and revive me (although I get the timer) when I go down. I couldn't find mention of AI reviving the player, is this a feature just yet? If so, any ideas what I'm not doing correctly? The main characters faction in the game is Independant if that is of relevance :) I've tried this with BLUFOR and Independant but no others. Also, trying it by simply grenading myself, as opposed to having an enemy ai kill me, if that makes a difference.

Share this post


Link to post
Share on other sites

Howdy grimes.

First of all i'd like to join the long red carpet list of virtual handshakes and congrats you on this fantastic job on it. Kudos.

I have a question regarding it and I am not sure whether I am doing something wrong or if its the script that is intended to work that way.

Ive rigged the script to a zeus platformed mission and i've noticed that after a player dies and respawns they become civilian (their icon turns purple). I also get an error after dying saying "resource g_revive_dialogue not found". Am I doing something wrong? And if so- what is it? And how can I fix this issue?

Share this post


Link to post
Share on other sites
Great work!

As everybody, i'm very impatient to see AIs are able to reviving player or each other...

Indeed. I hope Mr. Grimes some day has the time, and desire, to implement this. Would be wonderful for those of us who spend our time playing offline solo.

Share this post


Link to post
Share on other sites

Hey Grimes, I've been toying with your scripts for a few days now, and I really like them. Easily the most professional looking part of my mission so far. However; I've found two issues.

1. The load into vehicle option doesn't load the unconscious into the vehicle, but it shows the option to unload them from the nearest veh after you've hit the action. Its weird, everything works right with the exception of the character model going into the vehicle.

2. What is the best method you would suggest using MenuInventory and MenuPosition templates in your scripts?

Thanks in advance!

EDIT:

I'm testing on a locally hosted dedicated box, using AI for testing alone atm.

Share this post


Link to post
Share on other sites

Can someone help me with a few things, first of all in the editor it shows MRV marker on my mobile respawns as they should, but this doesn't show up on my gamingdeluxe server, so its hard to find car after I leave it whys that? do I have change those top lines that are in the init?

Secondly sometimes when I go to revive my team mates the option is not there, are any of these known and fixable?

Thx for your time

Share this post


Link to post
Share on other sites

What would be nice if there was a way to make headshots an instant death with no revive just have to respawn.

Share this post


Link to post
Share on other sites

Thanks , great script .

Running perfectly on dedicated .

Share this post


Link to post
Share on other sites

I am excited to see that this script is still being well used and liked. I apologize for neglecting this thread. I've been working a whole lot of overtime in an ER over this summer, and that has kept me plenty busy. I haven't done much gaming at all this summer unfortunately. Anyway, school is starting up next week, so hopefully that will result in things slowing down and me finding some time to get some more work done on this script.

Thanks again for all of your contributions, keep them coming. I'm here, I just can't get it done yet. Soon, trademark.

Share this post


Link to post
Share on other sites
;2760171']I am excited to see that this script is still being well used and liked. I apologize for neglecting this thread. I've been working a whole lot of overtime in an ER over this summer' date=' and that has kept me plenty busy. I haven't done much gaming at all this summer unfortunately. Anyway, school is starting up next week, so hopefully that will result in things slowing down and me finding some time to get some more work done on this script.

Thanks again for all of your contributions, keep them coming. I'm here, I just can't get it done yet. Soon, trademark.[/quote']

Nice to read you again here.

Take the time you need.

Share this post


Link to post
Share on other sites

Hi, I am late to the party since I just started using this. Grimes you seem busy so take your time but I read awhile back you were planning on adding the ability for the AI to revive you and each other. Is that still a possibility?

Edited by EazyE

Share this post


Link to post
Share on other sites

This does not work.

I have followed instructions to the letter.

I have put this into my mission folder along with the init.sqm and description files.

All that happens when trying to test is my squad keeps respawning when killed with no revive option and when I die there is still no revive option. ://

Share this post


Link to post
Share on other sites
I have put this into my mission folder along with the init.sqm and description files.

If you've an init.sqm that could possibly be causing the script not to work. Try renaming the file to init.sqf .

Share this post


Link to post
Share on other sites

Hey Grimes,

I was off Arma for a while but we recently got back to it, and have starting using your script in Dedi. It works now, even in the presence of some mods (previous errors reported with TaskForceRadio were my fault: forgot to add respawn markers).

Usually we encounter the situation that players die right away, bypassing uncounsciousness (and thus the chance to be revived) and going directly to the respawn screen. This is not always the case, but it happens often enough.

Is this on purpose or is the script failing to execute correctly? If it is a feature, how can I deactivate/change it?

Basically, I'd like our players to respawn only if absolutely necessary, e.g. if they're killed too far away from other players, but I'd like them to be revived whenever possible.

Anyway, thanks a lot!

Edited by doktorflan

Share this post


Link to post
Share on other sites

Dapman A3 works great with the AI. Just follow my instructions how to get it to work from the thread (:

Share this post


Link to post
Share on other sites

Still looking for a script that will allow AI to revive themselves. Anything on the horizon ?

Share this post


Link to post
Share on other sites

The revive script works fine in my single player missions and when testing it on the editor, but every time I export a file to my multiplayer missions and try and host a server the game freezes on the loading screen. Anyone know what i might be doing wrong or need to change?

Edit:- Problem solved, Turns out I just needed to save the mission file to both SP and MP folder... no idea why but at least its working now.

Edited by Cerb85
FIXED

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

×