Jump to content

Melmarkian

Member
  • Content Count

    123
  • Joined

  • Last visited

  • Medals

Everything posted by Melmarkian

  1. Hi, Here is a mission that does something like this. http://www.mediafire.com/?lr5d243zevpca64 One unit will run to the unit wounded, pick him up and run to the SUV. But it looks a bit weird. I used a few animations to simulate this and attached the wounded to the first unit. Just dragging the wounded unit would work and look better. I tried to find a action for dragging and carrying but it seems there aren´t any.
  2. Melmarkian

    Guerilla Module

    It checks if it is true. I made a little testmission where you can see the check and change the variable with radio alpha and beta: http://www.mediafire.com/?4cc3tu1gwmla8sy
  3. Hi, I got a little script for my campaign called "reviveAI.sqf". It gives the AI units a revive. It waits until they are dead and replaces them with the same kind of unit, the loadout when they died and reloads the identity. And I tested it and it always worked. But! When I place it in certain missions, it magically stops working. I get a error in the rpt: Without any clearer statements as normal. Here are two missions: http://www.mediafire.com/?qfnkj1unl1dt0l6 This one always works, even if the units get killed every second. http://www.mediafire.com/?02rid8535sx0mj3 This one gives the error after the first or second kill with null-object. (I rearranged it so they start to shoot in the first few seconds). Please ignore the ACE-testmessage at the start. I implemented a new upsmon-version to see if it caused the error. The strange thing about it is I really cannot see any difference. And I tried a lot of things to break it in the first mission. I tested with: - Modules (First Aid) - UPSMON - With player in group and without - named group / group without name - medic in group - healing during kill Would be nice if someone could have a look at it. And sorry, the script is a bit messy.
  4. Ok, redone it and it works now. There was a problem with values of variables set to null before used. This one works: nul = [unitname, lives, "identity"] execVM "reviver.sqf" reviver.sqf And sorry Kremator. I think you misunderstood what I was trying to do. I did this script to give my AI buddys a second chance. I have a few missions where you fail when they die and I hated this in the original Harvest Red campaign, because they are sometimes running directly into enemy fire (like myself :)). But for story reasons I wanted to have the same condition, so I wrote this piece of code to make it less annoying.
  5. Melmarkian

    Guerilla Module

    Sorry, I think this should be working when you set the variable with setVariable: _bomber setVariable ["undercover",true]; while {(alive _bomber) AND (_bomber getVariable "undercover")} do { } The values are returned correctly. But I cannot say anything about locality.
  6. Melmarkian

    Guerilla Module

    Sorry, don´t really know anything about the MP stuff. :(
  7. Melmarkian

    Committing Suicide

    I would use a trigger to kill him: Condition: player distance officer < 15 Do: officer setdamage 1; would be the an easy way.
  8. Some error could be in the line: deleteVehicle _unit; call compile format ["_type createUnit [(getMarkerPos 'dead_%1'), _group, 'this setVehicleVarName ''%1'';%1 = this;']", _unit]; it deletes the unit and after that creates a new one with the same name. Maybe I have to save the unitvarname before the !alive unit fires and use this variable in the createunit. If I do this: _name = call compile format ["%1", _unit]; Would the variablename saved? Even if I delete _unit afterwards? I think yes. And this could be working afterwards( using the generated string instead of the unit-object): call compile format ["_type createUnit [(getMarkerPos 'dead_%1'), _group, 'this setVehicleVarName %1;%1 = this;']", _name]; (Sorry I cannot test it at the moment. I just try to understand the issue)
  9. Melmarkian

    Guerilla Module

    Hi, I have a little script I used to simulate such undercoveractions: It does: - set you to captive - removes captive as long as you carry a primaryweapon - If you shoot inside the radius it removes setcaptive and sends the nearest unit looking for the position where shoot was fired. - removes captive when you stay a certain time near an enemy - It will reset you to captive when: - Your distance to the nearestunit of side is greater then _getaway - The knowsabout of the nearestunit of side is lesser than 1.4 You call it with: nul = [playername, radius(distance the script searches for units), getaway (distance for a reset when you are found), side ( which side is considered enemy) ] execvm "under.sqf"; And I also made an script you can execute for units in your group to give them the same status: I use it in the initfield of the unit with: nul = [unitname] execVM "undercoverbuddy.sqf"; Maybe some of this helps you. I tested the script with respawn, but I didn´t find a quick solution.
  10. no problem, for the driver thing you could use: player assignasdriver trooptruck; player moveindriver trooptruck; But you need to place an empty vehicle, not one which has an driver already. With the cars i think behavior careless let´s them drive more on road. Or just make a lot of waypoints on the roads.
  11. If you just have Operation Arrowhead and not the original Arma 2 take this file: http://www.mediafire.com/?1zxyyweqqk9o868 In the zip-file there should a folder named: assignexample2.takistan. Copy this folder into C: \User > yourUsername > Documents > Arma2 > missions You will see the mission when you click load inside the editor.
  12. Here is an example: http://www.mediafire.com/?ctvjb4lai1ei2c2 The squad GroupOne you see on the airfield has the commands in the init-field. When you preview the mission you will notice they start all inside the truck (trooptruck). You can use the radiotrigger alpha (0 - 0 - 1) to let them disembark. But you could set the trigger to any condition you wish. I hope you have A2 because its on utes. Let me know if you want a different island. The commands are explained in the spoiler:
  13. Hi, what I use for squads starting in cars is this: in the leaders init field: {_x assignAsCargo nameofthevehicle} foreach units group nameofunit; {_x moveinCargo nameofthevehicle} foreach units group nameofunit; To get them out I use a trigger (for example Opfor detected by bluefor) {unassignVehicle _x} foreach units group nameofunit; and additionally this to get them in the fight: groupname setBehaviour "Combat"; groupname setCombatMode "red"; hope this helps!
  14. Hi, ok so I have a problem with saving of chars in a campaign. I tried this: At the last trigger (with "END1"), I execute a script called "ende.sqf" with unitname savestatus "unitname1"; In the init.sqf of the next mission I use: unitname loadstatus "unitname1"; And then again at the end of the mission: unitname savestatus "unitname2" (Because I read somewhere you always have to give a new name) But my men always start with the standard loadout of their soldier class. I experimented a bit and to my surprise, they carried over their wounds in the next mission? This is what really confuses me. Could there be a problem with units of the same name used in the intro of the mission? I also tried to open the objects.sav to see whats saved, but I haven´t had any luck with opening the file. ---------- Post added at 06:26 PM ---------- Previous post was at 05:09 PM ---------- Ok, tested two more things: Different name for units in intro and mission => no effect. Executed the script with a hint before the mission ends => no effect. I tried to load the status saved in mission 1 in the 3rd mission. => isn´t working either (backpack goes missing, too) tested with .sqs => no effect tested with player instead of charname => no effect Different names of units between the mission are not a problem, either. (worked between 1 & 2) The status save works from my first to the second mission. But not afterwards. I actually use a sqs file in the first mission, but that cannot make a difference? The wounding i reported earlier was also between 1 and 2 mission. One more thing: When I load the third mission the playerchar resets to standard loadout but also loses his backpack! I am confused... Edit3: I even made an testcampaign now and it works without problems... But not in the other one!
  15. Lol, ok I finally made it. I rebuild the complete system and it works now. But don´t ask me what I did wrong. So if someone wants to do it and is stuck like me: http://www.mediafire.com/?uen71qbi7n6o4jv This is a testcampaign with 3 missions where you can see how the savestatus/loadstatus is done. PBO and Files included. What is also discoverd in the process is the exit.sqf. Everything you write in there will be executed at the end of the mission. Seems to be a good place for weaponpool and status modifications. Another discovery (maybe just for me): To read the objects.sav file you can use the unRap Tool by Kegetys. It will convert the file into an .cpp which is readable
  16. Melmarkian

    [SP] Broken Arrow 1-3

    Almost ready. Last mission is being worked on at the moment. I finally managed to get the campaignstructure to work and integrate a weaponpool together with saved equip for the soldiers. The campaign will be 8 missions long with a lot of cutscenes. So, any suggestions or feedback for the first part?
  17. Hi, I recently wrote a revive script for the AI in the playerteam. The script stores things like unitname, identity and lives and then waits until the unit is !alive. Now to my question: I read somewhere about the preprocessor command and functions for arma2. The text said that if I use a script more than once it should be made into a function. Is there really a big difference between the functions and a simple script call? I noticed for example that UPSMON uses a the normal execVM method and I´m sure there are a lot of repeating scripts in there. Does someone has any better insight into this or experience with this? Or some lecture about the matter? I know this one, but its not really helping me. http://community.bistudio.com/wiki/Code_Optimisation
  18. This is how I would do it. Don´t know if it is good way but it works: It just chooses the tasks that are not set to true. In your .sqf which include the mission you can set the variable to true. It will then begin to search for a new one. if (! isServer) exitwith {}; // NOTE: in multiplayer, only server should create random numbers. taskscompletedcount = 0; firsttask = false; secondtask = false; thirdtask = false; fourthtask = false; // Pick Location /////////////////////////////////////////////////////////////////////// while {taskscompletedcount < 4} do { n1 = round ((random 13) + 0.5); // generates random number from 1 to 1" if (n1 == 1 AND !firsttask) then { hint "Task 1 is now active"; sleep 10; waitUntil {firsttask}; hint "Task1 completed"; taskscompletedcount = taskscompletedcount + 1; }; if (n1 == 2 AND !secondtask) then { hint "Task 2 is now active"; sleep 10; waitUntil {secondtask}; hint "Task2 completed"; taskscompletedcount = taskscompletedcount + 1; }; if (n1 == 3 AND !thirdtask) then { hint "Task 3 is now active"; sleep 10; waitUntil {thirdtask}; hint "Task3 completed"; taskscompletedcount = taskscompletedcount + 1; }; if (n1 == 4 AND !fourthtask) then { hint "Task 4 is now active"; sleep 10; waitUntil {fourthtask}; hint "Task4 completed"; taskscompletedcount = taskscompletedcount + 1; }; }; hint "All done";
  19. maybe you could use addaction to give them a action to get inside the vehicle with moveinpilot. But this would work only if the units are player controlled.
  20. Just for the fun: The same mission but it shoots a cow which explodes when it reaches the target. AND you can shoot exploding cows with radio alpha. Just point at your target and trigger the radio. http://www.mediafire.com/?doahqz5252ugad7 It takes a few seconds before the next cow is loaded. I wanted to slow the cow down a bit, but I really don´t understand how the velocity stuff works.
  21. Hi, don´t know what you really mean? When I want an explosion in an I use this script with an trigger: private ["_p1","_target","_shooter","_dispersion","_randomdisp"]; _target = _this select 0; // Where the explosion happens _dispersion = _this select 1; // random area around the target for explosions _randomdisp = _dispersion *2; _p1 = [(getpos _target select 0) + _dispersion - random _randomdisp, (getpos _target select 1) + _dispersion - random _randomdisp, (getpos _target select 2) + 40 ]; bomb = "ARTY_Sh_82_HE" createVehicle _p1; You can call it with: nul = [target, dispersion] execVM "howeveryounamethescript.sqf" How often you want it to explode depends on the trigger settings. You could set it with a timeout and repeat to get more than one explosion.
  22. Thank you again for the script! I already have a few more ideas to use it.
  23. Melmarkian

    [SP] Broken Arrow 1-3

    The first mission runs with min 24 fps on my machine. But my pc is really new. But I did a quick cleaning of the mission and now it runs with 40 fps after a few seconds. Here´s the new version: http://www.mediafire.com/?rum6hkcql0kr9a0 I am now in the process of mission 5-7 and they are mostly finished. Just a few texts and errorchecks missing. After those are ready I will create a campaignfile with continued weaponpool. The campaign itself isn´t completed after this chapter with Team Fox. I have already 3 sidestorys/sequels on paper. The actual release of those will depend a bit on the feedback after the complete first campaign is finished.
  24. Great! It works even with a cow, but shooting animals doesn´t inflict damage.:) Thanks for your work twirly!
×