Jump to content

mindstorm

Member
  • Content Count

    247
  • Joined

  • Last visited

  • Medals

Everything posted by mindstorm

  1. setcaptive actually did the trick. Thx for the tip!
  2. So I found out about : trigger setTriggerActivation [by, type, repeating] "by" can be a group/leader/member so this could work. However I do not want to create the trigger with a script. The script im making is supposed to work dynamicly with different kinds of maps. To bad you can get "triggers' by their name? or can you? ---------- Post added at 23:46 ---------- Previous post was at 23:45 ---------- Situation: Trigger 1: pos x,y,z Player 1 enters trigger. Trigger fires and calls my code. Now if player 2 enters the trigger but player 1 did not leave the trigger yet it won't fire again! <--- That's my issue If player 2 would enter the trigger and player 1 already left there would be no problem.
  3. Once a player enters the trigger his personal mission state needs to be set to "Finished". But not the mission state of other players. Once others enters their personal mission state also needs to be set to "Finished". So more like a local trigger I suppose. Is that possible?
  4. mindstorm

    Intro Skip

    fixed a type in my post (finddisplay 46) displayRemoveEventHandler [""keydown"", INTRO_SKIP_HANDLER]; "keydown" was with single double quotes but it needed double double quotes because it's in a string.
  5. _units = (if (isMultiplayer) then {playableUnits} else {switchableUnits}); _units = all playable players or AI players in a single or multiplayer game. So this does NOT contain AI units which are non-playable. allUnits = All UNITS ingame (players and AI playable and non-playable) except from Agents. _aiUnits = []; { _unit = _x; if !(isPlayer _unit) then { _aiUnits set [count _aiUnits, _unit]; }; }foreach allUnits;
  6. The above one works for a specific vehile. This one would work for every vehicle but there might be a performance hit on the server depending on the ammount of vehicles on it (I did not test this script). place in init. PLAYER_MESSAGE = ""; if(isServer) then { [] spawn { _pilotstypes = ["B_Helipilot_F"]; _clanmemberuids = ["UID","UID","UID"]; while { true } do { { _vehicle = _x; _driver = objNull; _driver = driver _vehicle; if (!isNull _driver) then { if (!((typeOf _driver) in _pilotstypes) && !(getPlayerUID _driver in _clanmemberuids)) then { _driver action ["GETOUT", _vehicle]; PLAYER_MESSAGE "You are not trained to fly this type of Aircraft"; owner _driver publicVariableClient "PLAYER_MESSAGE"; }; }; } foreach vehicles; Sleep 1; }; }; }; if!(isDedicated) then { [] spawn { while { true} do { if !(PLAYER_MESSAGE == "") then { hint PLAYER_MESSAGE; PLAYER_MESSAGE = ""; } sleep 1; } }; };
  7. My bad. That's because in MP the player is only the local player. Change getPlayerUID player to getPlayerUID _driver aka _vehicle = _this select 0; _pilotstypes = ["B_Helipilot_F"]; _clanmemberuids = ["UID","UID","UID"]; _driver = objNull; while {damage _vehicle < 0.5} do { _driver = driver _vehicle; if (!isNull _driver) then { if (!((typeOf _driver) in _pilotstypes) && !(getPlayerUID _driver in _clanmemberuids)) then { _driver action ["GETOUT", _vehicle]; hint "You are not trained to fly this type of Aircraft"; }; }; Sleep 1; };
  8. _vehicle = _this select 0; _pilotstypes = ["B_Helipilot_F"]; _clanmemberuids = ["UID","UID","UID"]; _driver = objNull; while {damage _vehicle < 0.5} do { _driver = driver _vehicle; if (!isNull _driver) then { if (!((typeOf _driver) in _pilotstypes) && !(getPlayerUID player in _clanmemberuids)) then { _driver action ["GETOUT", _vehicle]; hint "You are not trained to fly this type of Aircraft"; }; }; Sleep 1; };
  9. mindstorm

    Intro Skip

    personally I would make a parameter out of it. in Description.ext: class Params { class PLAYINTO { title = "Play Into"; values[] = {0,1}; texts[] = {"No","Yes"}; default = 1; }; } then in init.sqf: //Saves all params into vars with the same name. for "_i" from (0) to ((count paramsArray) - 1) do { missionNamespace setVariable [configName ((missionConfigFile/"Params") select _i),paramsArray select _i]; }; And then do a if loop where you call the intro: if(PLAYINTO == 1) then { //play into }; ---------- Post added at 12:04 ---------- Previous post was at 11:51 ---------- Alternativly you could assign a key for the skip action. This is a bit more advanced tho. 35 is a keycode (for the key H: http://community.bistudio.com/wiki/DIK_KeyCodes). You will need to convert those hex codes into decimal (atleast when I tested it the hex values didn't work for me). http://www.statman.info/conversions/hexadecimal.html. init.sqf (I did not test this). //Waits till the main display is initialized. waitUntil {!(isNull (findDisplay 46))}; INTRO_SKIP_HANDLER = (finddisplay 46) displayAddEventHandler ["keydown", " if ((_this select 1) == 35) then { terminate INTRO_HANLDE; (finddisplay 46) displayRemoveEventHandler [""keydown"", INTRO_SKIP_HANDLER]; }; "]; INTRO_HANLDE = ["test.ogv", true] spawn BIS_fnc_titlecard;
  10. You could defaultly lock the vehicle (or by script): vehicleName setVehicleLock "LOCKED"; Then add an action on the chopper: http://community.bistudio.com/wiki/addAction _chopper addAction ["Enter vehicle", "enter_vehicle.sqf"] then in enter_vehicle.sqs: -Check if player is a pilot and pilot null then put him in the vehicle -If not a pilot put him in cargo if slot available. http://community.bistudio.com/wiki/moveInDriver http://community.bistudio.com/wiki/moveInCargo Not sure if those work when the vehicle is locked. If they don't you could only do the pilot check in enter_vehicle.sqf and do: vehicleName setVehicleLock "UNLOCKED"; Then this to lock the vehicle once the driver exits and kick all players. [] spawn { waitUntil {isNull driver vehicle}; vehicleName setVehicleLock "LOCKED"; //kick all players out }; You also might wanna check about removing the enter chopper action once a chopper enters it and replace it once he exits. The addAction returns a handle, so you can remove it with : http://community.bistudio.com/wiki/removeAction eg CHOPPER_ACTION = _chopper addAction ["Enter vehicle", "enter_vehicle.sqf"]; player removeAction CHOPPER_ACTION;
  11. netId only works in MP games (so not in the editor for example). I tried getting SP id's from objects aswell but apparently that's not supported. Anyway I don't understand why you would need the object id specific. You could get all objects, store them by their formatted name (_name = format["%1, _object]) and then store their positions inside the array. (Or the positions of the "Space you need near the house"). Either way if you can: A. Output the house positions and use nearObjects with a small radius and then do your magic on init (or whenever needed) or B. Output them in a test setup and import those back Would look something like: _buildings = getMarkerPos "centermap" nearObjects ["House_F", 5000]; _building_objects []; { _building = _x; _name = format["%1",_building]; _building_object = [_name , getPos _building]; _building_objects set [count _building_objects, _building_object]; } foreach _buildings; { _building_object = _x; diag_log format ["Name:%1--Pos:%1", _building_object select 0, _building_object select 1]; } forEach _building_objects; If you'd want to retrieve the ID from the name you could use the string functions made by Kronzky: _object_id = [_object_name] call GET_OBJECT_ID; GET_OBJECT_ID = { _object_name = _this select 0; _object_id = [_object_name , 10, 6] call KRON_StrMid; }; KRON_StrToArray = { private["_in","_i","_arr","_out"]; _in=_this select 0; _arr = toArray(_in); _out=[]; for "_i" from 0 to (count _arr)-1 do { _out=_out+[toString([_arr select _i])]; }; _out }; KRON_StrMid = { private["_in","_pos","_len","_arr","_i","_out"]; _in=_this select 0; _pos=abs(_this select 1); _arr=[_in] call KRON_StrToArray; _len=count(_arr); if ((count _this)>2) then {_len=(_this select 2)}; _out=""; if ((_pos+_len)>=(count _arr)) then {_len=(count _arr)-_pos}; if (_len>0) then { for "_i" from _pos to (_pos+_len-1) do { _out=_out + (_arr select _i); }; }; _out };
  12. hey Is there a way to check which player activated a trigger when i set it to "BLUEFOR" for example? thx in advance.
  13. I'm proud to present you the first mission I ever mead for a ARMA game. Lost Warhead Codes A terrorist group managed to obtain warhead codes. Your mission is to infiltrate the island Stratis where they are holding up, secure the codes and ex-filtrate. COOP 1-8. Features Custom music FHQ TaskTracker Awesome scripted events Respawn version & group respawn version Helicopter drop-off and extraction Plot twists Selectable day/nighttime (parameters). Aprox 1-2 hour play trough (depends on how you move / engage). Tips Play this with friends. It can be done with AI but since they aren't the smartest guys a.t.m. it's a lot harder. Turn music on. No music during battles so it won't annoy you. I'm thinking about maybe adding BTC revive in the future, haven't had time to look at it yet. Suggests/tips and criticism is very much appreciated. Download - Lost warhead codes - Group respawn Download - Lost warhead codes - Respawn Alternative download url (Thx to Armaholic) Lost Warhead Codes Co-08[ALPHA]
  14. You could do this: scipt.sqf track1_playing = true; while {track1_playing} do { say3d "track1"; sleep 169; }; And then change track1_playing to false when you want it to stop looping.
  15. Hey, I placed some enemy units on my map which are supposed to shoot down a helicopter with this in their init: removeAllWeapons this; this addMagazines ["rpg32_aa_f",2]; this addweapon "launch_rpg32_f"; The problem is that they don't fire on the chopper unless it's like 200 meters aways. So if they are further away they will spot the chopper, and then they will duck for cover and stay there.... I also tried a different approach suggested by someone else: Init: this disableAI "AUTOTARGET"; this disableAI "TARGET"; Then a trigger dude reveal [heli,4]; dude doTarget heli; dude doFire heli; But I get the same problem.They just refuse to shoot at a further away distance. I tried shooting with the "launch_rpg32_f" myselve and I can shoot from as far as I can see. So it's not a weapon limitation. Anyone know how to increase the distance from where units start shooting?
  16. Hey I'm trying to get an AT soldier to shootdown a helicopter. For some reason they don't switch to their launcher. I tried giving them different launchers and selecting the launchers. So they: 1. Dont automaticly switch themselve 2. selectweapon his not working for the secondary weapon (works for handgun). Is this bug or am I doing something wrong? this removeWeapon secondaryWeapon this; this addWeapon "launch_NLAW_F"; this selectWeapon "launch_NLAW_F"
  17. mindstorm

    selectWeapon not working?

    Thx for that info. I got them to fire at the chopper. But they only fire at it from like 100 meters of distance.... I have a couple of units set-up at a near mountain, from where I can easily hit the chopper with a rpg32_f. The AI however just lies down and does nothing. Same with the doTarget/doFire. They only shoot at the chopper when it's really close. How can I change the distance from where they start shooting? Their skill is maxed out and I even set "setSkill ["spotDistance", 500];".
  18. Ah yeah. I remember that before 0.52 I could enter the tower as well (entered it in the escape from island mission). But when we played your mission yesterday I could not enter. At first I thought this was due to the fact that we had to blow up the tower but I might be possible that they changed it back to a non-enterable building because shooting through windows is (/was?) broken.
  19. What about the way it's handled in the COOP MP showcase mission (escape the island). Respawn with the timer. Did you not implement that because it's "to easy"? (As in revive by medic is more realistic) or?
  20. I've been reading thos post. As far as I can read the revive script is not yet it place. However you mentioned the fact that you respawn as alive AI if any are left in the group? Is that correct? Love the mission and the effort you guys put into this but my friends and I play cuasual. If one of the 4 of us dies as 50% of the mission that is rather dull. I know you need to get a bit more of a "real" emmersion stuff but a 5 minute timer would also create this fealing (atleast partly?). Anyway what I can read from the script now: respawn = 4; respawndelay = 3; So what does this mean right now for the respawn meganism?
  21. Hey, Tried the mission yesterday with 4 people. We all joined alpha team. According to you PBO it was v0.08. We had lots of fun playing the mission even tho we had a couple of bugs. So first of rep and many thanks for the mission. Not many missions around so I am rather thankful for the time you put into this. Btw if you wonder why no one replies. They probably found this forum/thread by google when searching for mission files, tried your mission (and loved it?) but find the registration process of this forum rather annoying (as do I). Anyway the bugs we encountered, -VIP died when we where about 2km from airfield. Probably a bug? or he killed himself by walking over a mine? Not sure what happened. Not sure whether 0.8.1. solves this we only played the mission once on 0.8. -We "bombarded" the tower with C4, it was successfully destroyed but the mission objective did not confirm this. 0.7.4 mentions something about a fix for this but apparently this is not working? Or could this be due to the fact that the VIP was already dead and our mission was to ex-filtrate the island? -When we finally "arrived" at the airport all the enemies started running away from us, to the south/west. We had a rather easy time from there on wards (no more enemies near). I'm not sure if this is a mission bug or a alpha one, I remember reading something about this being a alpha bug. B.t.w. the team we play this with is rather novice. We played the mission once on casual and 1 member died. Unfortunately he could not respawn, is there a way you could release a sepperate mission file with a group respawn as well <puppyeyes>? <note> if for some reason this post appears twice that's because these forums are driving me nuts. I posted it once but my post did not appear.
×