Jump to content
  • 0

Why it doesnt work ? :(


lmapper

Question

9 answers to this question

Recommended Posts

  • 0

1. why do you use RE (remote execution)? that will send the text to ALL players, I think you just want to show the message for the current player? :D

just use titleText locally:

titleText ["You have radio", "PLAIN"];

no need for RE?

"ItemRadio" in items player

should work, but I don't know, maybe because you used the wrong text message you could never see it yourself (RE is only visible for all other players, not yourself)

Link to comment
Share on other sites

  • 0

1. why do you use RE (remote execution)? that will send the text to ALL players, I think you just want to show the message for the current player? :D

just use titleText locally:

titleText ["You have radio", "PLAIN"];

no need for RE?

"ItemRadio" in items player

should work, but I don't know, maybe because you used the wrong text message you could never see it yourself (RE is only visible for all other players, not yourself)

Initially I thought that the blame for the function "RE", but when I gave all players the radio - all the same wrote that no radio. 
Logically, my code needs to check the presence of all the radio, of all the players to choose one, and depending on the availability of this radio player - send one message to all "have" or "haven't". 
But if everyone has a radio - why it is all the same wrote that it is not present? 
Thank you again!
p.s. Sry for my bad english lang. :)
Link to comment
Share on other sites

  • 0

well maybe you should describe what you actually want to do in the first place?

do you want to contact other placers with the radio or what is it you want? :D

 

what you do in your first script is you check for a radio on the current player who executes the script and then send a text to all players (these players do not check if they have a radio)

if you want to check every player for a radio you can't use RE at all, but need to do a custom public variable and check it after the message is received by each player and not before.

 

that is easy to do in Arma, but still not the easiest script do do if you have no prior knowledge of network programming and Arma scripting :(

what I mean by that is that it will not be easy for a beginner to do a script like that.

Link to comment
Share on other sites

  • 0

well maybe you should describe what you actually want to do in the first place?

do you want to contact other placers with the radio or what is it you want? :D

 

what you do in your first script is you check for a radio on the current player who executes the script and then send a text to all players (these players do not check if they have a radio)

if you want to check every player for a radio you can't use RE at all, but need to do a custom public variable and check it after the message is received by each player and not before.

 

that is easy to do in Arma, but still not the easiest script do do if you have no prior knowledge of network programming and Arma scripting :(

what I mean by that is that it will not be easy for a beginner to do a script like that.

Link to comment
Share on other sites

  • 0

I wrote something similar some time ago:

////RADIO TRANS-MISSION get it? it's a pun.
// This part is inpsired by the selfbloodbag by Krixes @ Opendayz and Player 2 @ ZombZ.net
private ["_cordinates","_nocoridnates","_mradio"];
_mradio = (magazines player) + (weapons player); 
if ("ItemRadio" in _mradio) then {
        hasRadio = true;
    } 
	else 
	{ 
		hasRadio = false;
	};
    if(hasRadio && _canDo) then {
           titleText [format["Mission info, check your map!"], "PLAIN DOWN"] call RE; // you probably want RE.. why would you want to transmit a message to yourself?
		   hasradiomarker = _cordinates;
			publicVariable "hasradiomarker";
			[] execVM "hasradio_marker.sqf";
    } else {
       titleText [format["Unknown mission (you have no radio!)"], "PLAIN DOWN"]; // This one should probably not be RE since some people don't have radios..
		noradiomarker = _nocordinates;
		publicVariable "noradiomarker";
	   [] execVM "noradio_marker.sqf";
};
////I'll just show myself out.

Note: This will not work, it's just the general idea. This would execute the script everyime someone gets a radio.. or has one.

In the mission I made I included a fn_selfaction script instead which, when you got a radio opend a scroll menu to use it and a mission would appear on the map.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...