Jump to content

KaRRiLLioN

Member
  • Content Count

    1198
  • Joined

  • Last visited

  • Medals

Everything posted by KaRRiLLioN

  1. Killed, for some reason, is local. Â The Dammaged eventhandler would be great except it doesn't say who the killer is. What I did to get around this is I put a killed eventhandler on the unit to watch. Â You can put the EH on only the local Civilian if you want. Then on each client, make a loop that you exec from init.sqs. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #Init unit_killed = objNull #Monitor ~1 ?isNull unit_killed : goto "Monitor" player groupchat Format ["The civilian %1, was killed by %2.",unit_killed,unit_killer] goto "Init" In the script for the killed EH, it grabs the killed and the killer. Â Simply have it do this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _killed = _this select 0 _killer = _this select 1 unit_killed = _killed; publicVariable "unit_killed" unit_killer = _killer; publicVariable "unit_killer" Exit Now, in MP whenever a unit with the killed EH is killed, it'll publicvar the information and the script running on each client will give them a message. I've done this before for other missions to track civilian deaths where it would deduct points from a team that killed civilians.
  2. I've been staring at this so long, my eyes are gonna bleed.  Here's the issue.  This squadmarker script creates a marker for each string in an array and then tracks the marker for each person on your team.  Obviously it's only supposed to track your team. Since createMarker is Global and all other Marker commands appear to be Local, it seems this should work.  When I join a dedicated server and play the mission and leave on all AI, then I only see my team's markers.  But if another player joins the opposing team, suddenly, all markers are visible to each team.  I can't figure it out! It works as it should locally on my PC and also on the dedicated UNTIL another player connects.  If anyone can point out what could cause this, I'd be immensely grateful. Here's the code: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> private ["_run","_wMarkers","_eMarkers","_rMarkers","_x"]; _wMarkers = ["W1","W2","W3","W4","W5","W6","W7","W8","W9","W10","W11","W12","W13","W14","W15","W16"]; _eMarkers = ["E1","E2","E3","E4","E5","E6","E7","E8","E9","E10","E11","E12","E13","E14","E15","E16"]; _rMarkers = ["R1","R2","R3","R4","R5","R6","R7","R8","R9","R10","R11","R12"]; _markerType = "SELECT"; _markerList = []; if (SIDE Player == WEST) then {_markerList = _wMarkers}; if (SIDE Player == EAST) then {_markerList = _eMarkers}; if (SIDE Player == GUER) then {_markerList = _rMarkers}; if (!(SIDE Player in [WEST,EAST,GUER])) then {_markerList =[]}; //Local Server creates all Markers so it gets all arrays if (Local Server && !Local Player) then {_markerList = _wMarkers + _eMarkers + _rMarkers}; _x = 0; player groupChat format ["Markers: %1",_markerList]; while {_x < (count _markerList)} do { sleep .02; _string = _markerList select _x; _marker = format ["Marker%1",_string]; _color = call compile format ["Color%1", SIDE Player]; //Local Server only creates all Markers if (Local Server) then {createMarker [_marker, getPos Server]}; _marker setMarkerShape "ICON"; _marker setMarkerType _markerType; _x = _x + 1; }; _x = 0; _y = 0; _run = TRUE; //Local server should exit and only players from here on if (!Local Player) exitWith {Hint "Exiting"}; //loop nests so it doesn't exit after 10,000 loops. _i = 0; while {(_i < 9999)} do {  _j = 0;  while {(_j < 9999)} do  {    _k = 0;    while {(_k < 9999)} do    { while {_run} do { sleep .001; _string = _markerlist Select _x; _unit = call compile _string; _color = call compile format ["Color%1", SIDE _unit];       //this should only allow markers for teammates to be visible. if (Alive _unit && SIDE _unit == SIDE Player) then { _marker = format ["Marker%1",_string]; if (isPlayer _unit) then {_marker setMarkerColor _color} else {_marker setMarkerColor "ColorWhite"}; _marker setMarkerShape "ICON"; _marker setMarkerSize [.5,.5]; _marker setMarkerText format ["%1  %2",_string,Name _unit]; _marker SetMarkerType _markerType; _marker SetMarkerPos GetPos Call compile _string; } else {_marker SetMarkerType "EMPTY"}; _x = _x + 1; if (_x > Count _markerList) then {_x = 0}; };      _k = __k + 1;    };    _j = _j + 1;  };  _i = _i + 1; };
  3. I've thought of that, but there's a timing issue involved that might still allow the other markers to blip on. I'll have to patch around it. I think I figured out how, just need to implement it.
  4. As noted in my first post, yes I used createMarker, which, BTW, is Global not Local. And as noted in my second post, I discovered setMarkerText is also Global. That was the problem. Since I can't setMarkerText locally, I'm just pre-placing markers again since I can't set any text to them or the stupid things will show up again. Also, I'm sticking with an SQS for this now since the function is messier and the SQS works just fine and is cleaner. For my CTF scripts I went to SQF. Since I script everything in notepad, I can't be arsed to format the entire bloody thing for the forum. It takes longer to hit space several times for indenting when I'm scripting instead of hitting tab.
  5. After mucking around, pulling my hair out and killing several of god's gentle creatures, I think I found out why this is happening. When you setMarkerText, the marker suddenly becomes visible to everyone. Â I tested on a dedicated server by creating a marker locally. Â I then set Size, color, type and the marker remained visible only to me. Â Then I setMarkerText to "Hello" and voila! Â Everyone could see it. So all my wonderful plans for putting people's names on their markers is not going to work. Â Unless there's some simple solution. Here's an SQS version of my script, which actually looks much cleaner than the SQF version, thanks to all that nesting to beat the 10K loop limit. Â This one doesn't create the markers because I was eliminating possibilities for the issue. Â I'll reimplement the createMarker part then do everything but setMarkerText for now, I guess. The reason my old one seemed to work properly until another player joined the other team is because the Local Server only creates the markers, but the player script sets the marker text. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _wMarkers = ["W1","W2","W3","W4","W5","W6","W7","W8","W9","W10","W11","W12","W13","W14","W15","W16"] _eMarkers = ["E1","E2","E3","E4","E5","E6","E7","E8","E9","E10","E11","E12","E13","E14","E15","E16"] _rMarkers = ["R1","R2","R3","R4","R5","R6","R7","R8","R9","R10","R11","R12"] #MarkerTracker _markerType = "SELECT" ?(SIDE Player == WEST) : _markerList = _wMarkers ?(SIDE Player == EAST) : _markerList = _eMarkers ?(SIDE Player == RESISTANCE) : _markerList = _rMarkers ?SIDE Player in [WEST,EAST,RESISTANCE] : Goto "Track" Exit #Track _x = 0 #TrackLoop ~.01 _string = _markerlist Select _x _unit = call compile _string ?Alive Call compile _string : Goto "Mpos" _string SetMarkerType "EMPTY" Goto "Skip" #MPos _string SetMarkerType _markerType _string SetMarkerPos GetPos Call compile _string _string setMarkerText format ["%1 Â %2",_string,Name _unit]; _string setMarkerSize [.5,.5] #Skip _x = _x + 1 ?(_x > Count _markerList) : _x = 0 Goto "TrackLoop"
  6. KaRRiLLioN

    3 way CTF

    I tried it in OFP, but unless something has changed, the Civilians are always friendly/neutral to everyone and their flag can't be taken by any side. I can't remember if they can take a flag or not. The other downside is any civilian killed by anyone is considered a friendly kill and you become enemy side to even your teammates. In the editor you can set the independent/resistance side friendly/enemy to other teams, but that option doesn't exist for civs.
  7. KaRRiLLioN

    3 way CTF

    I've already made a CTF script that dynamically accepts 2-3 teams, depending on if the flag exists in the mission or not. I.e. if the Resistance flag isn't in the mission, it'll detect that and config for East v West. I'm still working out a couple of issues with the squadmarkers scripts, atm, but once I've gotten that sorted, then I'll post a template.
  8. KaRRiLLioN

    IF THEN logic/syntax problem

    In the editor you have to do it like this: s = [] execVM "script.sqs" s is a dummy variable that makes the code parser in the editor happy. I had to do that for a vehicle respawn script that execs it from the init field of the vehicle.
  9. KaRRiLLioN

    Infinite Loop - possible?

    I solved it quite simply. Â I just copied and pasted my main loop 5 times in a row, one after the other, so once it's done with one, it starts the other. Â That's as clean as it gets. And I just finished converting a ton of SQS scripts to SQF, too. Â GAH. Â What I REALLY want to know is if changing the while do loops to infinite would break something somewhere else, or if BIS can simply adjust a hardcoded number somewhere in the ArmA code and release a 1.03 patch. Â I have a squadmarker script that loops and keeps tabs of squadmates with their names, etc. and it only sleeps for .02. Â Otherwise the updates are a little jerky. Â Unfortunately, that means it stops running at about 5:37 into the game, give or take a few seconds. I'll probably nest the sucker for now. Â I would just have it execVM the script over again after the loop, but it creates the markers, and I just figured out createMarker is global for some bloody reason.
  10. KaRRiLLioN

    Dedicated Server Beta available

    Has anyone figured out how to keep the dedicated server from dropping from the gamespy list? A restart is the only method that works, but I hate to do it when the server has people on it. I have the master server pointed to correctly in my dedicated cfg.
  11. KaRRiLLioN

    Variables in MP

    Look in this thread: http://www.flashpoint1985.com/cgi-bin....;hl=jip
  12. Ah, reminds me of the original OFP days of working out BIS's CTF with bloody triggers. Gah! That script Ziggy posted will work, but it's an old version of my CTF script. I've discovered a few bugs that happen with JIP so I'm gonna rejigger my script to account for those anomolies. I also have a newer version with dynamic variables. That script will still work. Just place your flags on the map and follow the instructions in the comments of the script.
  13. KaRRiLLioN

    Flags textures

    Here are the paths to the flag textures: USA Flag: "\ca\misc\data\usa_vlajka_co.paa" SLA Flag: "\ca\misc\data\sever_vlajka.paa" Royal Sahrani (Independent) Flag: "\ca\misc\data\jih_vlajka.paa" Russian Federation Flag: "\ca\misc\data\rus_vlajka.paa" My question is....Why in the heck didn't BIS port flags.pbo from OFP?
  14. If you use the trigger as suggested, it will run on every human player each time they respawn. Since you're using "Player" in the condition, that also makes it local to each human player. In other words, you don't need to worry about further localizing the script for each human player. Using a killed EH is fine, but the trigger works nearly flawlessly.
  15. KaRRiLLioN

    JIP Script Handling

    Back to the original question, I would like to know. I've ported RWS (Real War Simulator) from OFP. Â It's similar to RTS and, of course there are lots of global vars floating around. To save time, I've left everything as regular scripts. Â When I re-do it from the ground up, I'll use SQF scripts. Anyway, from testing RWS last night, here's what happened. Â Those of us who were present from the start of the game had things go smoothly. Â When you take a territory, a global var is sent out. For those who JIP'd, everything was still at initial status. Â They didn't see captured territories. The commander also assigns roles, i.e. tanker, pilot, infantry. Â This is done with a global var which is then detected by a looping script that assigns the role to the appropriate person locally. Â If someone dropped from the game and came back, they would not still have the role. Â This is unavoidable since the script did it locally and reset the global var once used. So, what I've determined is that if global vars have changed from the time a JIP'er joins, they need to have the current state of the global vars transmitted to them. Obviously, the onPlayerConnected script sounds like the perfect candidate. Â But is it capturable by the server during a game, or is it part of a built in script like onPlayerKilled is? I assume the onPlayerConnected is global when the player connects. Â The server could detect this, pause for a moment to allow the player to run init.sqs, and then broadcast the relevant global var states to bring the person up to speed. Â It could also transmit the time, etc. to synchronize the player. Has anyone tested this script and can verify my assumptions? Â I plan on testing it as well, but if someone can save me some time... Another thing came to mind. I could put a boolean in init.sqs called NewPlayer. When a person runs init.sqs, it then publicVariables NewPlayer and the server knows to run the script that declares all global vars. That might work even better. Perhaps put a small pause at the end of init.sqs before the boolean to give the player time to synch properly, then hand them the info.
  16. KaRRiLLioN

    Need tutorial for 3-team C&H

    You need to click on the box in the upper right of the screen where you change the mission date, etc. and at the bottom of the screen, set resistance or independants friendly to nobody.
  17. KaRRiLLioN

    Need tutorial for 3-team C&H

    Unless things have changed, you'll run into a problem. If the C&H mission requires that you take the flag to capture the territory, then the flagside will need to be RESISTANCE at the start of the mission. That makes it so either East or West can take it. But Resistance can't. I made some 3-way CH's for OFP and what I did was if a Resistance unit was near a neutral flag, then I'd change the flagside to East so he could take it. Those CH's *might* translate into Arma, but I haven't had the chance to attempt a port. Once a flag is taken by a side, then it doesn't matter, of course, since the enemy can take it. Anyway, once I'm done porting some other missions, I'll look at the C&H's I have and see if one might make a decent template.
  18. I'm porting missions over to ArmA, and yes, most of them still use SQS scripts instead of SQF scripts--but I'll get around to that later. As you can guess, I'm getting a lot of errors since they've changed some functions, i.e. {} for code and call compile for string code. Is there some way to have Arma dump the errors into a logfile so I can see the entire lines of code that are erroring out? Â As it is, most of it runs off the screen so quickly that I can't make it out. Also, couple of other questions-- I have this line of code: I was using {} inside some of these, but now I have to go to quotes. Â Inside this, do I need double quotes now for the publicvariable? Â I just can't remember and this particular mission uses a LOT of call compile strings for dynamic variables.
  19. KaRRiLLioN

    Dedicated Server Beta available

    One thing that bugs me is that the mission files are locked when the server is running. I sometimes do a quick update of a mission and then connect to the server to delete the old one and upload the new one. But while the server is running, the mission file cannot be deleted and I have to shut down the Arma server to do so. I've even made sure the mission file isn't the one loaded on the server, but it doesn't seem to make a difference.
  20. KaRRiLLioN

    Dialogs...

    Get Vektorbosen's dialog tutorial. That's what I used to learn them for RTS-3. But another question is that some of the definitions for dialogs have changed. I tried porting some over from OFP and I'm getting errors. What we need is a new list of definitions, perhaps on the Wiki.
  21. KaRRiLLioN

    The Docks COOP 1-14

    Just FYI, I made a mission where the players start on a small island and have to board boats and assault two smaller islands. Only on that mission do I see a lot of CTD's and people dropping from the game. The desynch is also higher on that mission. I'm assuming there's some bug to do with water that's causing this. There are AI patrolling the smaller islands as well. After I return and play again, I don't crash, but there's still desynch. I have two other coops that are on land, even though one is in Dolores, near the rivers. Those don't crash at all with almost 0 desynch. I think there's some bug with water/boats causing this.
  22. KaRRiLLioN

    German Patch 1.01 released

    Read the previous page or two. Don't apply the German 1.01 patch to the downloaded version. It's already patched!
  23. KaRRiLLioN

    German Patch 1.01 released

    Yep, the Morphicon download version is already 1.01. What's odd though is that usually a patch won't let you patch unless the version numbers match. That's what threw me off. Any time in the past I tried to patch OFP with an incorrect patch, it'd fail and let me know. I have a feeling Morphicon is making a killing off online sales right now due to impatient Europeans and North Americans!
  24. KaRRiLLioN

    How to play CZ/GER version completely in English

    I've also hit the same issue--the downloadable version I purchased from Morphicon will give a securom error if you patch to 1.01 with the current German patch. That's because the patch most likely updates securom whereas the dload version uses an online activation key. You only get 3 activations with the online key until you have to contact Morphicon for more, so I'll probably have to burn up another one to uninstall/reinstall. BTW, does the online version suffer from the same FPS issue even though it doesn't use Securom? Guess I'll reinstall and find out myself.
  25. KaRRiLLioN

    German Patch 1.01 released

    I purchased the online version from Morphicon which doesn't use Securom and installed it then used the online activation. Â Afterward, I installed the German 1.1 patch. What I didn't stop to think of is that there would probably be a different patch for the online version as compared to the Securom DVD version. Â D'oh. Now it won't start because I get a Securom no-disc error. Â Gah. And you only get to activate using the online key 3 times--so now I have 2 more to go. Any way to work around this? I checked Morphicon's site and didn't see a separate dload for the online version. Perhaps I missed it?
×