Jump to content

Z1DDE

Member
  • Content Count

    17
  • Joined

  • Last visited

  • Medals

Community Reputation

5 Neutral

About Z1DDE

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. waituntil{time>2}; systemchat "Start"; // Writes out that the script has started if (count allPlayers isEqualTo 1) then { // counts players, if there is only one player then it ends the mission systemchat "not enough players"; endMission "END1"; }; //Creates Variables _allButTerrorist = playableUnits; // Gets all the units and creates a variable _Terrorist = selectRandom _allButTerrorist; // Randomizes one terrorist out of all players _allButTerrorist = playableUnits - [_Terrorist]; // Creates a variables for all the playes without the terrorist //Public Variables PublicVariable "_Terrorist"; // makes the _Terrorist variable public PublicVariable "_allButTerrorist"; // makes the _allButTerrorist variable public //Title Texts [["<t color='#ff0000' size='5'>Traitor!</t><br/>***********", "PLAIN", -1, true, true]] remoteExec ["titleText", _Terrorist, false]; // Displays a titletext to show you're the traitor [10] remoteExec["titleFadeOut", _Terrorist, false]; // Fades out titleText [["<t color='#00FF00' size='5'>Innocent!</t><br/>***********", "PLAIN", -1, true, true]] remoteExec ["titleText", _allButTerrorist, false]; // Displays a titletext to show you're innocent [10] remoteExec["titleFadeOut", _allButTerrorist, false]; // Fades out titleText for innocent //Ending waitUntil {uisleep 1;!alive _Terrorist}; // If the terrorist Dies Then innocent win endMission "END1"; Here is all the code, I don't know if _Terrorist and _allButTerrorist needs to be public variable but i just did incase. With this there are no errors and everything works while hosted on my server. I also added comments just to make it easier for the future.
  2. I've got it working now, you just needed a extra pare of bracket on the text [["<t color='#ff0000' size='5'>Traitor!</t><br/>***********", "PLAIN", -1, true, true]] remoteExec ["titleText", _Terrorist, false];
  3. Nothing happens, i tried just a normal titleText and that worked. somethings not working with the remoteExec i guess ?
  4. Also i flipped _Terrorist and allPlayers becuase allPlayers - _Terroris wasnt working. Example
  5. I have a bit of a weird error? No titleText is displaying but there isnt any errors showing ?
  6. @ZaellixA I also get this error with this code running: ["Traitor!"] remoteExec["hint", _Terrorist, false]; ["Innocent!"] remoteExec["hint", allPlayers - _Terrorist, false];
  7. @ZaellixA How would i use this but with titleTexts instead ? I really appreciate the help btw! ["Traitor!"] remoteExec["hint", _Terrorist, false]; ["Innocent!"] remoteExec["hint", allPlayers - _Terrorist, false];
  8. Well the gamemode isnt made for AI use so I don't know if it is needed
  9. Yes i forgot to mention. I realized that and changed it
  10. I've got everything working now! waituntil{time>2}; systemchat "Start"; if (count allPlayers isEqualTo 1) then { systemchat "not enough players"; }; _Terrorist = selectRandom allPlayers; _Terrorist setVariable ["terroristVar", player, true]; if (player isEqualTo _Terrorist) exitWith { titleText ["<t color='#ff0000' size='5'>Traitor!</t><br/>***********", "PLAIN", -1, true, true]; titleFadeOut 10; } else { titleText ["<t color='#00FF00' size='5'>Innocent!</t><br/>***********", "PLAIN", -1, true, true]; titleFadeOut 10; }; waitUntil {uisleep 1;!alive _Terrorist}; systemchat "Good Job";
  11. When I used playableUnits instead of allUnits a error happend so I switched back. But I also realized that the _allPlayers = allUnits; makes it so titletexts doesnt work ?
  12. @GEORGE FLOROS GR I'll try explaining what I want: This selects all units and makes them to _allPlayers, right ? _allPlayers = allUnits; _Terrorist = selectrandom _allPlayers; Then this chooses randomly one of them and makes him _Terrorist Then I would want it to display a titleText that says that you're the traitor if you were to become _Terrorist
  13. Thanks alot! my code now looks like this: waituntil{time>2}; systemchat "Start"; _allPlayers = allUnits select {isPlayer _x && {alive _x} && {!(_x isKindOf "HeadlessClient_F")}}; if (count _allPlayers isEqualTo 1) exitWith { systemchat "not enough players"; }; _Terrorist = selectrandom _allPlayers; if (player isEqualTo _Terrorist) then { titleText ["Now this is epic", "PLAIN"]; waitUntil {uisleep 1;!alive _Terrorist}; systemchat "Good Job"; Uisleep 3; []execvm "script.sqf"; Only thing I don't think works is: if (player isEqualTo _Terrorist) then { titleText ["Now this is epic", "PLAIN"]; I don't think im suppose to use "player" here ? You can also see ive changed _player to _terrorist but eitherway how would I check if it actually makes someone the terrorist? what I would like is for it to display a titletext when you're the traitor. I know how to that, but at the moment it isnt displaying the titletext and that is probably because im using player. So what I was wondering is what would I do ? thanks !
  14. Hey, im kinda new to Arma 3 scripting and I was wondering how I would change the player variable. I've tried setVariable but it isnt working and I don't know if im doing it wrong ? Thanks!
×