Jump to content

Recommended Posts

Use captive, or the getVariable command

Can you expand on this a bit? In my case, I want to do the same thing. If all players are unconscious I want the mission to end. Since I'm not positive if every player slot is filled, I need to check if that player is in game or unconscious. I tried a trigger with the following in the Condition.

((!alive player1) or (player1 getVariable "BTC_need_revive" == "1")) and  ((!alive player2) or (player2 getVariable "BTC_need_revive" == "1")) and  and  ((!alive player3) or (player3 getVariable "BTC_need_revive" == "1"));

Doesn't seem to work, but I'm new to scripting, so I'm sure it's me.

Share this post


Link to post
Share on other sites

Something like that:

{_x getVariable "BTC_need_revive" == 1} count playableUnits == count playableUnits

I can't check it, i'm not at my pc

Share this post


Link to post
Share on other sites

Ah, perfect, seems like it's working fine in my tests. Thanks!

Share this post


Link to post
Share on other sites

Just tested it out, seems to work fine, except one little bug i found.

Okey. Lets say we are two players.

Me (Server)

and

Friend

Both are BLUFOR units placed with CIVILIAN clothes, using shorts and tshirt, all works fine here.

But, if my friend goes down, and i revive him, i (Me) are seeing him in military clothes. Likes hes respawning with it when i revives him. But for himself, he still has Civilian clothes.

And the same thing is if i die (Server) and he revives me.

Then i see myself in CIVILIAN clothes, but for him (Friend) are seeing me in Military clothes.

Almost like in this picture

http://www.arma3.fr/files/media/user/1338_3ca0c383.png

Share this post


Link to post
Share on other sites

I think it's a bug of A3 due to network traffic, i'm not sure to cando something about it.

I'm close to release a new version with a carry oprion and small fixes. If you found any bugs report them now or never :P so i can fix them before the release ;)

Share this post


Link to post
Share on other sites

Hi Giallustio,

Thank you for the script and it works a treat. Not sure if this has been asked or if it is possible, but you be able to add the feature where the medics can see your fallen teammates. Like how it is done in

Invade & Annex coop mission. This would be a fantastic feature if this can be done.

Thanks,

Hondo

Share this post


Link to post
Share on other sites

I don't know this feature, could you explain it? Do you have any video/screen to show it?

Share this post


Link to post
Share on other sites

Hi mate,

Have a look at this youtube clip. This is game play from Invade & Annex coop mission. They do you use your revive script with this feature also added to it.

forward to 7mins 16sec and you can see what I'm talking about.

Hope this helps.

Thanks,

Hondo

Share this post


Link to post
Share on other sites

Okay, I finally managed to get a screenshot of the error I was getting with your revive script, the exact text is:

No entry 'bin\config.bin/CfgWeapons.'.

Is it possible it's just a typo causing this? I haven't seen too many instances where its okay to have both \ and / in the same line. Could it possibly be the . at the end of the line? It sounds too simple to have been missed but then I once lost a week of work debugging a program when I used an upper case O instead of a 0

Share this post


Link to post
Share on other sites

@Alias001

Just hit ok...i'll look at it soon or later, probably later, definitely later ;)

@Hondo_Au

I've already ready that kind of feature but...i'm not totally sure about it, maybe i'll add it or maybe not, we'll see...

Share this post


Link to post
Share on other sites

Thanks for the reply back Giallustio. Sorry do you mean you have this in mind to maybe added in the future? I have a TDM server with fairly large maps and I thought it would be handy for the each team to have a medic where they can see the fallen teammates to revive this makes it easier for medics to locate them. This should be only enabled for medics. I did start looking at how it's done in Invade & Annex mission, but thus far has been unable to replicate the same feature. if you have any code that you might thing work without having to spend anytime please send it my way if you dont mind.

Thanks,

Hondo

Share this post


Link to post
Share on other sites

It's pretty easy. Here an example:

while {true} do
{
drawIcon3D[directory_img.paa,[1,1,1,1],a,1,1,0,"TEXT",1];
};

I'll add it in the next version and i'll make it optional

Share this post


Link to post
Share on other sites

Thanks mate, I'll see if I can figure this out.... but if you could add this as an option in the next release that would be awesome.

Share this post


Link to post
Share on other sites

Awesome job, it would be nice if you could add carry on back when dragging them. Also there is a bug then someone is down and being dragged, they can press respawn and they will be revived.

Share this post


Link to post
Share on other sites

@Hondo_Au & Source

They will be in the next release, already implemented!

I've just to find the time to test them :rolleyes:

Share this post


Link to post
Share on other sites
@Hondo_Au & Source

They will be in the next release, already implemented!

I've just to find the time to test them :rolleyes:

If you need someone to help test let me know. More than happy to do so. :)

Share this post


Link to post
Share on other sites

Love the script so far, thanks a ton for all the work Giallustio! Grazie!

Had two quick questions and to be honest, they may have to do with some stuff outside your scripts. First, we have our script set so people cannot respawn on their own and have to be revived (BTC_disable_respawn= 1). If they are not revived before their BTC_revive_time_max, they actually respawn but way out in bottom left of the ocean. There any way to either disable that completely or at least force them to spawn in a specific location?

Second, is there any way to have people that join a mission in progress to spawn where the group currently is as opposed to where the group spawned at the start of the mission?

Share this post


Link to post
Share on other sites
Love the script so far, thanks a ton for all the work Giallustio! Grazie!

Had two quick questions and to be honest, they may have to do with some stuff outside your scripts. First, we have our script set so people cannot respawn on their own and have to be revived (BTC_disable_respawn= 1). If they are not revived before their BTC_revive_time_max, they actually respawn but way out in bottom left of the ocean. There any way to either disable that completely or at least force them to spawn in a specific location?

Init.sqf

Respawn = "None";

or

Place a marker called "respawn_west" where you want to have them respawn after the max time. ?

Share this post


Link to post
Share on other sites
Init.sqf

Place a marker called "respawn_west" where you want to have them respawn after the max time. ?

The second one ;)

For the jip i'm working on another script with this feature but it's pretty different, i'd prefer to leave the revive as revive, you could easily add it by your self ;)

Share this post


Link to post
Share on other sites
Init.sqf

Respawn = "None";

or

Place a marker called "respawn_west" where you want to have them respawn after the max time. ?

Duh, and double duh, I should have known that. Thanks :)

Share this post


Link to post
Share on other sites

There is a "bug" - Medic doesn't count as medic when in vehicle

suggest following patch:

diff --git a/=BTC=_revive/=BTC=_functions.sqf b/=BTC=_revive/=BTC=_functions.sqf
index 12d93af..6c200c6 100644
--- a/=BTC=_revive/=BTC=_functions.sqf
+++ b/=BTC=_revive/=BTC=_functions.sqf
@@ -440,6 +440,16 @@ BTC_check_healer =
	_men = [];_dist = 501;_healer = objNull;_healers = [];
	_msg = "No medics nearby.";
	_men = nearestObjects [_pos, BTC_who_can_revive, 500];
+	
+	if ( count _men == 0 ) then {
+		_vehs = [];
+		_vehs = nearestObjects[ _pos, ["Car", "Motorcycle", "Tank", "Helicopter", "Plane", "Ship"], 500 ];
+		{ { if ( typeOf _x in BTC_who_can_revive ) then { 
+			_men set [count _men, _x]; 
+		} } foreach crew _x; } foreach _vehs;
+	};
+	
+	
	if (count _men > 0) then
	{
		{if (Alive _x && format ["%1",_x getVariable "BTC_need_revive" select 0] != "1" && ([_x,player] call BTC_can_revive) && isPlayer _x && side _x == BTC_side) then {_healers = _healers + [_x];};} foreach _men; 

Share this post


Link to post
Share on other sites

Hmm, so I have a question then now that I see how the script works. Even with not allowing self revive, people will respawn after a set period of time. That may actually cause some issues for me. I have some end game triggers based off of team members either being at a location or dead, and that won't work if people revive off in some 'prison'. I'll have to figure out a way to rename and regroup people that die and end up at the prison respawn...

Share this post


Link to post
Share on other sites

The best way i can suggest you (if i get it right), it is to set a variable for the players who die with the command player setVariable ["out_of_game",1,true]; and then use this var to check who is "alive"

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

×