Jump to content

wickedstigma

Member
  • Content Count

    151
  • Joined

  • Last visited

  • Medals

Everything posted by wickedstigma

  1. Yes I know how to do it, but thats with the SOM module, not pure scripting unless he made it by script which I doubt. I can show you how to do it, but I can right now since its almost 1 am and I have to get up at 6 am :(:(:(. I will post tomorrow when I get back.
  2. Ok, I don't know why is working but you are right, it doesn't. Really weird thing is that Its a copy paste of a working code. But anyway here is a working code. Just tested it and it works beautifully. Save this as artillery.sqf: //Declare Variables and gets data from the array _ammo = _this select 0; _target = _this select 1; _delay = _this select 2; _height = _this select 3; _amount = _this select 4; _spread = _this select 5; _velocity = _this select 6; _x = 0; //Sets target position _targetPos = [getMarkerPos _target select 0, getMarkerPos _target select 1, _height]; //Delays the script for the amount of time stored in _delay sleep _delay; // Loops the amount of times stored in _amount for "_x" from 1 to _amount do { //Creates the slected _ammo at the selected _height _artilleryStrike = createVehicle [_ammo, _targetPos, [], _spread, "NONE"]; // Sets direction of the artillery round and velocity _artilleryStrike setvectorup [0,9,0.1]; _artilleryStrike setVelocity [0,0,_velocity]; //Delays the code for the selected amount of time sleep _delay; }; And call it with (I mean put it inside the trigger): nul = ["ARTY_Sh_122_HE","target",2,500,30,50,-1]execVM "artillery.sqf"; Let me know if it works. ---------- Post added at 11:30 AM ---------- Previous post was at 11:22 AM ---------- I almost forgot, you can change the settings as you please by changing the values in the code that goes on your trigger. It is as follows: nul = ["ammo","target",delay,height,amount of rounds,spread,velocity of the round]execVM "artillery.sqf"; Remember that the ammo and the target must be used with quotes and everything else just with numbers. the velocity has to be a negative value so it can go down instead of going up. If you change the name of the target remember to change it here too. To add an initial delay just change this: [color="Red"]//Delays the script for the amount of time stored in _delay sleep _delay;[/color] to this... [color="SeaGreen"]//Delays the script for the amount of time stored in _delay sleep 60; // It will activate in 60 seconds[/color] If you don't want to wait any time, just remove that code.
  3. Hi, im back. Yes, I agree with F2k Sel and CarlGustaffa, you have to save it as .sqf, when you are going to save it as a .sqf you have to select in the Save type As > All Files (*.*) Then press the save button. That should do it. I will post in the morning the GBU script.
  4. you are welcome! my pleasure to help! :D Ok, mission folder are, at least in my computer and I'm using vista, in Doucments > Arma 2 > missions You have to save the game first, lets say with the name destroytown or whatever name you want. Than it is going to appear inside the mission folder. Then you take the artillery.sqf and place it inside the destroytown folder that's inside the mission folder. If you are using the multiplayer editor the mission are in the MPMissions instead of the missions folder. Im in kind of a hurry now but Ill be back in a couple of hours and will post the code for the GBUs.
  5. Ok do the following steps: 1) Create a marker called target an place it on top of the town you want destroyed 2) Open notepad and write the following code and save it in your mission folder as artillery.sqf: [color="Orange"]//Set initial values for the artillery strike[/color] _ammo = "ARTY_Sh_122_HE"; [color="Orange"]//Sets the type of ordinance[/color] _initialDelay = 50; [color="Orange"]//Sets the delay before the artillery strike in seconds[/color] _amount = 10; [color="Orange"]//Sets the amount of shells to be delivered at target[/color] _roundDelay = 5; [color="Orange"]//Sets the delay between rounds[/color] _spread = 150; [color="Orange"]//Sets the spread of the strike in meters[/color] _height = 500; [color="Orange"]//Sets the spawn height of the shells [/color] _target = "target"; [color="Orange"]//Sets the name of the target [/color] [color="Orange"]//Set the position of our target[/color] _strikePos = [_target [color="Blue"]select[/color] 0, _target [color="Blue"]select[/color] 1, _height]; [color="Orange"]//Makes code wait for the value of _initialDelay[/color] [color="Blue"]sleep[/color] _initialDelay; [color="Orange"]//Begins the artillery strike [/color] [color="Blue"]for[/color] "_x" [color="Blue"]from[/color] 1 [color="Blue"]to[/color] _amount [color="Blue"]do[/color] { [color="Orange"] //Creates the slected ARTY_Sh_122_HE at 300 meters[/color] _artilleryStrike = [color="Blue"]createVehicle[/color] [_ammo, _strikePos, [], _spread, "NONE"]; [color="Orange"] //Sets artillery looking forward[/color] _artilleryStrike [color="Blue"]setVectorUp[/color] [0.001, 0.001, -1]; [color="Orange"] //Delays the code for the selected amount of time[/color] [color="Blue"]sleep[/color] _roundDelay; }; 3) Create a trigger activated by whatever you desire and put this into On Act box: nul = [] execVM "artillery.sqf"; 4) Enjoy! You can add more things or change the setting of the artillery strike. If you want to change the name of the target you can do it, just remember to change the name of the target inside the code too. If you want I can post to the way I found to simulating the GBU drops too and if you have any more questions just let me know.
  6. whell you could spawn artillery shells @ any height you want above the town and set the placement radius as big as you want. Get that inside a for loop for the number of shells you want and that's it. I'm working on a script called Simple Artillery Strike so Ill copy part of my code later.
  7. I tried it with the A10 and it didnt work. Ill try it again and post back
  8. First, real artillery or simulated artillery? and Second, what did you do to make it drop the GBUs?
  9. i tried the same thing without any luck. I just made a code where the GBU spawns below the aircraft... I even attached another GBU to an A10 and it didnt work since the deattach didn't appear to do anything. Ill keep trying to see if I have any luck.
  10. I am actually doing the same thing with my artillery code, Ive been working on it and I have gathered a lot of info about artillery, and Im trying to make it as realistic as possible. I was thinking of doing an interface, but that interface you made is really awesome and it gathers the concept of what I had in mind. I can collaborate but I don't have lots of experience in Arma, I just being doing scripting for about 1 month now, i think.
  11. wickedstigma

    Real Life Photography/Photo Editing II - NO IMAGES >100kb

    I love the way all the pictures look, like having a filter or something that gives an ambient of mystery. Also it looks like aged pics. Did you took this pictures with a digital cam or with a normal cam? ---------- Post added at 11:23 AM ---------- Previous post was at 11:15 AM ---------- Thanks for the tip! Lets see If I can do them without getting hit by a car, lol, at least Ill try to take the pictures while dodging them! Just kidding. Hope you can get a bit better Internet connection there which I seriously doubt, and a better camera, (because if you can take that kind of pics with a $100 cam, what would you do with a better cam or a pro cam like the Canon EOS – 7D), and finally hope you get new equipment for your job, like new sights, handguards, and all other goodies you can get. ---------- Post added at 11:27 AM ---------- Previous post was at 11:23 AM ---------- Nice pics. My favorite ones where the first and the last one.
  12. Hi everyone. Im making the new Simple Artillery Support v2.0 and there is something that is slowing me down.... a lot. And I cant find what the hell is wrong with it. the thing is that after setting default values and reading custom values, I can really use a variable to create a different set of settings. Here is the code: //Set default values //----------------------------------------- _artilleryTarget = "artilleryTarget"; // Main target _firingMode = "NORMAL"; // Normal or Battery One _ordinance = "ARTY_Sh_122_HE"; // Type of ordinance _typeofFire = "none"; // Type of Fire Mission - (FFE, Zone & Sweep, Smoke Screen, etc.) _amountofRounds = 10; // Number of rounds to be delivered on target _proximity = 6; // For anti personel ordinance, will explode @ _explosionAltitude value _ceaseFireSwitch = false; // To order cease fire when you order Fire For Effect _numberofGuns = 6; // Number of cannons to shoot on Battery One _spawnHeight = 500; // Ordinance spawn hegiht _spawnDelay = 60; // Time for fire mission to splash _spawnPosition = "none"; // Used for different patterns and types of fire missions _initialDelay = 60; // Initial delay of custom fire missions _roundDelay = 6; // Delay between rounds _roundCounter = 0; // Counts number of rounds been shot _spread = 100; // Spread of fire mission _pattern = "none"; // tight, spread, scatter, _ffe = false; // Switch for the Fire for Effect Fire mission _artilleryStrikePos = [0,0,0]; // Artillery strike position to spawn bomb and have a correct spread hint "Setting defaults [COMPLETE]"; sleep 3; //----------------------------------------- //Variable Tester //----------------------------------------- hintc format ["Fire For Effect Switch: %1 \nType of Fire: %2", _ffe, _typeofFire]; //----------------------------------------- //Read custom values //----------------------------------------- { switch (_x select 0) do { case "mode" : { _firingMode = _x select 1}; case "ammo" : { _ordinance = _x select 1}; case "type" : { _typeofFire = _x select 1}; case "proximity" : { _proximity = _x select 1}; case "guns" : { _numberofGuns = _x select 1}; case "initDelay" : { _initDelay = _x select 1}; case "roundDelay" : { _roundDelay = _x select 1}; case "amount" : { _amountofRounds = _x select 1}; case "spread" : { _spread = _x select 1}; case "pattern" : { switch (_x select 1) do { // Changes presets according to the type of pattern you choose case "tight" : { _amountofRounds = 10; _spread = 50 ; _roundDelay = 2.2}; case "spread" : { _amountofRounds = 12; _spread = 150; _roundDelay = 4 }; case "scatter" : { _amountofRounds = 16; _spread = 300; _roundDelay = 5 }; case "harrass" : { _amountofRounds = 8 ; _spread = 100; _roundDelay = 3 }; case "suppress": { _amountofRounds = 20; _spread = 200; _roundDelay = 3 }; }; }; }; } forEach _this; hint "Setting custom Fire Mission [COMPLETE]"; sleep 3; //----------------------------------------- //Variable Tester //----------------------------------------- hintc format ["Fire For Effect Switch: %1 \nType of Fire: %2", _ffe, _typeofFire]; //----------------------------------------- [color="Red"] switch (_typeofFire) do { case "FFE" : {_ffe = true}; }; if (_ffe = true) the { hint "Fire for Effect"; [color="Orange"][i]// I will place later the code here for the fire mission or to add the action of fire for effect to the player[/i][/color] }; [/color] I am calling it through: nul = [["ammo","ARTY_Sh_105_HE"],["type","FFE"],["amount",200],["spread",200],["roundDelay",0]] execVM "simple_artillery_strike_v2.0.sqf"; The red part of the first code is what is giving me a huge headache. So my formal questions are the following: What is wrong with the if and the switch? I basically want to turn _ffe to true so I can run just a part of the code when _ffe = true. How can I manage variables from one script to another? Lets say I take this script and after _ffe = true this adds an action to the player for fire for effect, which will open another script when you use it, but will need to take info from the main script. How can I create a sub-menu like when you use Sec Ops Module (SOM) to call in Artillery Support. If I cant do this what I'm going to do is add the options through the player actions. Is there a way to explode a shell in mid air without making it hit an object? For example, what I do is I spawn a baseball.... yeah, i know, dirty dirty way of doing it......, and setVelocity to 0,0,10 so it goes upwards in the shell direction and it makes it explode at any height I want. It works, but I want a less dirty version of doing it. Thanks for all the help in advance!
  13. Has anyone come up with a solution or why the if is not working? Ive tried a lot, and believe me, a lot of stuff and it keeps doing the same thing.What I was planning to do is to do the following: 1) After the script defines defaults and passes through the switch, I might pass the variables to another script that will have the "if" to define what kind of artillery support you need. After defining the kind of fire mission, this will call another script for the fire mission, for example smokescreen.sqf or fireforeffect.sqf . Thing is how do I pass the variables from script to script and how do I call a script from inside a script? 2) Make the script so when you call it with the radio triggered trigger (lol), it will add different actions to the player, the player will have access through the different kinds artillery support from this actions. It will be like the options SOM gives you when you call the artillery support but instead of having them in a separate menu, you will have it on the action menu. What do you think guys?
  14. wickedstigma

    Real Life Photography/Photo Editing II - NO IMAGES >100kb

    Its called La Cruceta del Vigia and it is located in Ponce, Puerto Rico. Here is some information of it. http://places.eyetour.com/whatToSee/ponce/83/la-cruceta-del-vigia http://en.wikipedia.org/wiki/Cruceta_El_Vig%C3%ADa
  15. wickedstigma

    Real Life Photography/Photo Editing II - NO IMAGES >100kb

    La Cruzeta del Vijia, Ponce PR There are some pictures here not taken from an artistic POV, just took them to have a memory of it.
  16. wickedstigma

    Real Life Photography/Photo Editing II - NO IMAGES >100kb

    Japanese Garden: In front of Castillo Serralles, behind La Cruzeta del Vijia
  17. wickedstigma

    Real Life Photography/Photo Editing II - NO IMAGES >100kb

    hows the internet connection there? Nice BMW, I was trying to take some pictures from ground level like they do when they are driving or racing around the track, but I cant find the correct way of doing it unfortunately.
  18. wickedstigma

    Real Life Photography/Photo Editing II - NO IMAGES >100kb

    This was at Castillo Serralles Ponce, PR: Unfortunately I couldn't take pictures inside the castle because they didn't allow it. This are the only pictures I could get of the castle it self. Ill try to get some good pictures of the castle later. Thanks to Serclaes I can see now my errors about the third rule. Thanks again man. Other pictures outside Castillo Serrales.
  19. wickedstigma

    Real Life Photography/Photo Editing II - NO IMAGES >100kb

    Thanks. I get it now, but for example in this pic: What I had to do in that moment to make it perfect was to align the horizon with the upper third of the picture? Wow, I didn't notice that when I took the picture. As I said n00b photographer. Thanks for the help. Ill post more pics in some minutes. ---------- Post added at 02:14 PM ---------- Previous post was at 02:13 PM ---------- thanks for the tip too!
  20. wickedstigma

    Real Life Photography/Photo Editing II - NO IMAGES >100kb

    Thanks saying they are good and for the advice. How should I manage horizons? They should be horizontal at all times? I'm a really really n00b photographer. Maybe Ill get a photography course someday, but cant afford it now.
×