PELHAM
Member-
Content Count
1582 -
Joined
-
Last visited
-
Medals
Everything posted by PELHAM
-
How to make intro/outro for missions.
PELHAM replied to Redfield-77's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
That method of intro does not work in multiplayer. For multiplayer you have to call the intro in the mission. For multiplayer: move all objects in the editor from intro to mission. call the intro script when players join (JIP). (You will have to look for other examples - I have not got any - try Domination) -
End Mission When Objectives Complete
PELHAM replied to ColeMinor's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The only way I could find was to: yourTask setTaskState "Created"; That resets the task but does not remove the completed/failed icon from the map. That icon will be removed once the task is completed again. It works ok if your task occurs in a random location. e.g. if you have 3 or 4 different Landing Zones but looks odd for a single location. -
How to make intro/outro for missions.
PELHAM replied to Redfield-77's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
@ pch91 change filename intro1.sqs to initintro.sqs -
Keyboard UI number codes
PELHAM replied to Double Doppler's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Anyone get this to work? I had a go for 10mins last month and gave up thinking it was for VBS2 only? -
How to setpos objects created from a marker array?
PELHAM replied to PELHAM's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Excellent, thanks Carl! Why didn't I think of that!? Probably because _x has done so many wonderful things for me lately I was convinced it would be the answer lol. I need the markers for a low level confidence course in my helicopter training mission between houses, trees and telephone poles. It stretches accross the entire island of Utes and they are 50m apart so does not look too bad. The conditions to win the task are no slower than 130kts and no higher than 20/25m. You need a line for reference so you know where to go. A single helper isn't enough. I am thinking of scripting the whole thing individually so it looks a bit more professional and I can hideObject, show and setObjectTexture etc to change the colours / alpha. Hopefully after someone sees the enormous effort put into this, some of the admins will let me fly in Domination :D. -
How to setpos objects created from a marker array?
PELHAM posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I have created a path of helper object spheres using the following code. It creates 1 sphere on each marker at ground level.: {"Sign_sphere100cm_EP1" createVehicle getMarkerPos _x;} forEach[ "L01","L02","L03","L04","L05","L06","L07","L08","L09","L10", "L11","L12","L13","L14","L15","L16","L17","L18","L19","L20", "L21","L22","L23","L24","L25","L26","L27","L28","L29","L30", "L31","L32","L33","L34","L35","L36"]; The problem: I would like to set each sphere 30m above the ground with setPosATL. As there is no array for the spheres how would I do that? Is it even possible or do I have to create all the spheres and setpos each one in the editor? I have tried various combinations of the setposATL syntax combined with _x and I had an {sp = "Sign_sphere100cm_EP1" createVehicle getMarkerPos _x;} forEach[ and tried using a {setposATL [blah blah]} for each units sp; but that did not work either. Am I going about this in the right way or would you not start from here lol. -
How to setpos objects created from a marker array?
PELHAM replied to PELHAM's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I think I am going to go back and start again. I was attempting a shortcut but of course the best way is scripting each sphere individually so you have more options and control. I am going to use a combination of markers and Hpads so I can move/delete spheres and task hints along the track at will. There does not seem to be a method of either setPos or deleting objects created in this way. See you all much, much later. My father always told me there were no shortcuts in life lol. Thank you for your help. -
How to setpos objects created from a marker array?
PELHAM replied to PELHAM's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The problem is there is no array to declare: The spheres are created 1 on each marker at ground level with the code in post 1. If that creates an array of spheres how do I call that information? ---------- Post added at 12:16 ---------- Previous post was at 12:02 ---------- Yes the code I use creates 1 sphere on each marker at ground level, the problem is how to alter their position, I tried this one, didn't work: { "Sign_sphere100cm_EP1" createVehicle getMarkerPos _x; _x setPosASL [ getPosASL _x select 0, getPosASL _x select 1, (getPosASL _x select 2) +100] } forEach ["L02","L03","L04","L05","L06","L07"]; It only creates 1 sphere at ground level - is it because we are nesting several _x values in one code block and it's getting confused? -
How to make intro/outro for missions.
PELHAM replied to Redfield-77's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Not sure what else I can add after the tutorial and example mission but: ~0 ~2 ~2 change these to: ~10, ~15 or more The scene you made would only be 4 seconds long and might not show past the loading of the intro and script. -
How to disable the score/scoreboard
PELHAM replied to ios's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Not sure if you mean multiplayer or singleplayer? In single player missions you use addrating eg: player addRating 2000; That adds 2000 extra points which show on the score board at the end of the mission. -
Making my first own mission
PELHAM replied to tryteyker's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I am on my first mission too. For scripting you need to refer to this page in the wiki and make sure you follow the correct syntax for each command: http://community.bistudio.com/wiki/Category:Scripting_Topics Have you worked out how to do intros yet? If not try here: http://forums.bistudio.com/showthread.php?t=82020&page=3 I just spent 3 very frustrating nights learning it. Watch the youtube videos and then look at my tutorial and the example mission. -
How to make intro/outro for missions.
PELHAM replied to Redfield-77's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Example mission using the above example on Zargabad Arma 2 OA Requirements Arma2 and Arma2 OA Mediafire: http://www.mediafire.com/?4dkk3vgz48g8373 -
How to make intro/outro for missions.
PELHAM replied to Redfield-77's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Making a decent intro can be quite complex - this is what I know about it. This method is for single player. For multiplayer you have to do the intro in the mission part of the editor and then call the script when players join. 1. You need to create an intro mission with objects and units in the intro part of the editor (select at top right). 2. You need to create a script (eg scene.sqf / sqs) that runs the camera work and music etc 3. You need to initiate the scene.sqf / sqs with an initIntro.sqf or (initIntro.sqs if using that method). This is important - it acts like an init.sqf for the intro. The intro will not activate without it. 4.NB the above is for running the intro at the beginning of the mission before the briefing screen. If you want an intro/video after the briefing you will have to call it from within the mission in the usual way by nul = execVM "scene.sqf";. I have just learned all about it by searching for intro and initIntro on these forums - there is plenty of good information. 1. The intro mission. Create it in the usual way with, Player, objects, triggers, units waypoints etc. The engine will play this mission before the actual mission starts. 2. The scene.sqf and camera work Have a look at the Youtube videos mentioned in previous posts. This can be done in sqs or sqf format. I prefer sqf as that is how everything else works now and it saves confusion. To get camera positions (as in the Youtube tutorial) start the camera in the intro by running this exec "camera.sqs" in the players init or in a game logic. To get a Camera start position: -Start a preview of the intro in the editor. -Move the camera to the position you want. -Press the left mouse button. -Abort preview. Save mission then Alt - Tab to notepad. Ctrl - V to paste data into notepad. example: ;=== 22:11:02 _camera camPrepareTarget [684.73,98559.95,-27662.98] _camera camPreparePos [2545.07,2486.85,9.91] _camera camPrepareFOV 0.700 _camera camCommitPrepared 0 @camCommitted _camera The sqf verion of the above is: //=== 22:11:02 _camera camPrepareTarget [684.73,98559.95,-27662.98]; _camera camPreparePos [2545.07,2486.85,9.91]; _camera camPrepareFOV 0.700; _camera camCommitPrepared 0; waitUntil {camCommitted _camera}; http://community.bistudio.com/wiki/camera.sqs http://community.bistudio.com/wiki/Category:Command_Group:_Camera_Control Some examples: An initIntro.sqf from AZCoder (nice work - saved me lots of problems!) (Your initIntro can of course contain everything, no need for separate scene.sqf. Best if you only have 1 cam-scene in the whole mission) http://forums.bistudio.com/showpost.php?p=1842529&postcount=4 -The cutText blacks the screen out till the camera in the next script is ready. -fadeSound turns the sound volume to 0 An example scene.sqf continuing from the above. This one attaches to a helicopter rather than using camera positions: -
Does this play the in game BIS music or select tracks from a folder of the players choice? Can we have some more info please?
-
Need help with this random smoke generator / detector script: I get the error: No matching signature for <array> operator <code> from Squint Which means I am passing it the wrong argument? I have tried several but can't find the right one? It works up until the if (blah blah) then sequence. // nul = [] execVM "scripts\randsmoke.sqf"; private ["_smokes","_type","_dest"]; _smokes = ["SmokeShellYellow","SmokeShellRed","SmokeShellGreen","SmokeShellPurple","SmokeShellBlue","SmokeShellOrange"]; _type = _smokes select floor(random count _smokes); _dest = _type createVehicle getMarkerPos "p1"; if (_type = SmokeShellYellow) then {hint "yellow";}; else { if (_type = SmokeShellRed) then {hint "red";}; else { if (_type = SmokeShellGreen) then {hint "green";}; else { if (_type = SmokeShellPurple) then {hint "purple";}; else { if (_type = SmokeShellBlue) then {hint "blue";}; else { if (_type = SmokeShellOrange) then {hint "orange";}; sleep 1; trgSmoke setPos (getMarkerPos "p1hold");
-
Script error:No matching signature for <array> operator <code>
PELHAM replied to PELHAM's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thank you all. I am going to have fun converting it to a switch. P.S. Squint is a real help sbsmac - I use it all the time! ---------- Post added at 23:14 ---------- Previous post was at 21:40 ---------- Here is the full script if anyone wants to use it: -random smoke generator -radio calls with colour of random smoke -returns player vehicle as well You need: -a trigger to start the script at the LZ -a marker for the LZ -a marker to move the trigger so it does not fire twice (last 2 lines). These can be setPos around to have the effect repeat at different LZs. -
Camera to follow a plane correctly
PELHAM replied to Melmarkian's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks Neo - it is a good alternative! I came up with this that worked well: _pos = getPos land1; _cam camsettarget h1; _cam camPrepareFOV 0.700; _cam attachTo [h1, [10,50,10]]; _cam setDir 180; waituntil { h1 distance _pos <= 100 }; detach _cam; I had to use the setDir to get it to look back at the helicopter. Also it's stuck in 1 plane and does not track the target and the camera tilts with the helicopter when it banks. This does not happen with the setRelPos method. It's an effect that might not be desirable but I found that when attachTo is combined with setRelPos scenes it makes a good dynamic movie! -
Camera to follow a plane correctly
PELHAM replied to Melmarkian's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm not sure....why do you recommend it? -
Camera to follow a plane correctly
PELHAM replied to Melmarkian's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Having a bit of trouble with this loop. Is {!camtrig3} a trigger? How do you set it up? I have placed a trigger called camtrig3 but the script fails at this loop? If I change it to {true} it works? -
Sorry - could have explained that better - for the players team I order Get In with the command menu action. There is no scripted action listed for that as you say. There is a corresponding action for the player team to order get out that you can use instead of fumbling for the disembark command. playerman2 action ["Get Out", Mortar1]
-
OK then: http://forums.bistudio.com/showthread.php?p=1736958&highlight=disassemble#post1736958 Kylania has a dissasemble/assemble script in the 4th post down - combine that with the suggestions in my post and you should have your solution. MoveInCargo and MoveInGunner are not better - just different. These act instantly to teleport the AI in whereas orderGetIn makes them move to the mortar and operate it with animations. It is likely the player is watching the AI, so MoveInCargo and MoveInGunnerwould not be very realistic. You would see the AI suddenly teleport into/out of the mortar? I always use orderGetIn if the player is likely to see the mortar crew at work or the AI are on the player's team. If Travn is going to the trouble of dissasemble/assemble the mortar, it must be for a reason. If the player does not see it, then it's best to simply setPos the mortar and crew around the map and use MoveInCargo and MoveInGunner. Everyone happy now?
-
I answered this for someone here: http://forums.bistudio.com/showpost.php?p=1866421&postcount=3 You can have an empty mortar just make someone (named mortarman) get in it before blufor get to the trigger. Name the mortar "mortar" in this case. You could put this in mortarman's init. mortarman assignAsGunner mortar; [mortarman] orderGetIn true; Extra fun Have the mortar crew run away once discovered, you need a runaway marker: Trigger blufor, once, present. OnAct: [mortarman] orderGetIn false; mortarman doMove getMarkerPos "runaway";
-
Player respawn at height ?
PELHAM replied to strike0277's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This works for me, vpo1 is an invisibleH, player spawns 15.9m above sea level on the H. It's used on the LHD Carrier but should work in buildings or adapt it and try getPosATL: player setPosASL [getPosASL vpo1 select 0, getPosASL vpo1 select 1, 15.9]; -
choose random script
PELHAM replied to quincy's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
_scripts = ["script01.sqf", "script02.sqf", "script03.sqf"]; _answer = _scripts select (floor(random(count _scripts))); [] execVM _answer; Hope that helps! -
arma 2 is their a way to get arma2 stuff in arma 2 oa
PELHAM replied to mikemike664's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No - that would be illegal and there is no method. I would buy Arma2 - it really is value for money not just for the objects but all the other things. Remember OA is an addon of Arma2.