Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

redmotion

Member
  • Content Count

    45
  • Joined

  • Last visited

  • Medals

Everything posted by redmotion

  1. Because even when I pick an area clear of trees, the AI decides to land about 30 metres over. In the trees. Can't someone at BI just mark clear areas for AI heli's to land on the maps?
  2. Can't seem to get this to work. I want to create a trigger using script so that when the player enters it, he gets an option to radio HOTEL. _basetrigger = createTrigger ["Switch", _pos]; _basetrigger setTriggerActivation ["HOTEL", "PRESENT", false]; _basetrigger setTriggerArea[100,100,0,false]; _basetrigger setTriggerStatements ["this", "hint 'trigger on'", "hint 'trigger off'"]; The script runs but when I go to the destination nothing happens?! Those aren't the final statements just fillers. _pos is obtained with "_pos = getMarkerPos "BaseMarker1";" I'm pretty sure its not a position 2d/3d issue. There are WEST forces at this location, whom I don't want to set off the trigger. Thanks for any advice you can give.
  3. Still can't get this to work. How can I script a trigger that only activates if the player enters? _pos = getMarkerPos "BaseMarker5"; basetrigger = createTrigger ["SWITCH", _pos]; basetrigger setTriggerActivation ["WEST", "PRESENT", false]; basetrigger setTriggerArea[100,100,0,false]; basetrigger setTriggerStatements ["this", "hint 'trigger on'", "hint 'trigger off'"]; Can't even work out how to createTrigger properly. What should I put? I consider switching to waypoints but they don't even appear at the right position.
  4. Think so! Thanks. I'm just curious how you can make a trigger only activate if the player enters the trigger. Is it "LEADER" (in my mission the player is the leader of the team)?
  5. redmotion

    Arma 2 OA 1.53 Suggestions

    If this has been suggested, consider this another vote in favour of: - the SECOPS module to use the current OPFOR when it generates tasks. It appears they are only spawning russians, even in takistan where the OPFOR is takistani insurgents.
  6. redmotion

    The name of this forum

    I think the confusion arises because the mission editor looks literally like a map. Time to get the 3d editor finished or integrate the visitor tools into the main game.
  7. I've been using this script for randomising some positions:- pos = _this select 0; _Dist = _this select 1; _Dist2 = _this select 2; _posX = ( _pos select 0); _posY = ( _pos select 1); _Dist = _Dist + random _Dist2; _Angle = random 360; _posX2 = _posX + _Dist * sin _Angle; _posY2 = _posY + _Dist * cos _Angle; _newpos = [ _posX2, _posY2]; _newpos Save it as an .sqf. It takes a position, min/max distances changes it and returns the new position. Access it using a line like this: rndPos = compile preprocessFile "randomposition.sqf"; _newpos = [<position> , <minimum distance>, <variablility beyond>] call rndPos; or just _newpos = [<position> , <minimum distance>, <variablility beyond>] execVM "randomPosition.sqf";
  8. Is it possible to check if a SECOPs mission has been completed with a script? Like an addEventhandler?
  9. _howManyMen = _defaultgroupsize + floor (random _defaultgroupsize + 4); bodiesGroup = createGroup civilian; //Create the Dead for "_x" from 1 to _howManyMen do { _unit = bodiesGroup createUnit [_tkCivs select (floor random (count _tkCivs)) , _locationPosition , [], 100, "NONE"]; _unit = setDamage 1.0; }; I'm getting an error with setDamage. Not sure why. It says "Error missing ;". _tkCivs is an array listing all civilian character names. _tkCivs = ["TK_CIV_Takistani01_EP1", "TK_CIV_Takistani02_EP1", etc etc PS: Also have a similar problem with the "sleep" command. I have "sleep 10;", it gives "generic error in expression". It is an sqf file. No clue why its not working! Thanks.
  10. EDIT: FIXED. I think the issue with SLEEP may be to do with using "compile preprocessFile ". If I use execVM instead I'm getting the fade out effects working as I want. Ugh! Thats one of my more embarissing late-night "don't have a clue" posts... Anyway, that was the problem. Got it working on the dead bodies front. Thanks for that... :) Doh! I still cannot make sleep work though.... I've got a lot of seperate scripts that can be called in any order depending on conditions. Most are .sqfs calling other .sqfs. So in one of these scripts after preprocessing some files and placing bodies and enemies, I then put in the task title last thing. (currently part of a task generation sqf but may be moved to a seperate "mission opening titles" script) The fade in works, but the fade out doesn't happen, the screen just goes black and fades in straight away. The code below gives me errors for both lines with "sleep". What I'd really like to do is fade to black, advance time forward while the screen is blank, wait for a few secs, start the titles and then fade in as they appear. //titles titleText ["", "BLACK OUT", 5]; sleep 5; skipTime random 8; _DateStamp=Date; // date related calcs go here playerDay = _jdNow - _jdStart + 1; _dayCount = format ["Day:%1", playerDay ]; [ str(_dayCount), str(_TimeStr), str(_taskTitle) ] spawn BIS_fnc_infoText; titleText ["", "BLACK IN", 2]; sleep 2; I can get the fade out to work using a seperate sqs as in: _Handle = player execVM "fadeOut.sqs"; waitUntil {scriptDone _Handle}; The waitUntil doesn't seem to wait though... and in the sqs "~5" gives an error. VERY frustrating.
  11. Sounds reasonable. So I'm wondering what would be the easiest way to find out what's in these compositions? Extracting ca.pbo seems the best approach?
  12. I'm having a go at creating a mission with a scoring system and I want to penalise the player if he shoots any civilians by reducing the score (global variable). Anyone know how you can check for the player or blufor killing Ambient Civilian generated civilians?
  13. I've been using camp1_us for a mission and noticed that there is a weapons cache in the composition crammed full of weapons. Any idea how to get rid of the weapons and/or put new ones in?
  14. I'm creating a Group of enemies called _defendgrp1. Then I'm trying to create a trigger that will be alerted when all members of the _defendgrp1 are dead. I've got this far from reading some other threads dotted around:- _trig = createTrigger["EmptyDetector",_locationPosition]; _trig setTriggerStatements ["{alive _x} count units _defendgrp1 == 0", "hint 'Dead'" ,"hint 'Alive'"]; also tried: _trig setTriggerStatements ["({alive _x} count units _defendgrp1) < 1, "hint 'Dead'" ,"hint 'Alive'"] as TriggerStatements/condition. Is this the right approach? Or Am I missing something? Thanks in advance.
  15. This works everytime: _defendgrp = [_locationPosition, side player ,(configFile >> "CfgGroups" >> "West" >> "BIS_US" >> "Infantry" >> "US_RifleSquad")] call bis_fnc_spawngroup; However, I just can't work out how to spawn enemy units, one thing I don't know is what the "side" of insurgents in Takistan: defendgrp2 = [_locationPosition, side player ,(configFile >> "CfgGroups" >> "East" >> "BIS_TK_INS" >> "Infantry" >> "TK_INS_Group")] call bis_fnc_spawngroup; This works too. But if I put "east" as the side, they don't appear. I've tried various combinations like "side east", "east", "resistance" ,but nothing. If I put down two groups of these (side player) they proceed to kill each other. I'm stumped... Thanks for any help. EDIT: Also tried an alternative: _group = createGroup east; _unit = group _group createUnit ["SoldierGB", _locationPosition , [], 0, "FORM"]; Doesn't work either.
  16. @fatty86, CarlGustaffa: Thanks for tips guys, that was the problem! No center or no opfor unit on map at start. Both are options. @neokika: thank's for the correction - my biggest problem is missing these little things in the code! I've just discovered the commandline switch "-showscripterrors" which I'm going to look at tonight - hopefully should save HOURS of wasted to-ing and fro-ing between ArmaEdit and Arma2OA, wondering why something has stopped working! ---------- Post added at 12:40 PM ---------- Previous post was at 12:19 PM ---------- Another question, these units I'm creating are linked to a task. I'd the task to be "completed" once all the groups/units are dead. Whats the best way to do this? Create a trigger linked to the units at the same time? Or is there a neater way? Thanks.
  17. Insert a unit and then pick "empty" for the side. Then you get all the classes listed here under "class", except compositions (search for dynamic compositions here for that).
  18. Insert a unit and then pick "empty" for the side. Then you get all the classes listed here under "class", except compositions (search for dynamic compositions here for that).
  19. Ok. This is the code I've got in a function. It supposed to take a position and distance as an argument and then generate a new random position from there: _pos = _this select 0; _Dist = _this select 1; _posX = ( _pos select 0); _posY = ( _pos select 1); _Dist = _Dist + random 1000; _Angle = random 360; _posX2 = _posX + _Dist * cos _Angle; _posY2 = _posY + _Dist * sin _Angle; _newpos = [ _posX2, _posY2]; _marker = createMarker ["Marker1", _newpos ]; It doesn't work. I'm sure it's to do with an error with the position syntax but I can't work out where or what it is! Would be grateful for advise or a link to a ready-made random position function! :) Thanks.
  20. I've noticed that if you do a nearest location test from the player position only some of the Takistan towns are registered as Cities. Code I'm using:- _nearestCity = nearestLocation [_pos, "nameCity"]; For example I can stand next to or in Timurkalay and the nearest location is always Garmarud. How do I make it so that Timurkalay or any other smaller town is included in this test? (Or Do I need a different test?) I've tried using a Game Logic object, (set to Class: Locations, Unit: City, Name: Timurkalay) and it is still ignored. Thanks. ---------- Post added at 03:55 PM ---------- Previous post was at 03:14 PM ---------- Could be listed under NameVillage, checking... And NameCityCapital.
  21. I've tried various ways of doing this based on the chapter in the Arma editing guide (Chapter 6.5 "Dynamic Start Points"). The code in the manual crashes Arma 2 because the syntax seems wrong. I've come up with this: StartR = random 3; if (StartR < 1) then {Player setPos getPos Start1}; if (StartR < 2) then {Player setPos getPos Start2}; if (StartR < 3) then {Player setPos getPos Start3}; To position the player at one of the three markers named Start1, Start2 and Start3. This doesn't work. I've tried putting it in the players init box in the editor and as a "randomstart.sqf" file. I've not found anything that works yet. Should this code work? Am I sticking it in the wrong place? Would appreciate any ideas?! Thanks.
  22. Thanks for that. That works fine but the problem is that I'd like to reposition the whole squad along with the player. I'm guessing the most efficient way would be to setPos of the Group rather than do it for each member individually. So replacing the first part of this line ("player"): [b]player[/b] setpos (getMarkerPos (_markers select (floor(random(count _markers))))); with the reference to the group instead seems logical. I'm guessing I can either use "units" or "group" but the docs are so "lite" I just can't work it out. _playerGrp = group player; _playerGrp setpos (getMarkerPos (_markers select (floor(random(count _markers))))); Doesn't seem to work.
  23. I'm wondering if there is already a mod that does this or if it might be possible to make it?
  24. That's you're opinion. Thanks for that. I don't want an auto-aim. Sounds like a cheat but it isn't. I don't want to look EXACTLY at someone shooting at me but in the general direction from which the last bullets came from. Not really. In real life I don't need to worry about using a mouse to look in the direction a sound is coming from (complex hand to eye co-ordination), I just use my neck to turn my head. It is instinctual. Very fast. Doing this with a mouse isn't fast as the realworld even with "training". Also, the FOV is just too small and audio (normally stereo) is too limiting. Its not even close to reality. Yes I could get a set of 5.1 headphones to make it better. (Does Arma2 use 5.1?) However, I can't be using headphones all the time. So is it possible to set a key on the keyboard to run a script?
×