Jump to content
Sign in to follow this  
norrin

Revive Script

Recommended Posts

Hey Norrin, I just wanted to say thanks. Your script magic has solved all my respawn worries. I hope no serious problems arise in the future.. for the time being, everything works fine.

One question though... Right now, I am using all four of your original respawn points. (mobile tent, insertion, chopper and the carrier which I transfered on land and renamed it base). I assume I can remove some of them as long as I remove the map markers and their respective entries from the revive_init.sqf.

Is that how it works, good sire?

Share this post


Link to post
Share on other sites

You are correct.

If you do not need one in particular, simply remove that entry from the revive_init.sqf, looks like this:

_Base_1 	=  "Mobile";
_Base_2 	=  "FOB Rainmaker";	
_Base_3 	=  "";
_Base_4 	=  "";

Be sure to leave the quotes. Hence example ;)

Gnome

Share this post


Link to post
Share on other sites

Norrin

I put this in the GL4 topic for Snkman to look at. I will just repost it here. You maybe be better able to shed some light on what is happening.

Think I have found a problem with GL4 and Norrins revive. I will try and explain what it is, it is a bit complicated.

I first found this problem trying to use VFAI and norrins revive together. What happens is, when the player dies, for a split second they are moved to the "respawn_west" marker and they drop their equipped gear and go back to whatever gear they originally started with. Then the player drops dead and rolls around waiting for a revive/respawn. The problem is now they are at the respawn_west marker and not where they were killed. This problem happens all the time when I try using VFAI. I do not use VFAI because of this.

How this ties into GL4. Since the last update this exact problem has started happening. It is not as consistent, but it happens enough that it has broken a few of my missions. I have been testing all kinds of different setups , using different mods, scripts etc etc. I found that if I turn off the Player/Friendly AI enhancement this problem goes away. The only thing I can think is it has something to do with the friendly AI rearm ,but I maybe wrong. I just know it really screws up missions. I will post this in Norrins Revive also.

I will continue to try and narrow this down. It may also have something to do with ACE, I am really not sure.

I thought I would throw this out here and see if anyone else has had this problem. I have searched but have not found any posts regarding this particular problem.

Nomadd

Share this post


Link to post
Share on other sites

Sorry for a stupid question but does this work for Opfor and if so does it only require changing parts of revive_intit.sqf.

Ive quickly searched all 46 pages and only came up with these references below that dont really answer my question, also the read me doesn't mention any setup for east, admittedlyi have just skimmed over it.

http://forums.bistudio.com/showpost.php?p=1546539&postcount=391

http://forums.bistudio.com/showpost.php?p=1390573&postcount=139

http://forums.bistudio.com/showpost.php?p=1364233&postcount=98

Share this post


Link to post
Share on other sites

Can anyone tell me if the enemy ai throw smoke to cover themselves when they move to revive downed teamates? The friendly ai throw smoke to cover themselves but the enemy (EAST & GUER) dont seem to even though I have equipped them all with smoke grenades.

Thanks in advance for any help

Share this post


Link to post
Share on other sites

Doodle, I don't believe that the Revive Script covers AI in a group NOT led by a player. I was experimenting with this a few weeks back and did pose a similar question in this thread (no one has got back to me as yet). Basically I wanted the entire Platoon I was leading via HC to use Revive but despite placing all the correct names in the Revive_Init it only ever worked for my group . I think that the AI will only use smoke (or any other features of the package for that matter), if you are the groups leader so it wouldn't work for anyone else irrespective of side. Could someone else confirm?

Share this post


Link to post
Share on other sites
Doodle, I don't believe that the Revive Script covers AI in a group NOT led by a player. I was experimenting with this a few weeks back and did pose a similar question in this thread (no one has got back to me as yet). Basically I wanted the entire Platoon I was leading via HC to use Revive but despite placing all the correct names in the Revive_Init it only ever worked for my group . I think that the AI will only use smoke (or any other features of the package for that matter), if you are the groups leader so it wouldn't work for anyone else irrespective of side. Could someone else confirm?

Thanks for the reply - I am trying to make a small 4 man mission against EAST. The ai in my squad throw smoke ok and I have managed to get them to throw different coloured smoke depending who it is. I would like the enemy ai to also throw smoke and revive themselves but I just cant get it working.

Maybe you are right Joe and the enemy ai are unable to throw smoke. I am sure there must be a way of getting to ai to throw smoke or drop a smoke grenade when they are killed even if they cant use the revive option.

Anyone know what I would have to put in a soldiers init to do something like.

if unit is killed create smoke grenade at position of death

Its more for atmosphere rather than the ability to revivie though that would be a nice option.

Share this post


Link to post
Share on other sites

Doodle, not sure how your scripting skills are but I don't think it would be massivley difficult. It depends on if characters 'exist' on death, which i'm not sure about. If they do you could write a brief script that states if units in this list not alive create smoke grenade on their position. The commands you would need would be (I think):

getdamage - to determine the level of damage on each unit.

getpos - to determine the location of the fallen unit.

createvehicle - to spawn the smoke.

You would need to run this script on mission initialisation I think due to the commands used. You wouldn't be able to just chuck some stuff in each units 'on initialisation' (and that would translate to running many scripts instead of just one that would possibly kill your frame rates).

I'm also extremely new to scripting but I will see if this works tommorow. Its entirely dependent on the big Q of if corpses 'exist' as I said above. No doubt one of the scripting ninja's round here will be able to give you a firmer idea of what to do and how to do it.

Share this post


Link to post
Share on other sites

Dont know if this is of any use to anyone but I did manage to get the enemy to drop smoke when they get killed by adding this to the units "initilization" I am sure there is a better way of doing this but my script/editing skills are not good :-(

Militia_Solider_1 addEventHandler ["killed", {f1="SmokeShellBlue" createVehicle [getPos Militia_Solider_1 select 0,getPos Militia_Solider_1 select 1, 1];}]

Change the Militia_Solider_1 to the name of your unit

The unit does not need to have a smoke grenade in his inventory for this to work.

Share this post


Link to post
Share on other sites

Cheers Doodle, i'll certainly use this. Love it when people post little snippets like this, it means I can build a bit of a library to look at when i'm trying to solve a problem.

Share this post


Link to post
Share on other sites

yo guys..i have 2 questions :

1. - i had an ace mission, i put the revive script into the mission..only thing i edited yet was the player names in revive_init (s1...s10) because its c010..reviving works now..i put markers in the editor (marker="west_respawn" the logic=server boot..center..all the stuff named like that in readme pdf) far away from the squad with playable units,because i've read in here, that it has to be away like 200m.i had that black screen when i came in,like another guy posted here, saying my player is not able to be revived,so it was too close to units i guess...description and stuff is in my mission folder...when ai dies now, they spawn at "west respawn" marker, i put on the map in editor..

-is it possible to make em respawn at the insertion where mission started and not on that "west respawn"? so when revive time is up? and also for players, so humans can respawn there, how do i add another spawnpoint? i tried to put the mobile respawn on the field via action menu and died, i was able to respawn there,so that works..

2. after putting revive in, i cannot shoulder my m16acog and take a 2. one like m4 or sth. , it is not possible anymore..do i have to add some kind of code-line into the init files, to be able to put gun on my shoulder again?

EDIT: ok only the marker story..i found the problem for question 2. , i put the ace-no-stamina module in the editor, for some reason, after that i can't put the gun on the shoulder.so that was the prob.. but still help for the markers needed :)

sry for these noob questions, but i wanna learn its awesome..thx for that script norrin..

Edited by [EC]M.O.R

Share this post


Link to post
Share on other sites

I am having problems with this revive. I really want this in my mission. I have went through the pdf 3 times now. I dont know what I am missing.

I think its in the markers somewhere. I put the west_revive, logic, center, and boot_hill markers in my mission. I also added one at the base called FOB. In my revive init i put:

_no_respawn_points = 1;

_Base_1 = "FOB";

Sorry dont know how to put it in code like the other shown in the thread. It seems like some of it is working. When I click on respawn my guy is on the ground yelling and I get the respawn dialog but no option to respawn. I also named all of my soilders.

This is my first mission and I really want the revive in it. If anyone can help I posted my mission below. Take a look at it and see what you can find. Im sure there is errors in that mission file as I have been trying everything to get this to work.

http://www.mediafire.com/file/tyogmdyeakg/AllenDesert.GNT_Sands.pbo

---------- Post added at 12:58 AM ---------- Previous post was Yesterday at 11:52 PM ----------

OH my. Well after posting I decided to give it one more try. I was only trying to get a spawn point at base. So I was skipping the mobile spawn section.

5th time was a charm. Its working now. I feel like an idiot

Share this post


Link to post
Share on other sites

I have a question that will most likely make me sound like an idiot, but here it goes..

How do I disable all "mobile" respawns? I don't want to have this as a respawn option, if someone dies and they aren't revived in 5 min they should be a bird for not sticking with their team.

*edit* Ah, it's the _mobile_spawn option incase someone else doesn't know.

Edited by EvilNate

Share this post


Link to post
Share on other sites

Norrin,

I have been using your revive for along time, in all my missions. I now have a problem and not sure how to fix it. I thought it was GL4 causing it but it is not. Madmike told me some things to try ,but I am still having a bug/problem.

When any player gets killed most of the time revive works just like it is suppose to. They fall to the ground and roll around waiting for revive. Then the buttons pop-up to respawn at whatever location.(you keep your current gear also).

Now, more and more when someone dies the screen for a sec will show you holding the default rifle for that class ( not what you were carrying at the time of death). Then you fall to the ground and respawn/revives works as normal except you have now lost your load-out.

In the description.ext. I changed respawn = "base"; to respawn = "instant"; Otherwise, when you die and the bug hits you will always end up at the "respawn_west" marker. Then you roll around waiting for revive. Depending on where the "respawn_west" was located chances are your screwed. IF respawn is enabled the buttons will popup and you can respawn to whatever location(s) have been set.

I have tried taking the markers "boot_hill","Respawn_west", and "center" out of the missions completely. The bug still happens (just not as often).

I have also tried using a save gear script but when the bug hits you still lose your current gear and go back to default for the class.

Losing your current gear is probably the worst thing when you are deep into a mission. If you get to re-gear the bug may or may not happen again. Sometimes it is every time you die other times it may happen at the 3rd death then may not happen until you die the 2 time.

Any help you can give will be appreciated

Nomadd

Share this post


Link to post
Share on other sites

I am having a problem as well. I think it has to do with the classnames specified to use it. But first I will explain my problem. Shortly after the mission begins, a message pops up saying everyone is unconscious, yet we are still alive... the mission does not end, it just sits that way until the admin ends the mission.

Now, I believe I do have everything set-up correctly... but I am using the ACE2 mod, and using the ACE2 Desert Marines there, so I am thinking maybe the classnames listed under "// UNITS THAT CAN REVIVE/UNITS THAT CAN BE REVIVED" is not set-up for the ace characters so it's not noticing any of my guys? I dunno... If anyone can help me I'd greatly appreciate it, I can even e-mail you the mission if you'd like to take a look and try seeing what I'm doing wrong... Thanks

Share this post


Link to post
Share on other sites

Is Norrin still around, still supporting revive script? Anyone know?

Nomadd

Share this post


Link to post
Share on other sites
Is Norrin still around, still supporting revive script? Anyone know?

Nomadd

Yep I am still around but been very busy with RL and have had little time to check out the posts in the thread - also doing my best not to get too involved as revive requests have a tendency to take over what little time I do have to work on "other" things. Anyway, can you send me your mission and a list of addons it uses to here and I'll take a look first chance I get.

@Everyone who has helped out along the way - many thanks for answering the questions raised here :)

Share this post


Link to post
Share on other sites

Hi all, i cant get the revive script to work.

Im using the uk special forces unit, and using that


// ==================================================================
// UNITS THAT CAN REVIVE/UNITS THAT CAN BE REVIVED
_can_revive 					= "soldierWB";		//array no.18 
_can_revive_2 					= "";				//array no.19
_can_revive_3					= "";				//array no.72 - NOT IMPLEMENTED
_can_revive_4					= "";				//array no.73 - NOT IMPLEMENTED
_can_be_revived 				= "soldierWB";		//array no.20  
_can_be_revived_2 				= "";				//array no.21 
_can_be_revived_3				= "";				//array no.74 - NOT IMPLEMENTED 
_can_be_revived_4 				= "";				//array no.75 - NOT IMPLEMENTED
_medic_1						= "CDF_Soldier_Medic";	//array no.76 - Used in conjunction with medpacks and bleeding	
_medic_2						= "";				//array no.77 - Used in conjunction with medpacks and bleeding
_medic_3						= "";				//array no.78 - NOT IMPLEMENTED	
_medic_4						= "";				//array no.79 - NOT IMPLEMENTED	
//========================================================

Which are the units to use to make only the medics revive?

Share this post


Link to post
Share on other sites

In my experience, using custom or ACE units will render the Revive Scripts useless.

Stick to default classes or find a work around.

I did consider trying some work around using cfgIdentities, but I highly doubt that would work either.

Share this post


Link to post
Share on other sites
In my experience, using custom or ACE units will render the Revive Scripts useless.

Nope it's a matter how a certain is configurated. For example, no matter which mercenary made by Schnapsdrossel you are using you'll have to use the base class for western units even if the units are on the east and resistance side.

From my experience the revive script works with many addons.

Edit:

@Norrin:

I guess I found a bug in the revive script. It was in version 0.3f so it's hard to say if this may already have been fixed by you. I set up a mission with 10 playable units, all playable by AI too. In the revive_init.sqf I set _AI_aware = 1;

During the mission my RPT showed these errors:

WARNING: Function 'name' - Roland Wolff is dead
Error in expression <];
_count_enemies = 0;  
_known_enemy = nearestObjects [_name, [_enemy_units_1,_>
 Error position: <nearestObjects [_name, [_enemy_units_1,_>
 Error Typ Jede, erwartet Zeichenfolge
Client: Object 4:25 (type Type_90) not found.

There were thousands of these lines. There're referring to the AIBehaviour.sqf around line 143.

Edited by [GLT] Legislator

Share this post


Link to post
Share on other sites
I guess I found a bug in the revive script. It was in version 0.3f so it's hard to say if this may already have been fixed by you.

Its quite some time ago now but I'm pretty sure that was fixed in Revive Version 0.4.

Share this post


Link to post
Share on other sites
Nope it's a matter how a certain is configurated. For example, no matter which mercenary made by Schnapsdrossel you are using you'll have to use the base class for western units even if the units are on the east and resistance side.

From my experience the revive script works with many addons.

You're right, I was trying to make specific units in addon packs the Medic role, using soldierWB works for everything so far, I meant to say that assigning specific custom classnames doesn't seem to work.

Share this post


Link to post
Share on other sites
You're right, I was trying to make specific units in addon packs the Medic role, using soldierWB works for everything so far, I meant to say that assigning specific custom classnames doesn't seem to work.

Are you using a class name like ACE_usarmy_medic for the ACE combat medic? Maybe if you could post the class names you've tried and which addons they come from I could get a better understanding of the problem you are having.

Thanks,

norrin

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  

×