Jump to content
Sign in to follow this  
norrin

SQF revive script

Recommended Posts

Norrin,

Yes I am using 19.  I will send map.  No AddOns needed anymore.

Vengeance

I've just spent two hours playing your mission and I got the error message once, no matter what I  did to try and replicate the error it did not reappear so I'm not sure what's causing it so if you have some insight into the combination of factors that may be causing it  please let me know.  

Anyway, the error message I got and the one you're seeing is related to one of the dynamic variables "name_a" and as the unnamed units have spaces in their names it keeps throwing up an error (I wish BIS hadn't named the AI units like this).  I've been back through the revive code and I'm hoping the revive_player.sqf I posted above will fix the problem but as I'm having difficulty replicating the error I'm not 100% sure.

So all I can recommend is you try using the new revive_player.sqf which you can get from here: version 0.19b

Sorry I can't be more help m8.

norrin

No problem Norrin, I will narrow it down, I did load the new file but still saw NULL error again last night during testing. I will narrow it down and see if I can repeat it.

Thanks banghead.gif

Share this post


Link to post
Share on other sites

@bravo - sorry about that mate but your mission I converted for AI_disabled play mistakenly used a couple of revised scripts that I had written for another conversion I was doing. I'll fix it up and post the corrected version of your mission in your thread.

@vengeance - I just had an inkling re what might be the problem. I'll try it out and post if I've found a fix.

@Legislator - I'll look into whether there's an easy way you can set the respawn button titles in the init.sqf

@HulkingUnicorn - yeah I've been toying with this idea, maybe you'd need to be moved to a hospital tent or medic M113 to be restored to full health once you were revived.

Share this post


Link to post
Share on other sites
@bravo - sorry about that mate but your mission I converted for AI_disabled play mistakenly used a couple of revised scripts that I had written for another conversion I was doing. I'll fix it up and post the corrected version of your mission in your thread.

no problem m8,

ill look at them tonight and fix according to what i had. wink_o.gif

@HulkingUnicorn - yeah I've been toying with this idea, maybe you'd need to be moved to a hospital tent or medic M113 to be restored to full health once you were revived.

I also liked that idea smile_o.gif

Share this post


Link to post
Share on other sites

I've found a new (old?) problem. After getting hit by artillery this happened:

bug1uz9.th.jpg

Many players died at the same time.

This message was shown until the end of the mission:

bug2wl4.th.jpg

One player had no animation anymore, but still could get revived

bug3rh4.th.jpg

I used AI Enabled beta 0.19, current Linux Dedicated Server.

Share this post


Link to post
Share on other sites
I've found a new (old?) problem. After getting hit by artillery this happened:

Many players died at the same time.

This message was shown until the end of the mission:

One player had no animation anymore, but still could get revived

I used AI Enabled beta 0.19, current Linux Dedicated Server.

Thanks legislator for the pickies. I've now got some idea where this problem is.

Cheers,

norrin

EDIT: I'm not sure whether this will help but could both Vengeance and Legislator try setting the respawndelay to 4 ie.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">respawndelay = 4; in the description.ext and see whether that makes the error with the AI_enabled code disappear.

EDIT EDIT: Finally found a simple way to stop the exploit of pushing the esc key while in the unconscious camera to perform actions etc.

Share this post


Link to post
Share on other sites
EDIT EDIT: Finally found a simple way to stop the exploit of pushing the esc key while in the unconscious camera to perform actions etc.

great!

i was hoping for that too smile_o.gif

Share this post


Link to post
Share on other sites

And again the AI follows someone but not me sad_o.gif

AI Enabled Beta 0.19, 4 players, Linux Dedicated Server. Happened after some revivals.

All follow group, all follow 4, all follow 6 ... but not All, return to formation sad_o.gif

Share this post


Link to post
Share on other sites
And again the AI follows someone but not me sad_o.gif

AI Enabled Beta 0.19, 4 players, Linux Dedicated Server. Happened after some revivals.

All follow group, all follow 4, all follow 6 ... but not All, return to formation sad_o.gif

im not sure but i think this is an old issue, even before this revive script.

Anyway.. i would like to ask if players when they revive they lose their rank? Ie, if a unit with sergeant rank enters unconscious mode and when he gets revive does he lose that sergeant rank? because if he does it can explain alot.

Share this post


Link to post
Share on other sites

I strongly doubt they lose rank on dying/respawning by default, nor do I think rank is manipulated through norrins script.

While this is not a perfect fix, if you see some sort of order above your own icon (for example stop), press 0-1 one to two times (so your character says "Done" or "Waiting"). Then order your men to return to formation.

Share this post


Link to post
Share on other sites

Hi Norrin,

again we had a lot of bugs this evening sad_o.gif AI Enabled Beta 0.19 ...

It all began with the death of the whole team caused by the enemy's artillery. The stryker had been blown to pieces, the team as well. The well known error message in the left corner of the screen appeared.

During the rest of the game one player had been kicked out of the revival script. He spawned after 4 seconds where he died.

Some markers weren't removed. Another player was shown with a blue soldier symbol on a map (civillian / captive style). After he died everything was ok. The strange thing is that two of four players had huge lags everytime this player died. sad_o.gif

We used 4 respawn points because the combat terrain was the whole part of South Sahrani. Soon the team was scattered across the county. The AI always spawned at base point 1. This should be changed to the point that it closest to the group leader. It was no fun collecting AI soldiers all the time.

We saw something strange too biggrin_o.gif At the end of the game some players and all of the AI just died without any enemy influence. We left a trail of friendly corpses across the country.

After the first artillery hits the game wasn't playable anymore. I don't know if it's possible to make a small invulnerability phase during within one of the revival script loops so the death of lots of players doesn't effect your script anymore.

Share this post


Link to post
Share on other sites
Hi Norrin,

again we had a lot of bugs this evening sad_o.gif AI Enabled Beta 0.19 ...

It all began with the death of the whole team caused by the enemy's artillery. The stryker had been blown to pieces, the team as well. The well known error message in the left corner of the screen appeared.

During the rest of the game one player had been kicked out of the revival script. He spawned after 4 seconds where he died.

Some markers weren't removed. Another player was shown with a blue soldier symbol on a map (civillian / captive style). After he died everything was ok. The strange thing is that two of four players had huge lags everytime this player died. sad_o.gif

We used 4 respawn points because the combat terrain was the whole part of South Sahrani. Soon the team was scattered across the county. The AI always spawned at base point 1. This should be changed to the point that it closest to the group leader. It was no fun collecting AI soldiers all the time.

We saw something strange too biggrin_o.gif At the end of the game some players and all of the AI just died without any enemy influence. We left a trail of friendly corpses across the country.

After the first artillery hits the game wasn't playable anymore. I don't know if it's possible to make a small invulnerability phase during within one of the revival script loops so the death of lots of players doesn't effect your script anymore.

I'll post a revised AI_enabled script that I rewrote for bravo 6's laser stamp mission. It may fix the changing leader problems you've been experiencing as well as couple of bugs in the camera script as well as the Esc button camera exploit.

Before I do this I'll try to change the AI respawn at base 1 problem you've been experiencing.

How many playable units are you using in this mission? If its a lot I'd recommend using the AI_disabled script instead as you are possibly placing a large strain on the client's cpus by running a huge number of instance of the revive script.

As for the players just dying for no reason at the end of the mission I don't know what would have caused this as there's nothing in the revive script that will kill players (ie. no setdammage function) so maybe another script in your mission is responsible for this.

If you get a chance please email me your latest version of this mission and I'll take another look at it as I want to check out what happens with artillery strikes.

One thing I have discovered over the last few days is that you cannot put a moveIn command in the unit's init line in the editor if you want to use the revive scripts. As this may cause errors when a player JIPs.

Share this post


Link to post
Share on other sites

The mission uses 10 units to play with. I'm fixing some things right now. Might be finished this day.

Quote[/b] ]As for the players just dying for no reason at the end of the mission I don't know what would have caused this as there's nothing in the revive script that will kill players (ie. no setdammage function) so maybe another script in your mission is responsible for this.

I suppose the revival script kills them via respawn at the place where they are. It was the first time I have experienced this - maybe because one player wasn't in the revival script anymore?

Share this post


Link to post
Share on other sites

I just crossed with some interesting thing..

Condition: Only medics can revive.

When an Ai get hit and become unconscious we (players non medics) can not take any gear from the unconscious Ai.

If the soldier that carry the AT is in unconscious mode we (players) can Not take the AT from him. huh.gif

Share this post


Link to post
Share on other sites

And again a bug report sad_o.gif I think its a known problem. Again this message

Click me

It happened when I tried to revive a teammate. Suddenly he died (respawn timer?) while I revived him. He "left" the revival script and stayed in captive mode.

Share this post


Link to post
Share on other sites

AI_enabled Revive Script Update

You can get the latest version of the script from here (Version 0.20 4th October 2007)

Fixes:

* Fixed the unconscious camera Esc key exploit.

* The unconscious camera has been revised and this may fix some of the null errors encountered by users.

* Changed the way the leader is identified in the script in the hope that it may fix the follow the leader problems.

Changes

* Added the respawn_position variable in the init.sqf which allows the player to specify whether once the revive timer has elapsed the units respawn at base_1 or the closest friendly respawn marker to where they died.

@bravo - The unconscious unit is considered alive by the game so you can't take their weapons.  All I can do is make the units drop their weapons when they fall unconscious, which means they are going to have to pick them up again when they are revived which could be a bit annoying - this could be an option in the init.sqf I guess.  

@Legislator - Let me know if this new version helps any as I'm having a hard time tracking down the bug you're seeing.

Share this post


Link to post
Share on other sites

Thank you! notworthy.gif I'll update my benchmark mission with it tounge2.gif As for the mission that I should send you .. it has to wait a little bit. There are some problems caused by Queens Gambit and the linux dedicated server. The mission won't start because of some addon missing bug. But that's another story wink_o.gif

Oh by the way ... the AI enabled revival script beta 0.19 works very well with Queens Gambit! I've tested it with the bluefor mercenaries and encountered no problems (except the usual until beta 0.19).

Share this post


Link to post
Share on other sites

Back from vacation and lokking the news now.

@Norrin What is the latest Version for AI disabled or should i wait for the next one ?

Another Question is , do you plan to use the "extended eventhandlers" to solve some errors and make it easer to combine

the resp with other things like grouplink ?

Share this post


Link to post
Share on other sites
AI_enabled Revive Script Update

You can get the latest version of the script from here (Version 0.20 4th October 2007)

Fixes:

* Fixed the unconscious camera Esc key exploit.

* The unconscious camera has been revised and this may fix some of the null errors encountered by users.

* Changed the way the leader is identified in the script in the hope that it may fix the follow the leader problems.

Changes

* Added the respawn_position variable in the init.sqf which allows the player to specify whether once the revive timer has elapsed the units respawn at base_1 or the closest friendly respawn marker to where they died.

Does this mean i have to update the revive in the stamp with this one?

I ask this because players can still fire/change/reload weapons when in unconscious mode.

@bravo - The unconscious unit is considered alive by the game so you can't take their weapons. All I can do is make the units drop their weapons when they fall unconscious, which means they are going to have to pick them up again when they are revived which could be a bit annoying - this could be an option in the init.sqf I guess.

Well about the dropping gear I'm not so sure if people in general would like the idea.

Though it could be more realistic if they would drop, so other players could pick any weapon/ammo if necessary for their survival. I already came across with a situation that i needed a AT to destroy a near tank but the nearest AT was in a unconscious player.. and that tank killed me because i could not take that AT.

Can we ask people which way they prefer?

Share this post


Link to post
Share on other sites

@MCPXXL - Good to hear you're back.  I'd wait a few days before updating your AI_disabled script as I'm in the process of making a few changes and adding more functionality and will hopefully release a revised version by Wednesday.  To be honest I haven't looked that closely at the extended eventhandlers but I'm reluctant to use anything that requires an addon at this point.  I'll look into more closely though.

@bravo - more good news m8 sad_o.gif The script you're using should have all the fixes listed as I used your revised version as the basis for the latest AI_enabled scripts.  Not good to hear players can still reload etc while unconscious - I'm not sure how this happening as I'm not able to do this in testing.  

Can you give me some insight into how they are doing this or when it happens - all I can think of is the unconscious camera is not triggering when the player dies for some reason.  Have you asked the other players what they are seeing when this happens or the events that lead up to it occurring as this would be a great help to me.

EDIT: Just had a thought, bravo is it players or playable AI that can still fire, change ammo etc?

Share this post


Link to post
Share on other sites
@bravo - more good news m8 sad_o.gif The script you're using should have all the fixes listed as I used your revised version as the basis for the latest AI_enabled scripts. Not good to hear players can still reload etc while unconscious - I'm not sure how this happening as I'm not able to do this in testing.

Can you give me some insight into how they are doing this or when it happens - all I can think of is the unconscious camera is not triggering when the player dies for some reason. Have you asked the other players what they are seeing when this happens or the events that lead up to it occurring as this would be a great help to me.

EDIT: Just had a thought, bravo is it players or playable AI that can still fire, change ammo etc?

now i have to say: Good news m8 smile_o.gif

I just tryed in MP the version you sent me to email and Players are now NOT allowed to shot/reload/changed weapons anymore.

I'm not so sure about the AIs. Because:

When my plane crashed in the water i became unconscious on shore waiting to be revived, then i got out and tryed the 2nd pilot slot. When i was on my way to the plane the 1st pilot (Ai now) was saying "man is history", "MachineGunner is History".. meaning the AI in unconscious mode was able to kill.. i dunno if he revived himself but there was no medic near him.

And the blue flag p9 was on the map, meaning he should be unconscious.

Note: When pilots crash into water they go onshore to be revived.

If i find any bugs ill report asap.

Cheers! wink_o.gif

Share this post


Link to post
Share on other sites

@Legislator and Vengeance.

Hi guys,

RE: The dreaded null variable error

Can I check a couple of things with you. Can you tell me if these two statements are correct:

1. You only get the null variable error with the AI_enabled script?

2. You both use Group Link 2 in your missions.

If these are correct then here's what I think maybe happening:

I've been converting some missions to use the revive scripts and in one I've come across a null variable error very much like the one you've described in your posts.

The error would occur when the revive script deleted the player's dead body (ie. when he falls unconscious). What it turned out to be was that another looping script in the mission (an early conversion of toadlife's HALO script) needed to keep track of the player's dead body so that when it was deleted it cracked it.

I think you must be seeing something similar and it's therefore possible that a looping script in GPL2+ doesn't like the playable AI units bodies from being deleted by the revive script.

I don't know GPL2+ well but I've tried to find a script in GPL2+ that maybe incompatible with the AI_enabled revive but as I cannot reproducibly trigger the error its proving impossible to test.

As you guys know a lot more about GPL2+ than I do it maybe easier for you to test. One solution I found to the HALO script problem, and its not a good one, was to remove the <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> if(!dead) the {deleteVehicle _body}; from the revive_player.sqf script, so it may be worth trying this to see if this is the code that's incompatible. Its not a good solution though as it means when you are unconscious you are superimposed on your dead body which looks crap.

Another solution was to change the above line of code to: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(!dead) then {_body setPos getMarkerPos "Boot_Hill"} To get this to work you'll need a marker called Boot_Hill placed on the map (preferably on an island away from the action) and all the dead bodies of units that use the revive script will be transported there. The problem with this solution is that the bodies will just pile up until the game begins to remove them so it may eat up cpu processing power.

Anyway if you get a chance try one of the solutions listed above and see if the error goes away and post your results. I'll keep looking for a GPL2+ script that's incompatible (I presume its got something to do with playable AI as it only occurs with the AI_enabled script?).

The only other solution is to only use the AI_disabled revive when using the GPL2+ scripts.

Share this post


Link to post
Share on other sites

Hmm yeah I think it only effects AI Enabled missions. Couldn't test the beta 0.20 with multiple players yet. In single tests there didn't occur any error message, but well ... it wasn't shot by the artillery also. I hope to have a huge test this evening. Then I can tell you if the problem is fixed or not fixed with the new version. Regarding Grouplink, maybe you can contact Snkman. He must be somewhere around this forum smile_o.gif

Share this post


Link to post
Share on other sites

A few minutes ago a found another bug but I think it is caused by plasmans UN soldiers.

The animations work but neither I can revive someone nor I can be revived by teammates. I'm using AI Enabled beta 0.20

This messages occured:

70978954ua6.th.jpg

The UN soldiers are treated as RAC soldiers by ArmA. What do I have to do to fix this problem?

Edit:

One thing I might add ... since beta 0.20 of AI enabled I'll have to execute my comrates very often because they're stuck within the revival script. They're stuck in the animation and after one revival try there isn't the revival option anymore in the action menu. Seems like to happen after the revive timer is reached.

Share this post


Link to post
Share on other sites
A few minutes ago a found another bug but I think it is caused by plasmans UN soldiers.

The animations work but neither I can revive someone nor I can be revived by teammates. I'm using AI Enabled beta 0.20

The UN soldiers are treated as RAC soldiers by ArmA. What do I have to do to fix this problem?

Thanks for the screenie it makes it much easier to diagnose the problem when you get a nice clear error message like that.

The error you are getting looks like you haven't defined the name of the unit in the editor hence its using the default name given to the unit by the game, which has spaces in it, and is causing the revive script to crash.

This can't be true however as the unit would not be doing the unconscious animation unless it was named properly in the editor and the init.sqf. Therefore my guess is there may be some problem with the config of plasman's units that's causing this error.

If you like send me the file and I'll just check that you've got the revive set up OK. I'm pretty sure you will as you've probably had more experience at using it than I have.

If it is plasman's units the only thing I can suggest is that I think Wedge over at the IC-ArmA forums may have created his own UN units, you could possibly contact him and see whether these work any better with the revive.

EDIT: Just had a terrible thought about the AI_enabled revive script. What happens when a playable group leader is not controlled by a human player and therefore is local to the server? Although all the human players will be running an instance of the revive for that unit the server will not so there will be massive desync as when this unit is killed the players will see it as unconscious whereas on the server where its is local it will respawn standing after a few seconds and could possibly go postal (as suggested by bravo a couple of posts back). This shouldn't be a problem unless the player who is the group leader quits the game or rejoins in another playable slot while he is in a combat zone. When this happens the whole squad reverts to being local to the server then the AI_enabled code falls apart.

Therefore for the time being the AI-enabled script may only be good for a single group of units where the group leader position is always occupied by a player otherwise use the AI_disabled script.

I'll test this later and post my results but its not sounding good.

Note to self - possible fix: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (!isplayer _name && !isplayer _leader && _name distance getMarkerPos Base_1 > 50) then {_name setPos getMarkerPos Base_1};

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  

×