Jump to content
Sign in to follow this  
norrin

SQF revive script

Recommended Posts

@Styx - I've just spent 30 minutes crashing a chopper with two players onboard into the drink and the ground and so far I haven't been able to replicate the error you're talking about. Is there any other info you can give me that may help me replicate this error eg. type of chopper, map, location on map, types of units used, speed etc.

@Legislator - It seems to be working OK here. If all the other players around you are also unconscious you should only be able to be able to spectate yourself (ie. you can only spectate alive players) is this what is happening? Also if you are in the process of being revived the follow camera will no longer work.

AI_disabled revive 1.49h for players without Queens Gambit

Also just found out that if you don't have Queens Gambit the latest version of the revive won't work so you'll need this one instead that uses the original animations: http://home.iprimus.com.au/simonns....tro.rar

Share this post


Link to post
Share on other sites
@Styx - I've just spent 30 minutes crashing a chopper with two players onboard into the drink and the ground and so far I haven't been able to replicate the error you're talking about. Is there any other info you can give me that may help me replicate this error eg. type of chopper, map, location on map, types of units used, speed etc.

http://home.iprimus.com.au/simonns....tro.rar

@norrin can I send you the mission that I use perhaps it is something else in it?

I do have a trigger executes repeatedly that loads a repair vehicle ability into both units that we are using to test so it might be possibly messing with the revive script?

(I am a noob when it comes to scripting, I can only look at and copy other peoples script)

I will do some testing in a vanilla respawn mission (meaning the revive and a mission with out the vehicle repair tonight and let you know what I find out.

Styxx

Share this post


Link to post
Share on other sites

For all you gluttons for punishment out there, here's the next installment of

AI enabled revive beta update

Get it here: http://home.iprimus.com.au/simonnsl/Revive/AI_en_revive_test.Intro.rar

Notes

*I've hopefully fixed some of the AI stupidity from the last version.

* I must warn you that this is designed for use by small groups only, its only been tested with 4 playable units so far and I have no intention of making this compatible with 30 player teams - this script requires an instance of the script running for each playable AI unit that is in the players group (ie. local to the players machine) so too many playable AI in your group is going to lag up your computer.

* Also I use this script for single player missions on a local MP server to get some of the feel of MP revive missions when I feel in the mood for some SP, so this is really the aim of what I'm trying to do with this script. Because of this, this script will not be supported to the same degree as the AI_disabled script as if it works for what I'm trying to do then - I'm happy. Bug reports are welcomed but I'm not sure how long it will take me to fix for the above reasons.

*It does seem to be JIP compatible but I'm not sure how it will hold up to multiple players joining and leaving the server. If a player joins a group while the mission is in progress the instance of the script for that playable AI that is running on the group leaders PC will be suspended and the revive will be controlled by a new instance of the scritp running on the joining players machine. If the JIP player quits, the revive script on the group leaders machine is re-enabled and continues based on the current status of the unit. As you can imagine this is quite complicated and is bound to fall over if abused too much.

*You can now specify which types of unit will revive and even the AI will obey these rules.

*The AI smoke to cover/revive option still works but its been disabled in the test mission. You may need to change the code on line 76 (ie. _smoke_shell_types array) of the revive_player.sqf to use DMarwick's viewblock grenades.

*I've hopefully fixed the follow the leader bug (I think I may have said that once or twice before)

* This version uses the standard ArmA unconscious animations not the fancy QG ones

* The quick and nasty test mission uses DAC v2.0 so many thanks to Silola and the Mapfact team for this simply amazing script.

Future of the script

* I want to make the reviving AI a little more aware of whats going on around them, for instance kill any enemys they are aware of 1st and take into account the time left before the player pegs it, before they rush in for the revive.

* I'd really like for the AI to drag unconscious units to cover before reviving but so far all my attempts at this have failed miserably.

@Styx - Please send me your mission to norrin@iprimus.com.au and I'll take a look at it. Thanks mate.

Share this post


Link to post
Share on other sites

thanx alot

its what i need)

i do not leave hope for covering_options and calling_medevac_options(helo for west and med_bmp for east after firefight ends)

Share this post


Link to post
Share on other sites
@Legislator - It seems to be working OK here.  If all the other players around you are also unconscious you should only be able to  be able to spectate yourself (ie. you can only spectate alive players) is this what is happening? Also if you are in the process of being revived the follow camera will no longer work.

Norrin,

Thanks for the scripts... GJ.

I noticed one thing..The WASD keys do not seem to work in the spectating script.

Also why do we need to clear the "blinking period=20" from every buttot config ?

Clearing it from the "rev_cam_dialog" isn't enough?

Personally I'd prefer semi transparent non-blinking dialog in spect script.

I'll post if I come across other issues.

Cheers.

Share this post


Link to post
Share on other sites

Hi Norrin,

Any reports from others that when using latest AI-Disabled some of the players respawn in the ground swimming? We had 10 players online at the time.

Thanks

Vengeance

Share this post


Link to post
Share on other sites

@crawler - If  I get a chance I'll look into the dialog configs tonight - I've noticed that as well but as I normally use the drop down menus I haven't been that worried about it.  

@Legis this also explains your bug with the follow camera as the WASD problem only occurs if the respawn_dialog markers are visible and I'd been only checking the drop down menus post respawn dialogs.

@vengeance -This part of the code hasn't changed for many versions so I'm surprised its only just happening. Can you give me a few more details about where the players were on the map when they died, how they died, were they in a vehicle, by respawn in the ground do you mean at the respawn marker, ie. the respawn camera didn't work, or after they were revived ? Can you please also send me the mission so I can try and replicate this issue once I've got this info.

Share this post


Link to post
Share on other sites

Camera Fix for AI_disabled version 1.49

Well I learnt something new about dialogs today.

You can get the full suite of scripts for QG from here: http://home.iprimus.com.au/simonns....tro.rar (version 1.49j)

For vanilla Arma from here: http://home.iprimus.com.au/simonns....tro.rar

If you want to just add the fixed files to your mission just download the rar file here: http://home.iprimus.com.au/simonnsl/Revive/cam_fix.rar

then delete the existing dialogs folder and replace it with the one in the rar file and also replace the existing cam_follow.sqf and cam_key_pressed.sqf scripts.

Please let me know if you run into any problems.

norrin

@crawler - I've left the current blinking dialog set-up as is but feel free to change it yourself - you'll need to change the rev_cam_dialog and then respawn_button_1, respawn_button_2, respawn_button_3 and respawn_button_4

Share this post


Link to post
Share on other sites
@vengeance -This part of the code hasn't changed for many versions so I'm surprised its only just happening. Can you give me a few more details about where the players were on the map when they died, how they died, were they in a vehicle, by respawn in the ground do you mean at the respawn marker, ie. the respawn camera didn't work, or after they were revived ? Can you please also send me the mission so I can try and replicate this issue once I've got this info.

Norrin,

I figured it out, the mission I was Modding was moving Respawn_West dynamically.  I removed it and it works fine now.

Vengeance

Share this post


Link to post
Share on other sites

Hi Norrin, it's very nice to see updates of your revive script smile_o.gif Especially on sunday biggrin_o.gif Is the explosion-bug-in-vehicles solved with the latest version?

Share this post


Link to post
Share on other sites
Hi Norrin, it's very nice to see updates of your revive script smile_o.gif Especially on sunday biggrin_o.gif Is the explosion-bug-in-vehicles solved with the latest version?

Hiya mate,

The changes just fix the issue with the respawn dialogs and the unconscious camera. All you'll need is the hot fix (ie. cam_fix.rar).

I've been blowing up vehicles all week (HMMWVs, blackhawks and apcs) but I still haven't been able to trigger the exploding vehicles bug - I'll have another go tonight but as you know if I can't make the problem happen in my testing I can't be sure whats wrong so I don't know what to fix - can you PM me a few more details about what happened such as what type of car it was, how many guys were on board, where was the car when it happened, how was it destroyed etc.

Thanks,

norrin

Share this post


Link to post
Share on other sites

Hmmmm best thing would be to show it on our server. I hope you still have our mod compilation? biggrin_o.gif

Could an extended eventhandler cause any trouble with the revive script?

It happended very often ... a player drives a vehicle (HMMWV, tank or anything else) ... if the car gets blown up the player dies, the revive script creates the black screen, some extended explosions are triggered via Mapfact Burning script but it would be the same if you create explosions manually via trigger I guess. Afterwards the dead player respawns at the respawn_west/east marker. His fake body doesn't seem to be created (I'm not sure about it). Once the player kills himself at respawn_west the fake body appears at the location where the player originally died. The revive script enters the camera, the player can be revived again, the camera works too, even drag & drop works.

It's hard to show you. I'll try to create a video next time or we'll check it out together on our server.

Edit:

By the way ... you forgot to change the version number of your script wink_o.gif I was wondering whether I downloaded the wrong script a few minutes ago biggrin_o.gif

Edit2:

I'm still having the problem with my serverside revive that I don't have respawn buttons and camera control --> picture of it sad_o.gif This time I replaced the old glt_misc.pbo with a new one having your latest revive within. This time I changed no path within the source code but I set up the config.cpp like this:

Quote[/b] ]#include "\glt_misc\revive_sqf\dialogs\respawn_button_1.hpp"

#include "\glt_misc\revive_sqf\dialogs\respawn_button_2.hpp"

#include "\glt_misc\revive_sqf\dialogs\respawn_button_3.hpp"

#include "\glt_misc\revive_sqf\dialogs\respawn_button_4.hpp"

#include "\glt_misc\revive_sqf\dialogs\respawn_button_1b.hpp"

#include "\glt_misc\revive_sqf\dialogs\respawn_button_2b.hpp"

#include "\glt_misc\revive_sqf\dialogs\respawn_button_3b.hpp"

#include "\glt_misc\revive_sqf\dialogs\respawn_button_4b.hpp"

#include "\glt_misc\revive_sqf\dialogs\respawn_button_1c.hpp"

#include "\glt_misc\revive_sqf\dialogs\rev_cam_dialog.hpp"

#include "\glt_misc\spect\spectating.hpp"

That's really weird crazy_o.gif I can see the titleCut from the revive_init.sqf, I can see how the script is initialized, the animations are working ... but when I got shot or kill myself, I got no respawn buttons and the WASD camera movement doesn't work either. Am I doing something wrong? huh.gif I don't believe there's a bug regarding this special problem.

Share this post


Link to post
Share on other sites

Thanks for the additional info.

Yep I've still got the mod but you keep adding stuff to it so every time you send me a new mission I've got find the new addons. tounge2.gif

Its going to be a bit hard for me catch you on your server for the next week or so as its full on at work and then I'm going to be away over the week end but I'll set-up and run a test mission with the Mapfact burning script and see what happens.

Share this post


Link to post
Share on other sites

Ok you are free to call me via ICQ at any time when I'm online biggrin_o.gif You can check out any custom mission on our server if you wish. Every mission has got the mapfact burning running so player get hurt and screaming on burning wrecks. If I'll have to disable it I can live with it. I just need to know it in time tounge2.gif

I guess the next mod compilation update will be in late august so I'll still have some time to get this damn thing running. tounge2.gif

Share this post


Link to post
Share on other sites

@Legis, I've never tried to make an addon version of the revive so I'm not sure what exactly needs to be done here.

Looking at xeno's addon revive though his config.cpp gives the path <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#include "revive_sqf\dialogs\respawn_button_1.hpp"

so if your addon folder is called glt_misc and the revive folder is called the standard revive_sqf then you possibly need to remove the glt_misc from the start of the path for each dialog in the config.cpp so it looks the same as xenos above ie.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#include "\revive_sqf\dialogs\respawn_button_1.hpp"

#include "\revive_sqf\dialogs\respawn_button_2.hpp"

#include "\revive_sqf\dialogs\respawn_button_3.hpp"

#include "\revive_sqf\dialogs\respawn_button_4.hpp"

#include "\revive_sqf\dialogs\respawn_button_1b.hpp"

#include "\revive_sqf\dialogs\respawn_button_2b.hpp"

#include "\revive_sqf\dialogs\respawn_button_3b.hpp"

#include "\revive_sqf\dialogs\respawn_button_4b.hpp"

#include "\revive_sqf\dialogs\respawn_button_1c.hpp"

#include "\revive_sqf\dialogs\rev_cam_dialog.hpp"

#include "\spect\spectating.hpp"

Share this post


Link to post
Share on other sites

That's what I tried before wink_o.gif It has the same effect. And as you can see in the version I had send you I've tried changing every path within your code. It's a very weird problem. I'll try renaming the glt_misc.pbo.

Share this post


Link to post
Share on other sites

@ Legislator - I've downloaded the latest version of coop_1_10_der_aufstand.map_ssara and it seems unfortunately that the MAPFACT_burning script is not compatible with the revive scripts because when I disable it in the init.sqf the exploding vehicle problem no longer occurs.

When the Mapfact addon is enabled and the player dies in a vehicle his unconscious body appears next to the vehicle as normal but then the flames from the flame script inflict damage on the unconscious body eventually killing it and it disappears and the player respawns at the respawn_east marker.  This flame damage happens inspite of the immortality protection I have added to the unconscious bodies.  

There's three things you can do:

1. disable the MAP_miscBurn script,

2. add a check to MAP_miscBurn so that it will not damage units doing the unconscious animation.  Something like <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (_x isKindOf "man") then

{

if(alive _x && animationState _x != "AmovPpneMstpSnonWnonDnon_healed") then

{

(you may need to get MAPFACTS permission to do this), or

3. Put a check in the revive script to make sure that the bodies of players who die in vehicles are thrown 10 metres away from vehicles so that there unconscious bodies cannot be damaged and then killed by the MAPFACT flames.

As for the addon revive I'm sorry I can't be more help but there are other features I want to add to the AI_enabled script and this is taking up most of my spare time at the moment so I don't have a lot of time to look into this further.  Sorry mate.

Share this post


Link to post
Share on other sites

My experiences with AI Enabled Beta 0.3 so far:

- there was no dedicated server test yet

- the spectating camera doesn't seem to work on my teammates (west) -->

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_allied_side_1 = "WEST"; //array no. 42

_allied_side_2 = "RESISTANCE"; //array no. 43

....

_follow_cam_distance = 250; //array no. 32

_follow_cam_team = 0; //array no. 44

(don't know if other human players have the same problems

- reviving each doesn't seem to fit like before; I was killed near a crossroad in Cayo but my AI team (within 50 metres of range) wasn't able to revive me within 180 seconds.

- at one moment one AI soldier didn't seem to be able to stand up (I had to shoot + revive him)

- there was no follow-the-leader bug in the first test

- the mobile respawn feature would be nice tounge2.gif

- there were no revival script error messages during the game

- the performance was perfect ... well ok ... it was a small mission in the south sahrani desert biggrin_o.gif No problem so far anyway

Share this post


Link to post
Share on other sites

Norrin,

Someone found a bug when playing Tied Up.

Quote[/b] ] I have tested your mission with our clan and I believe you have an error in your markers for Revive.  I corrected them and it works now.

1. Increase # of Spawn Points to 2

2. Change Mobile Base Start to "Base_1" Marker.

Now works fine with Alpha_1.

I asked how to recreate it because I dunno whats the prob. and he said:

Quote[/b] ]In Mulitplayer Mode have Alpha_1 go into town and Deploy the Spawn Point.  Then respawn and you will only see (in original version) 1 spawn button "base".  If you make the changes I suggested you can do the same thing and see both spawn buttons.

I still couldn't recreate it until I decided to put it on my ded server and then presto. You put down a mobile spawn and the button doesn't show up when you die. Here is the original respawn points area in the revive_init:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_NORRN_no_respawn_points = 1; //array no.12

_NORRN_Base_1 = "Mobile"; //array no.13

_NORRN_Base_2 = "start_spawn"; //array no.14

_NORRN_Base_3 = ""; //array no.15

_NORRN_Base_4 = ""; //array no.16

_NORRN_time_b4_JIP_spawn_dialog = 10000; //array no.17

_NORRN_Base_1_respawn = 1; //array no.18

_NORRN_mobile_spawn = 1; //array no.51

_NORRN_mobile_base_start = "Base"; //array no.52

_NORRN_mobile_man = alpha_1;   //array no.53

I tried:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_NORRN_no_respawn_points = 2; //array no.12

_NORRN_Base_1 = "Mobile"; //array no.13

_NORRN_Base_2 = "Base"; //array no.14

_NORRN_Base_3 = ""; //array no.15

_NORRN_Base_4 = ""; //array no.16

_NORRN_time_b4_JIP_spawn_dialog = 10000; //array no.17

_NORRN_Base_1_respawn = 1; //array no.18

_NORRN_mobile_spawn = 1; //array no.51

_NORRN_mobile_base_start = "Start"; //array no.52

_NORRN_mobile_man = alpha_1;   //array no.53

(I changed the marker names in the editor accordingly)

So when you die it shows the Start and Base buttons if no mobile is up, and Mobile and Base when a mobile is up.

I actually liked the first one better because the Start and Base are in the same spot so it was redundant having that button. When you die and no mobile is up it just showed the Base button.

So to sum up, if it's on a dedicated server their is a problem with the mobile respawn button not showing. It shows the Start and Base buttons instead of Mobile button. But if you Host the game it works perfect in both the first/original and in the second revive_init code samples above.

What do you suggest to do?

Share this post


Link to post
Share on other sites

@Rexxenexx - I've just checked and it seems to be OK in the test mission on a dedicated server. The mobile button will only appear if the mobile spawn point is deployed at least 20 metres away from the postion of the _NORRN_mobile_base_start marker. If it isn't then what you are describing will happen.  Can you please make sure you're more than 20 metres away from the _NORRN_mobile_base_start marker when you deploy the mobile respawn base and try again.  If its still happening let me know.

Thanks.

@Legislator - The camera WASD keys are fixed in the new unreleased AI_enabled version but it should work from the drop down menus in the version you have just make sure that if all the playable units are from one side (eg. West) that you put west in both the

_allied_side_1 = "WEST";   //array no. 42

_allied_side_2 = "WEST"; //array no. 43

The new version sends a second unit, if available, to the unconscious unit to provide cover. Still tesing but it seems to be OK so far.  Also the reviving unit will shoot any enemy units it knows about within 50 metres before moving to revive.  Before I release I'll make both these features optional.

EDIT: Rexxenexx - I've found the problem with your mission the marker named "base_1", which is just next to the "base" marker, needs to be changed to read "mobile" and it will work ie. you must place a marker on the map called "mobile" in the editor for this system to work.  If you're still having problems then I can email you the fixed version just PM me your email address.  Also there's no need to have <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_NORRN_Base_2 = "start_spawn"; //array no.14 just <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_NORRN_Base_2 = ""; //array no.14 will work fine.  If you want to call the "base" marker something else eg. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_NORRN_mobile_base_start = "start_spawn"; //array no.52 thats fine as well just as long as you have a marker on the map called the same thing.

Share this post


Link to post
Share on other sites

Thanks norrin. It works!

the lines now read:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_NORRN_no_respawn_points = 1; //array no.12

_NORRN_Base_1 = "Mobile"; //array no.13

_NORRN_Base_2 = ""; //array no.14

_NORRN_Base_3 = ""; //array no.15

_NORRN_Base_4 = ""; //array no.16

_NORRN_time_b4_JIP_spawn_dialog = 10000; //array no.17

_NORRN_Base_1_respawn = 1; //array no.18

_NORRN_mobile_spawn = 1; //array no.51

_NORRN_mobile_base_start = "Base"; //array no.52

_NORRN_mobile_man = alpha_1; //array no.53

And I changed base_1 marker to mobile.

Tested it on the dedicated server and locally hosting, everything works! Here it is TiedUp v1.21.

Share this post


Link to post
Share on other sites

Norrin,

How would we configure the above if we wanted to have the Start (or other stationary spawns) show up all the time but not have the Mobile show up unless it is Deployed?

Vengeance

Share this post


Link to post
Share on other sites

@Norrin:

Good news biggrin_o.gif I've disabled the mapfact burning and indeed there was no more "explosion-bug". Using AI Disabled 1.49j two players were killed by a kamov while driving a t-72. The tank exploded, the players were killed but there were not thrown out of the revive script. smile_o.gif

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  

×