-
Content Count
94 -
Joined
-
Last visited
-
Medals
Everything posted by Padjur
-
Really basic scripting questions
Padjur replied to Urbanski's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This is also required when saving a file, of any type other than txt, in XP as well. Does Vista not allow you to uncheck the "Hide extensions for known file types" box in Folder Options (as in XP)? By doing so it will help avoid such errors by showing you exactly what the file extension is when saved. As for Windows 7? XP pro is still their best O/S I think but at least Windows 7 uses 2/3 less RAM (so your already on a winner over Vista), . -
Is "WAITUNTIL" the solution for my problem? Never used this command before...
Padjur replied to *TEK*TONI's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
F2k Sel Can I check that? I suggested getposASL as in height above sea level, or is it a typo? -
Is "WAITUNTIL" the solution for my problem? Never used this command before...
Padjur replied to *TEK*TONI's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The method that Tayln describes comes from Carrier Domination so its well tested, maybe the script spawns quicker or something. Myke's addon uses the same script (by armatech) so yea it should do the same job, maybe you could pm Myke about the issue, he'd be the best man to ask. For myself I'm with Talyn when it comes to not having or avoiding the need for clients to have addons, so I use scripts whenever I can unless its something like the Chinook, which is a great aircraft to have available. -
Is "WAITUNTIL" the solution for my problem? Never used this command before...
Padjur replied to *TEK*TONI's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
There is a suggested answer to your problem in this thread http://forums.bistudio.com/showthread.php?t=73882&highlight=lhd&page=3 posts 28(nominesine) and 29(Talyn). I place units with this setPosASL [getposASL this select 0, getposASL this select 1, 15.9]; works fine for me -
Adding pics using Briefing Manager?
Padjur replied to stephen271276's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Eample <img image='image.jpg' width='200' height='200'/> image should be inside the mission folder with the mission.SQM file. (I don't use a briefing manager, I use a template instead but this would be how it would appear in the briefing.sqf) -
multiplayer mission problem
Padjur replied to kipper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Tried search? You need to be a bit more precise in the question I think if you want an answer. When you say what do you mean exactly; Are all the squad members playable or do you mean the squad leaders? Did you create them in the editor using groups or are they spawned by script? Are you hosting when your mate is trying to lead a squad? -
help me - placing choppers on the deck
Padjur replied to gareththomasnz's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You try using the Search option http://forums.bistudio.com/showthread.php?t=87136 -
Is isServer broken
Padjur replied to bangtail's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for the info Big_Daddy & tcp, very much appreciated. For what it is worth (probably in attempt to show I didn't dream it up) I got the idea you should not use if (!isServer) exitWith {}; from a post by Big Dawg KS at the bottom of this page http://forums.bistudio.com/showthread.php?t=77397&highlight=(isserver)+exitwith+{};&page=3 I see that in the BIKI in entry for isServer it gives, as the example the above code. I'm not being argumentative here you understand, I just want to get your opinion on it. I would have thought it would be better (especially if you are new to scripting) if it were put this way as a general rule. if (isserver) then {//do stuff on server only}; Whereas exitWith would seem to have a more advanced use such as this (in mado's heliroute) if (!local _heli) exitWith {hint "mando_heliroute: vehicle must be local";}; I realise this is not moving us towards a solution to your problem here ethne, sorry. I have my own HALO script that works but I haven't tested it on a dedicated server, so would be very interested if one could be found. -
Is isServer broken
Padjur replied to bangtail's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well I don't know why, as such Muklor, as I am not an expert but I understand, reading from the wikki http://community.bistudio.com/wiki/exitWith, that I also remember reading several months ago in other threads reading the information that shk posted in this thread. I am of course prepared to be corrected (and if so would much appreciate it) especially if I have failed to understand the wikki entry properly but it certainly seems clear enough don't you think? -
again I did my research but no joy....help please
Padjur replied to CombatComm's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Clear as mud if you ask me....... :rolleyes: not that you did of course. perhaps something could be gleaned from this thread entitled "How do i trigger an explosion in the editor?" (a good thread title don't you think? clear and to the point) http://forums.bistudio.com/showthread.php?t=78032 -
Need some help with a trigger
Padjur replied to HamishUK's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
But having said that it could be useful to still be able to see the whole post. If you found the solution to the problem great! if you share it with us even better (especially if we have the same or similar problem ourselves and have been good boys and girls and used our search feature ;) ). -
Is isServer broken
Padjur replied to bangtail's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
As I understand it effectively means, if this is the server then execute the script and that therefore if this is not the server, then do not execute the script.Conversely: if (!isServer) exitWith {}; means if this is not the server then exit the script (which is more a sqs script method than sqf) but I am sure I have read that using this method can cause problems with certain scripts. Which is what I think you mean shk when you say not designed for? It would help to see the whole script and how you call it though. -
Script: Sticky Satchel Charges
Padjur replied to Tajin's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This is were you put the sqf file Romes. Which is the normal path to the mission folder which should have inside it at least a mission SQM file.This is where all the sqf files, the int.sqf file, the description EXT.file and any other file relating to the mission must go. You should then be able to load this file from the editor preview, by calling the script as Tajin instructs. -
Placing units on the Aircraft Carrier in Utes
Padjur replied to Arma-2-Guru's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
http://forums.bistudio.com/showthread.php?t=77526&highlight=LHD http://forums.bistudio.com/showthread.php?t=87136&highlight=LHD http://forums.bistudio.com/showthread.php?t=79653&highlight=LHDand of course http://forums.bistudio.com/showthread.php?t=87072 :) ha beat me to it Bon fair play! -
How do I make a next objective?
Padjur replied to RonnieJ's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Place an empty marker on the editor and name it, for example: mkrObj3. Now in the missions folder you should have a folder named Briefings in which you should have your Briefing.sqf which is called at the start. make a new sqf file for example NewOrders.sqf. tskObj3 = player createSimpleTask ["Got another job for you"]; tskObj3 setSimpleTaskDescription ["Your not finished yet lads go kill some more Dudes", "Got another job for you", "More stuff to Do"]; //sets a marker on the map tskObj3 setSimpleTaskDestination (getMarkerPos "mkrObj3"); player setCurrentTask tskObj3; and call it with a trigger condition e.g: taskCompleted tskObj1 AND taskCompleted tskObj2; and On Act nul=[] execVM "Briefings\NewOrders.sqf"; or you could call in a waypoint if you want. So on activation what you get is, in the map a new task called "Got another job for you" and objective maker which is set as the current task and the HUD title "More stuff to Do" in game. -
Here is a basic script to get you started and more detail here http://forums.bistudio.com/showthread.php?t=80146&page=3 if (isServer) then { GrpC130=CreateGroup WEST; C1= createvehicle ["C130J",[(getmarkerpos "C1Spawn") select 0, (getmarkerpos "C1Spawn") select 1,0], [],0,"FLY"]; C1 flyinHeight 250; Pilot1=GrpC130 createunit ["USMC_Soldier_Pilot", [0,0,1], [], 0, "CAN_COLLIDE"]; Pilot1 moveInDriver C1; Pilot1 flyInHeight 250; wp0=GrpC130 addwaypoint [(getmarkerpos "wp0") ,200]; wp0 setwaypointspeed "FULL"; wp0 setwaypointtype "MOVE"; wp1=GrpC130 addwaypoint [(getmarkerpos "wp1") ,200]; wp1 setwaypointspeed "FULL"; wp1 setwaypointtype "MOVE"; squad1=creategroup WEST; for [{_i = 0}, {_i <= 24}, {_i = _i + 1}] do { _unit= squad1 createUnit ["USMC_Soldier", [0,0,2], [], 0, "form"]; }; {_x moveInCargo c1} foreach units squad1; };
-
Seemed so simple...
Padjur replied to CombatComm's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
To set an alarm of with a trigger I just click Effects (bottom left of the trigger) click on the Trigger: drop down box, scroll down and select the alarm sound you want. No need for markers or class names. -
Two Quick Questions
Padjur replied to Helepolis989's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No I include the waypoints in the spawn script, just a move waypoint or two,when the chopper reaches the LZ a trigger calls the heli.sqf. , which brings it down to 2 meters (which is very nearly landing) and animates the ramp. You can then use the action menu to get in the chopper which then adds the action to get in the hummer and calls the unload.sqf which moves you into the hummer and lets you back it down the ramp and away from the chopper. if (isServer) then { RAF2=createGroup WEST; CM2= createVehicle ["RAF_Chin47",[(getmarkerpos "Ch2Spawn") select 0,(getmarkerpos "Ch2Spawn") select 1,0], [],0,"FLY"]; CM2 allowDamage false; CM2 setSkill 1; p1=RAF2 createunit ["USMC_Soldier_Pilot", [0,0,1], [], 0, "CAN_COLLIDE"]; p1 moveInDriver CM2; p1 setRank "COLONEL"; p2=RAF2 createunit ["USMC_Soldier_Pilot", [0,0,2], [], 0, "CAN_COLLIDE"]; p2 moveInCargo CM2; p3=RAF2 createunit ["USMC_Soldier_Pilot", [0,0,3], [], 0, "CAN_COLLIDE"]; p3 moveInGunner CM2; sleep 2; Hu1=createGroup WEST; Hume = "HMMWV" createVehicle getmarkerpos "Huspawn"; Hume attachTo [CM2,[0,0,0]]; Hume allowDamage false; _waypoint0 = RAF2 addwaypoint[getmarkerpos"plot1",0]; _waypoint0 setwaypointtype"Move"; _waypoint0 setWaypointBehaviour "CARELESS"; _waypoint0 setWaypointSpeed"NORMAL"; _waypoint1 = RAF2 addwaypoint[getmarkerpos"Evac2",0]; _waypoint1 setwaypointtype"Move"; _waypoint1 setWaypointBehaviour "CARELESS"; _waypoint1 setWaypointSpeed"LIMITED"; }; (I put the extra crew man so that when you get in the chopper you go to the cargo bay and not the front seat) -
Two Quick Questions
Padjur replied to Helepolis989's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Not sure what your wanting to do exactly but here's an example I have made for myself. I created a _helo with a script that include's _helo allowDamage false; to call a Chinook and with a separate createGroup a Hummer with _Hume attachTo [_helo,[0,0,0]]; _Hume allowDamage false that sticks the hummer in the Chinook; Now! to get the hummer out at the LZ I used a script derived from one of JDog's heli.sqf if (isServer) then { _heli = _this select 0; _car = _this select 1; _heli flyInHeight 2.25; _heli animate ["Ani_Ramp",1]; _action = _heli addAction ["Move in Car", "unload.sqf", _car, 6, true, true, "", "_this in _target"]; }; unload.sqf if (isServer) then { _object = _this select 0; _caller = _this select 1; _id = _this select 2; _car = _this select 3; _object removeAction _id; _caller setPos position _caller; _caller moveIndriver _car; detach _car; sleep 15; _car allowDamage true; }; This makes the Chinook hoover just above the ground so you can get in the choper and then the hummer and drive the hummer out of the chooper. for more see the http://forums.bistudio.com/showthread.php?t=73630&highlight=Practical+attachTo+command or countless other threads to do with attachTo -
Created group unable to mount transport
Padjur replied to charon productions's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I read somewhere but cannot remember where, (found the link :) http://community.bistudio.com/wiki/Locality_in_Multiplayer ) A unit can change it's locality for example units or players entering or exiting vehicles. I'm not a 100% sure of the effects of locality, I know that if I spawn a chopper with a script and give it a global group name for example Chop1 and use joinSilent as in [unitArray] joinSilent chop1; {_x assignAsCargo chop1} foreach units [unitArray]; [unitArray]orderGetIn true; It works. But what I haven't worked out is how to get the units to board a vehicle if I make the group of the vehicle local in the script e.g. _grp Ive tried putting _grp = _this select 0; _veh = _this select 1; _grp= createGroup EAST; and calling the script with null= [A,jeep] execVM "Insconvoy1.sqf"; [b]and then in a trigger[/b] [POW1,Guard,Guard] joinSilent A; {_x assignascargo jeep} forEach [POW1,Guard,Guard]; [POW1,Guard,Guard] orderGetIn true; but that doesn't work:stuck: back to search button unless a wise one can shed some light? -
Help with if-then-else command
Padjur replied to cobra4v320's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
It did for me at any rate, I couldn't see the wood for the trees :o. :ok: Thanks Rommel for explaining the format and the scripting commands etc. and to everyone else...really useful thread. -
Help with if-then-else command
Padjur replied to cobra4v320's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ah OK I see what your saying, thanks for the explanation. Question on the waypoints though you have wp1 = TeamAlpha1 addwaypoint [position player, 0]; TeamAlpha1 setbehaviour "aware"; wp1 setwaypointtype "SAD"; In the Wiki it says Where format for waypoint is [group, index]. Also in the Wiki it has the same Syntaxfor setwaypointtype. But you use wp1 :confused: To be perfectly honest this has puzzled me considerably over the past weeks. Example: In the wiki it gives as an example [_grp, 2] setWaypointBehaviour "AWARE" whereas you are using TeamAlpha1 setbehaviour "aware"; and you use wp1 setwaypointtype "SAD"; Where as in the Wiki it gives [_grp, 2]setwaypointtype "SAD"; Any insight on this would much improve my sleep patterns, many thanks. -
Help with if-then-else command
Padjur replied to cobra4v320's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Is there not a semi colon missing at the end here: player}; is it not if (a1 distance player < 15) then { a1 sideChat "Sir, Team Alpha reporting for duty";[a1,a2,a3,a4,a5] join player[color="Red"];[/color] }; -
convoys...again
Padjur replied to THEBLITZ6794's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
:oops: sorry missed that when posting. Thanks. Glad its of use to you. I would like to find ways to improve the AI driving skills, any help on that or any other parts from anyone, would be much appreciated. -
convoys...again
Padjur replied to THEBLITZ6794's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I've been trying to make a sqf script for a convoy, with mixed results, but I'll post it anyway, see what you think. Any help, suggestions, improvements very welcome. :) First my sqf script based on Rohrkrepierer's sqs. I'm quite pleased with the results with this, seems to keep them in the proper station for the convoy. station.sqf if (isServer) then { _Veh1 = _this select 0; _Veh2 = _this select 1; while {true} do { if ((_Veh2 distance _Veh1) >=10) then { if ((_Veh2 distance _Veh1) <30) then { _Veh2 limitSpeed 5; } else { _Veh2 forceSpeed -1; }; } else { _Veh2 stop true; }; }; }; Now the second script which makes the convoy (inside the spoiler). I decided to spawn the vehicles with a script rather than place them in the Editor because I can create the convoy in one spot, instead of making a long line of vehicles etc. Place two markers name them (start and Fini) with axis a & b at 0 (put the name in the text box as well so you can find them) I tried calling a waypoint script using addWaypoint but they don't complete as well as they do with _Veh doMove (getmarkerpos "Fini"); _Veh setSpeedMode "LIMITED"; I also made a "waypoint" script with doMove, to call in the convoy script, which works better. But (this is the main problem that I haven't really overcome yet) I find if you try and add any sort of complexity into the route then the chances of them messing up increases, but if you needed them to stop for a while you can do that. So for simplicities sake I just put a finish marker for the convoy to move to in the convoy.sqf with the above doMove code. One problem I did find with this is that if you come to a sharp corner where they can cut across the grass, they will and generally get stuck. Otherwise they will follow the main route to the destination. See inside the spoiler for the convoy script.