Laviski 1 Posted October 31, 2012 ok to keep it simple i have 3 teams but only 2 can respawn. the other teams when they die they will get a black screen saying there dead and removing controls. here is what i have atm. guy on this team is named ResGuy1 trigger1: set repeat condition:!alive ResGuy1 act:ResGuy1Dead = true;[] exec "scripts\res_guy_dead.sqs" trigger2: set repeat condition:ResGuy1Dead; act: ResGuy1 moveincargo prision res_guy_dead.sqs: ; Fade to black. cutText ["You are dead!","BLACK OUT", 1] ; This should force the unit to stop. disableUserInput true the same is done for resguy2 resguy3. and when there all dead triggger: once condition: ResGuy1Dead and ResGuy2Dead and ResGuy3Dead; ACT: [] exec "scripts\lose.sqs"; the problem is when resguy1 dies the script is intiated but what happens is resguy2/3 get black screens too. I just want the black sceen happen to the person that dies until all 3 are dead then its game over. Note: the init.sqs ResGuy1Dead = false ResGuy2Dead = false ResGuy3Dead = false Share this post Link to post Share on other sites
kylania 546 Posted October 31, 2012 You're probably having problems with this due to negative karma for both writing SQS in 2012 and using disableUserInput at all. The reason it's happening is that you're running it from a trigger so as soon as guy1 dies it runs the program for everyone and you don't limit the program at all. You'd want to either check which unit it is inside the script or create the triggers locally so that they only run for each of these guys. Forcing someone's screen black and making them have to kill the game to do anything again just is a Very Bad Idea Indeedâ„¢. Find a spectator script and kick them into that instead. Share this post Link to post Share on other sites
Laviski 1 Posted October 31, 2012 well i did this mission before for ofp years ago. this is used in a lan scenario and it was aimed at a bunch of role players. in ofp there was a limit on what you could do. I will look around for a spectating script it would be better for mp (but what about dem screen watchers :P ) it may solve my problem. Share this post Link to post Share on other sites
kylania 546 Posted October 31, 2012 This script pack has a spectator script in it. Can't really find any standalone ones though, but every revive system seems to come with one and several PvP missions have one you can pretty easily pull out. Share this post Link to post Share on other sites
Laviski 1 Posted October 31, 2012 (edited) You'd want to either check which unit it is inside the script or create the triggers locally so that they only run for each of these guys.. any ideas how to achieve this? also change my res_guy_dead script to: ; Make sure this is only displayed to the player who is respawning ; *and* only if at least 5 seconds have passed - otherwise this script ; will run when the game starts (assuming the player isn't killed after ; only 5 seconds ;) ? not local _this or time < 5 : exit ; Fade to black. cutText ["You are dead!","BLACK OUT", 1] ; Move the player out of the playing area - so he's not killed while waiting ; to respawn. This is on a small island off Malden. Work out your own on the other islands. _this MoveinCargo Prision ; This should force the unit to stop. disableUserInput true ; Keep looping until they're both dead. #loop ~1 ; When both guys are dead, the game can end. ? ResGuy1Dead and ResGuy2Dead and ResGuy3Dead: goto "game_over" goto "loop" #game_over ; Fade back in. cutText ["","BLACK IN"] ; And finally give control back to the player. disableUserInput false Edited October 31, 2012 by Laviski Share this post Link to post Share on other sites
kylania 546 Posted October 31, 2012 Easiest way is to have three triggers. Condition: local ResGuy[color="#FF0000"]1[/color] && !alive ResGuy[color="#FF0000"]1[/color] OnAct: nul = [ResGuy[color="#FF0000"]1[/color]] execVM "scripts\res_guy_dead.sqf"; Just change the red 1's to 2 or 3 for the other guys in their own triggers. The triggers would run on everyone's PC but since you have "local" in there it'll only activate for that player. res_guy_dead.sqf would be just one script and who you call it as would change who it affects. // Sets _deadguy to whatever you feed the script _deadguy = _this select 0; // Init whatever spectactor script here. // _deadguy execVM "spect.sqf"; _deadguy moveInCargo prison; // Fade to black. cutText ["You are dead!","BLACK OUT", 1]; // This should force the unit to stop. disableUserInput true; Share this post Link to post Share on other sites
Laviski 1 Posted November 1, 2012 this still doesn't work :( - if i'm resguy1 and i shoot resguy2 i still get the black screen. Share this post Link to post Share on other sites
kylania 546 Posted November 1, 2012 Well sure, you're testing this in the editor? If so, everything is local to you since you're the server. :) To properly test it you'd need to start an MP server and have someone else connect as resguy2 then shoot him. Share this post Link to post Share on other sites
Laviski 1 Posted November 1, 2012 ok cheers. will finish the mission with the other endings first then will come back to this. it ain't a mission breaker as if all else fails stick them on an a island. Share this post Link to post Share on other sites