Jump to content

twirly

Member
  • Content Count

    1304
  • Joined

  • Last visited

  • Medals

Everything posted by twirly

  1. Try it this way maybe... I'll test it a little later on when I get some time to create a little mission. Call it the same way from the units init.... or even better (less likely to cause problems)... make an init.sqf in your mission folder an call it in there the exact same way. movemarker.sqf:- while {true} do { waituntil {alive player}; _pos = []; while {alive player} do { _pos = getpos player; sleep 1; }; "Respawn_West" setMarkerPos _pos; }; For the second way.... no need to add anything. It won't work! ... OnPlayerKilled.sqf is not used in a multiplayer game... which you are obviously creating. Don't know what I was thinking. Try the above code see what happens. It should work.
  2. true == true always.... so the script will always run... exactly the same as leaving it out. What on Earth is going to make true == false? It makes no sense to have it there!
  3. twirly

    ArmA 2: OA Beta build 86162

    Fully agree... immersion is everything. Good to see that this is being worked on.
  4. twirly

    Creating an object

    Just did a quick search for you. These two posts here should help. http://forums.bistudio.com/showthread.php?t=122964 http://forums.bistudio.com/showthread.php?t=112767
  5. Well you can monitor the players position and move the marker when he dies like this. Make a script in your mission folder called movemarker.sqf or whatever. This runs a loop that continually gets the players last position. Getting the last position all the time may not be needed but I'm not sure if the position of the dead player will be returned... so do it this way. movemarker.sqf:- _pos = []; while {alive player} do { _pos = getpos player; sleep 1; }; "Respawn_West" setMarkerPos _pos; Call it from your players init like this:- nul = [] execVM "movemarker.sqf"; I'm sure you will follow what's going on there. If not give us a yell. EDIT: More... another idea! Not tested but should also work. Create a script OnPlayerKilled.sqf in your mission folder. Put this in it.... OnPlayerKilled.sqf:- _plyr = _this select 0; "Respawn_West" setMarkerPos getpos _plyr;
  6. Don't know if this might help you...but it is a function I just put together that will return UNITS of a specified SIDE within a specified RADIUS. You can then measure the distance to each unit or whatever. From testing... the first object in the returned list is always the closest object. Works with all things of type "LAND".... so will return units and land vehicles of the specified side. I haven't thought about making it work with a trigger... but will post this anyway and have a further tinkle to see what I come up with. fn_getNearUnits.sqf :- /* Put in init.sqf:- getNearUnits = compile preprocessfile "fn_getNearUnits.sqf"; Call like this:- _nearunits = [object,radius,side_to_check_for] call getNearUnits; Where object is an object, a marker or a position. returns number of units of side_to_check_for within the specified radius of the object */ private ["_inp","_rad","_sid","_pos","_list","_i","_dude","_units"]; _inp = _this select 0; _rad = _this select 1; _sid = _this select 2; switch (typename _inp) do { case "OBJECT": {_pos = getpos _inp}; case "STRING": {_pos = getmarkerpos _inp}; case "ARRAY": {_pos = _inp}; }; _units = []; _list = nearestObjects [_pos,["Land"],_rad]; for "_i" from 0 to ((count _list) - 1) do { _dude = _list select _i; if (_sid == side _dude) then { if (not(_dude in _units)) then {_units set [(count _units),_dude]}; }; }; _units EDIT: Forgot to add that the thing you are scanning from can be an object, a marker or a position.
  7. Maybe Günter Severloh's excellent list might help... http://forums.bistudio.com/showthread.php?t=117674
  8. You can use this to delete them.... it's probably the best thing to do. deleteVehicle [i][b]triggername[/b][/i];
  9. This is probably what you're after at the "suspended link". I found the example missions here on my comp. I have zipped the "CTF" mission and upped it here for you. EDIT: I just upped the whole script pack for those that find this thread and are looking for it. Get it here.
  10. Thanks Koni.... that works. I see Celery's code has actually been changed (in the last 5 minutes) to if (_this select 1!="") That also works now! Maybe I'll get somewhere now. Wow...what a blowmind difficult command! @Celery... I didn't see your reply. Thanks also man.
  11. Hi.... If I fiddle a little with the code and make sure that _road is actually a road... it seems to work. Maybe _road isn't actually defined anywhere! [b]_road = (player nearRoads 1000) select 0[/b]; _roads = []; if(isnil "_nearestRoad") then { _roads = roadsConnectedTo _road; } else { _roads = _road nearRoads 999999; _sdist = 99999999; }; hint format ["%1",_roads]; if((count _roads) == 0 ) exitwith {hint "no roads near"};
  12. Sorry about the old thread...but it's as good a place as any. I'm trying to understand "Handledamage" and the code above just does not seem to work. I get a generic (so wonderfully descriptive!) error in expression if (_this select 3==""). For the life of me I cannot understand how to limit a units damage to just barely alive!
  13. Thanks Demonized.... maybe I will try the MP EH's for a different approach. Had a quick play last night and didn't get anywhere... but will see what I can do today.
  14. I have been searching for days and can't get to the bottom of this. Frustration is king at the moment. Two problems really... 1. In a MP/COOP game... when all players are killed... how do you run your own script before the game ends and the debriefing stuff is shown... is it possible to take control for as long as you want and then end the game? 2. When the game does end I get the debriefing text overlaid on the score. I want just the score and no debriefing.... or debriefing after the score. Why is one on top of the other anyway? Pic below. I've looked at so much I think I have information overload. I'm convinced that it's either very simple and I'm just not getting it.... or just can't be done. Totally baffled at this point!
  15. Thanks...yeah it doesn't work here. Tried all the onPlayerXXXX Event Script stuff... tried an Event Script called exit.sqf that does fire before the briefing.... but can't seem to do anything in that script but print to the report with diag_log. That's how I know it's firing... but I can't use it to stop the end. According to the Wiki - http://community.bistudio.com/wiki/Event_Scripts:- To me that script should be the thing that you could use in this situation.... but I'm not having much luck. It is passed the endMission END number that you can do a lot with.... but you really can't do shit with it because it does not stop the mission from ending. At least I haven't found a way.
  16. Thanks for the reply man. I have respawn = 5...so respawn to SIDE. Respawn to GROUP will change things a bit too much. My mistake... you mean respawn "base"... but that will still change things too much. There are three possible outcomes... WIN - All Enemy Dead LOSE - All players dead TIMEOUT - Game timed out. Win and Timeout are easy.... I can display my own screen on all machines many different ways... but trying to get the same simple screen displayed for a "LOSE" is blowing my mind. There does not seem to be any way to accomplish this. I had an idea to handle the last guys damage and fake his death... that way I may be able to display my screen and end the mission my self. Haven't tried yet though.... was waiting for some ideas. All I want is a 5 second "YOU LOSE" and show the nice BIS scoreboard and then end. I'll give away the scoreboard... but can't believe I can't have a simple "ALL PLAYERS DEAD. YOU LOSE!" on a black screen come up to match the other two black screens I already have for TIMEOUT and WIN. Unbelievable!
  17. Try.... {dostop _x} foreach units group;
  18. Confirmed. You're probably right.... but that limitation is under Pre build 86060 in the wiki.... nothing about it in the text for Post build 86060. It's not very clear at all.
  19. Same here... great idea and very well done.
  20. -par= works great and allows simple shortcuts on the desktop for different combinations of many mods. Simple is good.... love it! EDIT: Observations so far... -nosplash does not seem to work. If I include it in the file I still get the splash screens. If I leave it in the shortcut... it works as it should. -malloc=tbb4malloc_bi does not seem to work as the .rpt file is showing tbb3malloc_bi as being selected. If I leave it in the shorcut...no problems.
  21. I think the password will be the least of your worries... get the dialog done first. That'll be fun!
  22. My experience is that if you remove it from the "other" further down text you will screw up the mission.sqm file and it will be almost impossible to fix. I'm sure if you struggle enough you probably can fix it.... but this is easier... The best thing to do if the addons are actually used in the mission is to replace them... then delete them once you can load the mission into the editor.. For instance if you had an addon Hummer in the mission which was My_HMMWV_TOW and you wanted to get rid of it... just replace it with an original HMMWV_TOW and then you can load the mission in the editor and delete the item. class Item83 { position[]={9334.8672,40.470596,7989.1367}; azimut=90.72683; id=93; side="EMPTY"; vehicle="[b]My_HMMWV_TOW[/b]"; skill=0.60000002; }; replace the vehicle="My_HMMWV_TOW"; with vehicle="HMMWV_TOW"; If someone knows an easier way let's hear it!
  23. You should remove it from required and automatic addons.... and further down you have to replace it.... not remove it! EDIT: Just trying to read that wall of text...and there is no easy way to know what you removed!
  24. Here's a couple posts that might help you... http://forums.bistudio.com/showthread.php?t=123191 http://forums.bistudio.com/showthread.php?t=102796
×