Jump to content

poweruser

Member
  • Content Count

    248
  • Joined

  • Last visited

  • Medals

Everything posted by poweruser

  1. poweruser

    pandemic

    This game is so sick. Do you guys realize, that by killing all of the virtual mankind, you're killing your virtual yourself as well? Go ahead and commit suicide, GJ folks!
  2. It doesn't matter where the GL is on map, right? What about [1,1,1] , [42,1337,0] or [0,47,11] then? logic = _group createUnit ["LOGIC", [1,1,1], [], 0, "NONE"];
  3. Regarding the error message, the position is invalid. _logic = _group createUnit ["LOGIC", [color="Red"]position this[/color], [], 0, "NONE"]; No. As (_tflagname + " = " + (_this select 1)) results in: "US = Neutral" (if the content of the variable _tflagname was "US"). Remove the call compile in the first line, then _tflagname holds the string "tflag1"; Yes, for those who are connected at the time you set the vehicle init. jip-clients execute it automaticly when they connect (http://community.bistudio.com/wiki/setVehicleInit) Variables that have been broadcasted at least once by publicVariable are synchronized on jip-clients automaticly to the last value sent. For jip-clients the init.sqf is run after the synchronization stuff happens, meaning that you overwrite the variables with the default values, after you've received them. Just define those variables only on the server and broadcast them at the beginning. And during the game you're already broadcasting them when the flags are captured (http://forums.bistudio.com/showthread.php?t=99191) in the init.sqf if(isServer) then { [indent]tflag1 = "Neutral"; publicVariable "tflag1"; tflag2 = "Neutral"; publicVariable "tflag2"; tflag3 = "Neutral"; publicVariable "tflag3";[/indent] };
  4. Did you initialise the variables flag1, tflag1, marker1 and CP1 first?
  5. compile performs a type conversion from STRING to CODE. And call then executes that code and its return value is stored in _flg (the variable tflag1 in the first iteration of forEach) . Technically it's a function that is created and called. http://community.bistudio.com/wiki/Function#Execution
  6. shk's concept does work, he just missed to apply it to the marker name and marker text as well. { _flg = call compile format ["tflag%1",_x]; _markertext = format["CP_%1", _x]; _marker = format["marker_%1", _x]; switch _flg do { case ("US"): { _marker setMarkerTypeLocal "Faction_US"; _marker setMarkerSizeLocal [1,0.6]; _marker setMarkerTextLocal (_markertext + " (US)"); }; case ("PLA"): { _marker setMarkerTypeLocal "Faction_RU"; _marker setMarkerSizeLocal [1,0.6]; _marker setMarkerTextLocal (_markertext + " (RUS)"); }; }; } forEach [1, 2, 3];
  7. A trigger with !alive nameOfObject or getdammage nameOfObject > someDezimalNumberValue as condition, maybe?
  8. Your score-adder is running on all connected machines, that's why it adds 2 points when you have a server + one client and 3 points when you have a server + two clients, and so on. 1) You want it to run on the server only 2) It has to be a AND / && in the while condition. An OR means that the loop keeps adding until both sides have >= scorelimit points 3) I've shortend the six 'if's to two 'count's. It does the same, just less code [noparse] if(isServer) then { while{(uspoints < scorelimit) && (plapoints < scorelimit)} do { sleep tickettime; uspoints = uspoints + ({_x == "US" } count [tflag1, tflag2, tflag3]); plapoints = plapoints + ({_x == "PLA"} count [tflag1, tflag2, tflag3]); publicVariable "uspoints"; publicVariable "plapoints"; }; }; [/noparse]
  9. poweruser

    Making Actions Private

    execute 'addaction' only those clients that shall see/use the action: [noparse] if(local this) then { this addAction [("<t color=""#8A8A8A"">" + ("Check Score") + "</t>"),"flagcheck.sqf"]; }; [/noparse] Remove the added action once your player unit dies. The code below assumes that the id of the automaticly added action (on every respawn) is and stays the same, as the manually added one at the beginning. If that's not the case you could do something like this in the killed-eh code instead: for [{_x=1},{_x<=10},{_x=_x+1}] do { (_this select 0) removeAction _x; }; [noparse] if(local this) then { checkScoreActionId = this addAction [("<t color=""#8A8A8A"">" + ("Check Score") + "</t>"),"flagcheck.sqf"]; this addEventHandler["killed", "(_this select 0) removeAction checkScoreActionId;"]; }; [/noparse]
  10. poweruser

    "Comm" help

    For crCTIs: To set waypoints: L.Alt + L.Shift + L.Mouse click on map To enter unit cam of a unit/vehicle: L.Shift + L.Mouse click on the unit/vehicle in the map (Comm Center is required for the unit cam, in the @bis_res missions the map radar tower) To give special orders to your own AIs in your group, select them with the F1 - F12 keys and L.Shift + L.Mouse click on map where they shall execute the given order That is done automaticly by the mission, and this feature is called: Town Groups In some missions its on by default, in some it can by enabled/disabled in the mission options (left box, look for "TG"), and in others the commander has to do a extra town groups upgrade to enabled it.
  11. poweruser

    What is wrong with this script?

    As you say yourself, that you have no clue on what you put in the script, you will be better off starting over with the following approach: For the useraction, I'd suggest that you define it in the objects config Reference: http://community.bistudio.com/wiki/UserActions class YourBreachDoorObject: someClass { // your config class Useractions { class breach_action { position = "view"; // change if needed displayName = "Breach me"; radius = 5; condition = "(""RC_Breach"" in (magazines player)) && (player distance this) < 5"; statement = "player sidechat ""testing"";"; // execute a script here, that does the breaching }; }; }; (adjust the class names of course, to match your config) Without (player distance this) < 5 the action to breach would apprear in the AI's action menu (FX - 6) once one of the player's AIs is near to it. And afaik its not possible to find out who used the action (what player or AI), just on what client. Then you need some mechanism to remember that the door has been breached, otherwise the action would still show up after using it. Define a custom animation (translation, rotation, doesnt matter) on your object (for example: "alreadyBreached"). Reference: http://community.bistudio.com/wiki/Animations http://community.bistudio.com/wiki/Model_Config And animate it to phase 1 when breaching it, with : this animate ["alreadyBreached", 1]; The additional check in the useraction condition: (this animationPhase "alreadyBreached" < 0.5) When the custom animation is correctly defined, the animation will be played on all clients, meaning that your addon will be mp-compatible. To undo the breaching during the game, execute this on your object: this animate ["alreadyBreached", 0]; Then the action will show up again, assuming that the other conditions are met aswell.
  12. poweruser

    Gamespy no longer supporting?

    Gamespy is up and working again since 10th of March. And there are no public OFP:CWC servers, that's why your server list is empty. Currently there are only OFP:R ones. sorry
  13. poweruser

    OFP Addon request thread

    Right, we didn't do ctis, but the Roughnecks [RN] did one. A mfcti on cat_afghan based on the addon pack we used. It's name is: "MFCTI.COM Coop: Afghanistan R7" They played it on their servers: http://stats.swec.se/ofp/server.php?server=4623 and http://stats.swec.se/ofp/server.php?server=1996 I've played it a few times and you're lucky that i don't clean my MPMissionsCache frequently. The copy that I have of it dates back to August 2007: http://www.megaupload.com/?d=5GK7EBRI
  14. poweruser

    OFP Addon request thread

    You are awaking memories, not of that specific cti mission, but of my time at Razor's Squad. Here you go: http://www.megaupload.com/?d=H50BJSL0
  15. poweruser

    Mission requests and ideas

    http://xrserver.com/addondb/
  16. poweruser

    Vehicle Model Sinking

    You probably need to define the land contact points of the tires. If you dont have a "Landcontact" LOD in your model yet, create one and in it create a single vertex for each tire at the position where it shall touch the ground.
  17. poweruser

    Gamespy no longer supporting?

    In case someone wants to set up his ofpwatch, here's an incomplete list of servers that are currently online:
  18. poweruser

    source code

    It probably does take a few months to get a good overview and insight over everything, when the source code documentation is as incomplete as the modding documentation sometimes, but I would do it. At the beginning my focus would be on multiplayer bugs which can ruin a game from time to time.
  19. setHit should do the trick. Now you just have to find out the name of the tail rotor selection in the model.
  20. Those might be mission related entries. The root of the description.ext can be accessed with the command missionConfigFile, just the same like the game config can be accessed with the command configFile. Check the mission scripts for statements like: getNumber (missionConfigFile >> "statsColumn")
  21. When the slot is disabled, the unit won't be created, nor will the variable given in the name field be initialisied. That means that currently you're running code on a not-initialised variable. You can handle this case by using the count command f.e. To check how many vips are alive: {alive _x} count [vpciv1,vpciv2] It will only count the cases that are 'true', and ignore the cases being 'bool', or 'false' To check if a variable has been initialised (unit has been created): !isNil "vpciv1" Further detailed notes: Script commands with boolean return value, will return the value 'bool' (neither 'true', nor 'false') when run on not-initialisied variables. ArmA1 could not handle that returned value within over statements. It won't throw an error message, but simply skip the whole statement that the returned value is part of. Triggers won't fire when their condition returns 'bool'. From what you've written in your post, I assume that ArmA2 behaves exactly the same way. Examples: (Variable "ab" is not initialised. Variable "cd" and "ef" are, and have type Object) if(isNull ab) then { // code block 1 } else { // code block 2 }; // both, the if and the else case will be skipped. nothing of the two code blocks is executed here isNull ab -> returns 'bool' isNull cd -> returns 'true' isNull ef -> returns 'false' (isNull ab) && (isNull cd) && (isNull ef) -> returns 'bool' // as soon as one part of an expression returns 'bool', the whole expression will return 'bool'
  22. switchmove doesn't trigger an AnimDone-Event Name switchMove "DancingMove1"; waituntil { animationState name != "DancingMove1" }; Name switchMove "DancingMove2"; ... should work, but havent tested it.
  23. Arm.sqf: On OFP and ArmA1 dedicated servers, the command animationPhase always returned 0. I don't know if it's still the same in ArmA2, you might want to check that. If it still returns 0 always, you have to work around it (in singleplayer games and multiplayer games with a client-host you don't need to do that of course). By manually monitoring the latest set animation phase: Simply store the value you used in the animate command, in the variable space of the submarine. In the init-script you have to store the default anim-phase value first of course. And then, whenever you want to check the anim-phase on the dedicated server, read the value from there. To make sure that those two values (value stored in variable space and value read by animationPhase) match at all times (during the animation they don't match of course) execute the animation and the storing of the value only on the server. And that brings me to the next script (dive.sqf): Set up a pvEh on the server that listens to dive requests of the clients. The clients just send a message via publicVariable containing the three parameters of the script. All the checks and the animate command (along with storing the new latest anim-phase) are executed on the server, the clients just send the requests. So far this setup is strictly for mp games with dedicated servers, to have it still working in the other two possible environments arrange the script triggered by the useraction (run on client) this way : if(isServer) then { // do as the server would do } else { // send a request message }; firemissile.sqf should work fine the way it is. targettorpedo.sqf: Instead of creating a trigger you could also use nearestObjects which directly looks for vehicles of the type "Ship". That could reduce the risk of lag, as ArmA doesn't have to syncronise the created trigger with all clients (there's no 'createTriggerLocal' afaik). If nearestObjects with a 2,5km radius (when run on the center of the location to search at) is not performant enough, you could do this: Add a extended init-eH to the vehicle class "Ship" and store all those ever created vehicles in an array. When fired, retrieve all the vehicles from it that are inside the given area.
  24. poweruser

    Interesting Syntax

    @define macro cool, I didn't know that this works in execvm scripts as well. Thought it does in config files only
  25. poweruser

    Interesting Syntax

    Aren't you mixing up the lines here? I thought you wanted the substitute INIT (in the 2nd quote) with the code in the first quote (nul = addaction ...) Shouldn't it be?: When its not mandatory to to have all this in a single line of code, then I'd advise you to leave it in two lines, to have a better overview i.e.: damn, tcp was faster
×