Jump to content

engima

Member
  • Content Count

    548
  • Joined

  • Last visited

  • Medals

Everything posted by engima

  1. Use the players vehicleVarName instead of the user object: [vehicleVarName player, missionType, taskNum] call fnc_CreateNewTaskClient; This call will execute the function fnc_CreateNewTask on the machine that the player is local to. In your case that seems to be the current machine, which makes me wonder why you don't call fnc_CreateNewTask directly instead? Another idea is to have the client ask server for the tasks on initialization. That's how I do it in the demo mission.
  2. Hi! Maybe you would like to try the ASCOM framework instead: http://forums.bistudio.com/showthread.php?151838-ASCOM-Framework-Release (ASCOM=Arma Script Comminication). I made it to solve that very problem that you mention, and to streamline the this kind of communication a bit.
  3. engima

    Kill pilot

    Assuming chopper with name "chopper" is on height above 10 meters and about to land: Create a trigger with condition: (getPosAtl chopper) select 2 < 10; and on activation: (driver chopper) setDamage 1;
  4. And what does it say? Tried with ()s? Tried a middle step with a temp array? Principle should work.
  5. Try this: http://forums.bistudio.com/showthread.php?151838-ASCOM-Framework-Release
  6. Ah, sorry! What about this then: _myarray select 2 set [2, "delete_me"]; _myarray set [2, _myarray select 2 - ["delete_me"]];
  7. engima

    PublicVariables

    What does "Server/Init.sqf" mean? Is it executed from "init.sqf", and how?
  8. Here's the solution: You set the array like this: _myarray = [ [ [0,0,0], [1,1,1], [2,2,2] ], [ [3,3,3], [4,4,4], [5,5,5] ], [ [6,6,6], [7,7,7], [8,8,8] ] ]; To delete the last item ([ [6,6,6], [7,7,7], [8,8,8] ]), you do like this: _myarray set [2, "delete_me"]; _myarray = _myarray - ["delete_me"]; The secret is this: after you have set item 2 to "delete_me", the array will look like this: [ [ [0,0,0], [1,1,1], [2,2,2] ], [ [3,3,3], [4,4,4], [5,5,5] ], "delete_me" ] You did this because you wanted to replace the array at position 2 with a value (since you cannot delete an array by "subtracting" an item that is an array). Now you need to subtract one array from the other, so you subtract an array with one item ("delete_me") from _myarray: _myarray = _myarray - ["delete_me"]; All array items "delete_me" will now be removed from _myarray.
  9. In Arma 2 it is just to add an independent unit and set it to playable. In Arma 3 Alpha there seems to be no independent units yet, so I guess you have to wait for a later version.
  10. That's interesting. I have not noticed that it works any different in Arma 3 than in Arma 2. Use publicVariable "Variable"; to set the variable across the network. And use "Variable" addPublicVariableEventHandler = { // Event handler code here... }; to perform actions when the value changes. Can you have forgot anything fundamental? Misspellings or uninitialized variables? I just released the "ASCOM framework" which contains a lot of publicVariable and event handlers. Btw, its purpose is to to solve the very problem you have. Maybe something you want to try? http://forums.bistudio.com/showthread.php?151838-ASCOM-Framework-Release
  11. Glad you like it! Good luck!
  12. That's essentially correct. But it supports more combinations than that: client/server to client/clients/server/all/some. The idea is to hide the complicated code for the networking, and provide a super simple programming interface.
  13. Pd3, have you seen the "Port Mission" part in ReadMe.txt? I don't know if it's perfect, but at least some good hints. The villagemarkers(island).sqf is generated using another mission (TE_VillageMarkers.Chernarus). Create a new TE_VillageMarkers.(island) mission and create the village markers like in TE_VillageMarkers.Chernarus. Then activate the trigger that writes the information in a file (see ReadMe.txt), and use that file in your ported version of "Escape (island)". The same applies to communication center locations. Each point is the center of a marker (rectangle or ellipse), the next number is the angle and the last numbers is the x and y sizes. But you don't actually need to know this. The important thing is that each marker may be populated by enemy soldiers, and they should not be too large. Over a big city like Chernarus i think I have put 4 such markers. Together the four markers cover the city. There should also always be road segments present in the marker, since enemies are spawned on random road segments within the marker. Hope that helps some! ---------- Post added at 11:20 ---------- Previous post was at 10:59 ---------- Hi DarkXess, I'm glad you like my mission! :) Yes, you're right, It's intended for multiplayer play (for me and my friends initially) and I have not taken care of any single player cases. I had it on my todo list for a while, but sadly I havn't been able to develop it since the 1.8 release due to lack of time and inspiration (and I'm saving energy for an Arma III release :) ). Thank you for good idéas for future versions! Changing the militia to Russian is possible, but requires a litte development. Check out the file Scripts\Escape\UnitClasses.sqf and you will we a whole bunch unit and object classes you can change. However, some elements (like the search chopper) will require you to change in some other files to. Right now I'm sure exactly which ones, but the EscapeSurprises.sqf file is one.
  14. That's an interesting idea, but it will be a little tricky. In the file "InitServer.sqf", there is the following comment line: "// Spawn creation of start position settings". Below that line is a "spawn" command (essentially a function running in its own thread), and that spawn command's first parameter is the spawn position. So to spawn guards on one more spot, duplicate the code and pass another position parameter. In the same file there is also the following line of code that also need to be duplicated, the following code creates the actual prison (fences): _scriptHandle = [drn_startPos, _fenceRotateDir] execVM "Scripts\Escape\BuildStartPos.sqf"; But also, there is code that checks for different things, like if the players are at a certain distance from the prison, and that code must be updated to handle different starting points, and the different starting points must be associated with the correct players. Search the code for drn_startPos and you will probably find all tings that need to be done.
  15. That's a work I started a while ago, but I'm sorry I cannot tell when it will be out. RL does not allow it for the moment. ---------- Post added at 08:31 ---------- Previous post was at 08:08 ---------- Hi! I'm glad you like it! There are two things I can imagine as a problem: 1. You have in any way mixed units that belongs to same group but different sides. 2. In beginning of mission all player units are set as "Captive", which means that no enemy will engage them. When players escape, the captive state is set to off. Have you changed anything so that the "Captive" status remains on? I assume that you primarily have made changes in the file UnitClasses.sqf, and in that case the first alternative above is the most probable. One more thing. Remember that if you increase the number of enemies on the map you might need to decrease the spawn distance. If too many enemy groups are created they will stop spawn. You can set the debug variable "_showGroupDiagnostics" in InitServer.sqf to true to see group counts.
  16. Just a guess. Maybe it's script command "countSide" that fails to get side from a vehicle (and only works for units). Try a trigger with condition "bluefor present" (or "anybody present" for that matter) and the following code in the condition field: { side _x == west } count thisList > 0; I agree with cuel. "> 1" seems wrong because the trigger will not fire unless two or more units are present.
  17. I've noticed that the waitUntil does not work for multiple conditions, like: waitUntil { firstCondition && socondCondition }; Can anyone explain why?
  18. Personally I try to never use nil, since it's quite usual in scripts that nil is overrided, and in that case it may be anything. I'd send in [] or objNull. That's maybe a long shot in this particular case, but you never know... Have you tried command setVehicleInit that automatically executes it on all machines? Is ws_uploadaction set on clients some other way? ... Exactly what happens when you play 20+ players?
  19. I have not done this, but what about having the loop check the animated unit's combat mode? If the combat mode is "SAFE", then you should be able to detect them being attacked by monitoring the combat mode change. Just a thought...
  20. Just a thought: What about having a script doing small skipTime during the night with 30 seconds (or even less) in between? Would a player notice the workaround? You maybe would like to hide the moon of course...
  21. Thats a lot more tricky. I don't think you can do that using only the trigger. I'd use the trigger to start a script that is looping througt the opfor units to see if they have a target (using script command nearTargets). In such a script you can control which opfor unit's detection that counts, and set a global variable if it does. Then use another trigger to detect when variable is set to true.
  22. Hi there! I have captured a neutral island by building a new command center, but the island does not turn blue (it's still green). Then I only get the task "Conquer the dead zone". What does that mean? Regards Ok, got it. I guess the correct solution was to just wait...
  23. Camera script need to be executed on all machines. May it have happened that your code that starts the camera script is only run on server?
  24. Are you playing the latest version? That was a problem first versions, but i still think I fixed it. Current version is 1.8. ---------- Post added at 18:01 ---------- Previous post was at 17:57 ---------- I read you. And all posts saying the same. I will reduce the probability for choppers in the beginning in next release. Thanks everyone for useful feedback! ---------- Post added at 18:19 ---------- Previous post was at 18:01 ---------- This is something that is on my TODO list. Unfortunately it is a little tricky to do right now. You will need to find all code lines that spawn units... ---------- Post added at 18:29 ---------- Previous post was at 18:19 ---------- I can't wait! :) ---------- Post added at 18:33 ---------- Previous post was at 18:29 ---------- Far is 1500 meters away from the player in the player group that stands closest. Medium is 1000 meters, and Short is 500 meters. You must have had some kind of error. I think your own conclution is correct. ---------- Post added at 18:37 ---------- Previous post was at 18:33 ---------- No, they do not respawn infinitely. Maybe some will join the urban fight because they just happen to walk by on the road. Units never spawn closer than current spawn distance (see previous post). If you clean a village the village will be empty, even if you go to the other side of the map and back.
  25. Tried this? player moveInDriver chute;
×