-
Content Count
438 -
Joined
-
Last visited
-
Medals
Everything posted by thetrooper
-
Creating a recon mission
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ok, so I could put an action around after say if 'fighter b' is spotted, then...? Or is it more complicated than that? Kommiekat, best to read from post 18. Bulk of code as an SQF and there's a part about calling it from init file. -
Creating a recon mission
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
That works a treat. Great job! for extra bits like identifying commanders for possible tasks, is it best to run separate sqf files or keep it all within the same file? -
Creating a recon mission
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ok, yep now done that, no cigar though just yet. bit of background The senario I'm working on is using BAF in Takistan (Afghan type scenario). What I'm using for spotting _isSpotting = {currentWeapon _this == "Binocular", "Binocular_Vector", "BAF_LRR_scoped"}; It is mainly single units (fighters) to spot. There may be 15 of them, but you only have to find 5 for example. will be task completed.However, there are a couple of things in the village if spotted, 'new task'. At the moment though, not getting any pings with my rangefinder. Any ideas? -
Creating a recon mission
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ok, I have a couple of questions. reconTargets, do I need to list all the enemy guys able to recce in here instead of this: _reconTargets = _this select 0; I put in: _reconTargets = [a, b, c, d, e, f, g, h]; ? -
Creating a recon mission
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Stuck - Ok, so this is a script to run an action after a, b, c, and d have been spotted. I'm having some problemts with how do you set it up so you only have to recce say two from these before my action at the end. Any ideas? I'm thinking a "count" needs to be in place somewhere? [quote name= //spawn/execVM this script private ["_reconTargets","_lastCursorTarget","_lastCursorTime","_cTarget","_leaderA","_leaderB","_leaderC","_leaderD","_spottedTargets","_checkIsSpotting","_onSpot","_spotTime","_timeBetweenChecks","_stillSpotting"]; /* Target to spot */ _reconTargets = [a, b, c, d]; /* Custom variables */ _checkIsSpotting = {currentWeapon _this == "Binocular"}; _onSpot = {hint format ["You spotted %1", typeOf _this];}; _spotTime = 1.8; //Watch for 1.8 seconds _timeBetweenChecks = 0.25; /* Loop variables */ _lastCursorTarget = objNull; //Last target in "cursorTarget" _lastCursorTime = -100; //client time target was first spotted _stillSpotting = true; //Targets already spotted _spottedTargets = []; _spottedTargets resize (count _reconTargets); //4 checks per scond while {_stillSpotting} do { _cTarget = cursorTarget; //We tracking a target? if (!isNull _lastCursorTarget) then { //Same target as before and still spotting if (_cTarget == _lastCursorTarget && player call _checkIsSpotting) then { //Watched long enough? if (time - _lastCursorTime > _spotTime) then { //Spotted it _spottedTargets set [count _spottedTargets, _cTarget]; _reconTargets = _reconTargets - [_cTarget]; _lastCursorTarget = objNull; //Run on-spot code _cTarget call _onSpot; //No targets left? if (count _reconTargets == 0) then { _stillSpotting = false; }; }; } else { //Else lost it - update with null or new target _lastCursorTarget = _cTarget; _lastCursorTime = time; //Started watching this now }; } else { if (!isNull _cTarget) then { //Are we spotting. Do we have a new target to track? if (player call _checkIsSpotting && _cTarget in _reconTargets) then { _lastCursorTarget = _cTarget; _lastCursorTime = time; //Began watching now }; }; }; sleep _timeBetweenChecks; }; //All targets spotted what now? -
Creating a recon mission
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I haven't tried it but that's what I'm keen to do also. At the moment the script runs so that all the units listed need to be recced, anyone know how I can get it so you only have to recce any two instead of all four? Something like if count == 3 then mission accomplished? -
Creating a recon mission
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Tried this, it doesn't work for some reason. Been using a Takistan map so using the warlord class for it. I'll tackle the conversation system sometime in the future. Will be a bit of a nice to have thing really. -
Creating a recon mission
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ok, I've been playing around with it for a bit. A couple of things that would be good. 1. ok lets say the player is recceing a village. He spots his first enemy (could be any of them in the list), a message in SideChat gets sent back to HQ to say Player SideChat "hello zero, I've spotted enemy fighters within Karis Kalay, the town is hostile over"; blah blah, conversation over, carry on spotting. 2. I changed the hint so now a, b, c, d _onSpot = {hint format ["You spotted a enemy fighter", typeOf _this];}; So now we have indicated that a, b, c, d are somekind of light riflemen. How would you go out adding d and e as "You spotted a enemy commander", but for each that opens up another sideChat to report that back to HQ then maybe get an option where to accept to take on a new task to kill him? 3. We've got a mission to recce a village/town etc, now how to incorporate a point scheme for debrief end of the mission. -
Creating a recon mission
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Good effortY yep I got it working to. That script you got there does open up the game quite a lot. I'll come back after I have a think about the mission I'm going to create. -
Creating a recon mission
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
wow thanks for that. I'll have a play around, will let you know how it goes. ---------- Post added at 06:02 PM ---------- Previous post was at 05:34 PM ---------- It's not working at the moment. The "reveal" command is another new one for me. What I did was create my group called "recon" and in the enemy initialisation add recon reveal this . Also named my four bad guys as _leaderA, B, C, D. Probably haven't done that bit right. The script produced is now in a sqf file and called on in a initialisation field. Any tips? -
Creating a recon mission
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
hmmm, none the wiser. -
Creating a recon mission
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
That's promising. I know now that that exists, but can't find anything to help me set it up. For instance, I got 1 enemy and I spot him ising my binos. No idea of the Syntax or where to put it? -
Hi guys, I'm setting up a mission where buildings require to be damaged when the game starts. I'm using the following code in a game logic. (position this nearestObject 291099) The problem I have is when the game starts up it looks as though the building or tree is being destroyed as the game starts (like a sachel charge has just been set off). Is there any way to set it up so that the building has already destroyed?
-
I quite like the one AZCoder managed to produce. Any ideas how to get it to disappear over a set time though, or even show a clock timer?
-
Briefing not working?
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Gotcha! Cheers for that. Now, I got an image in my briefing, is there a way I can wrap the text around it? -
For some reason my briefing.sqf isn't working. It can't really be much simpler, can anyone spot why it doesn't work when I hold down shift and click in the editor? init.sqf execVM "briefing.sqf" briefing.sqf waitUntil { !isNull player }; // all hip now ;-) waitUntil { player == player }; player createDiaryRecord["Diary", ["Info", "<br/>TheTrooper<br/>Version 0.30<br/>"]]; player createDiaryRecord["Diary", ["Enemy forces", "<br/>Enemy"]]; player createDiaryRecord["Diary", ["Friendly forces", "<br/>Friends"]]; player createDiaryRecord["Diary", ["Mission", "<br/>My Mission"]]; player createDiaryRecord["Diary", ["Situation", "<br/>Some bad stuff going on"]];
-
Briefing not working?
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
OK I missed that bit. The briefing now works but my DiaryRecords are not showing up in the preview? -
Briefing not working?
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No, it's the same. It skips the briefing entirely for some reason. -
Briefing not working?
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah this is all I have if my sqf file? That's all I need in it, no tasks etc. as this pans out shortly into the mission. waitUntil {!(isNull player)}; waitUntil {player==player}; switch (side player) do { case WEST: { player createDiaryRecord["Diary", ["Info", "<br/>TheTrooper<br/>Version 0.30<br/>"]]; player createDiaryRecord["Diary", ["Enemy forces", "<br/>Enemy"]]; player createDiaryRecord["Diary", ["Friendly forces", "<br/>Friends"]]; player createDiaryRecord["Diary", ["Mission", "<br/>My Mission"]]; player createDiaryRecord["Diary", ["Situation", "<br/>Some bad stuff going on"]]; }; case EAST: { }; case RESISTANCE: { }; case CIVILIAN: { }; -
After a Halo completed run a script?
thetrooper posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi guys. I've got a halo jump going on, and what to run a sqf file once the altitude is zero. Basically I don't want the player to recieve a task until he is on the ground. I'm thinking the best way is to run a script that checks to see if the altitude is 0, then run the sqf? -
After a Halo completed run a script?
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Cheers for that, yeah works fine now :) Thanks for your inputs -
ok, here's a different one. I have two vehicles spit between one group (an extraction group called "JackGrp"). They go to a waypoint with a hold after the objective is complete to pick up the Player and his 3 AI "PtrlGrp". When the player gets himself and the other AI in the cargo of either vehicle (not enough room to have everyone in just one of them), the extraction "JackGrp" moves off. I'm thinking maybe some kind of validation script to see if every meber of "PtrlGrp" is in the cargo of either vehicle before the JckGrp moves off? Anyone have any thoughts or tried anything similar? Any better ideas?
-
After a Halo completed run a script?
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
hmmm, that isn't working -
Smooth game, hide & spawn units
thetrooper posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
HI guys, I've got a mission which has got quite a lot going on in it and thinking of ways to keep it from lagging etc. I've managed to hit a trigger that deletes redundant units using the deletevehicle method, is there simple way to spawn units with predetermines waypoints etc? The exaple I can give is basically at an airfield then lifted to a FOB, during that time units at airfield are deleted then units at a FOB are activated or spawned. Is this the right way about going about it? -
Smooth game, hide & spawn units
thetrooper replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for that. Included this into my mission. I think it conflicts with some simple scripts causing some big issues. One issue is when the player hits a trigger, the player and a few other units jump into a helicoper, but for some reason it seems that most of the other units on my map have jumped in as well :S Interesting... Another is a trigger is set for some troops to get in a bus once the player trips it, they don't want to do that anymore. Hmm...