Jump to content

Andy455

Member
  • Content Count

    196
  • Joined

  • Last visited

  • Medals

Posts posted by Andy455


  1. The way that I would do it is to create a trigger that detects Blufor further ahead in the mission (at a point which they should have completed the overwatch objective), in the condition I would have something like:

    (player in thisList) && !(OverwatchVar)

    Where OverwatchVar is boolean variable (true / false) that is changed to true when overwatch objective is completed.

    Then on the onAct put something like:

    TaskName setTaskState "FAILED"

    Hope that made some sense :)


  2. Well thank you for your reply but that code that you posted does not seem to do anything at all :( it doesnt show any hint ever.

    timer.sqf:

    // [min] execvm "timer.sqf";
    
    
    _tn = time;
    _timer = (_this select 0) * 60; // make input minutes to seconds.
    _tte = _tn + _timer;
    _timerstate = true;
    
    while {(_timerstate)} do
    {
    sleep 0.5;
    _timeRemaining = (_tte - time);
    switch (true) do
    {
    	case ((_timeRemaining > 60) && (_timeRemaining < 3600)) :
    	{
    		hint format ["Time left: %1 Minutes", (_timeRemaining / 60)];
    	};
    	case (_timeRemaining < 60) :
    	{
    		hint format ["Time left: %1 Seconds", (_timeRemaining)];
    	};
    	default 
    	{
    		hint format ["Time left: %1 Hours", ((_timeRemaining / 60)/60)];
    	};
    };
    if ((_timeRemaining < 0) && (HostageFound < 1) then {_timerstate = false; brianhendersson setDamage 1;};
    
    };

    init.sqf:

    [1] execvm "timer.sqf";

    And noting happens at all, no hint no death :( Have I changed something by accident?

    On a side not I have put the timer.sqf in the main folder so I did execute the right path i think.


  3. First off, thanks for the reply.

    Now I still have a problem with the guy not dying when time is up and he isnt found.

    Current code:

    _timel = _this select 0;
    
    #Start
    ~1
    _timel=_timel-1;
    _timer = round (_timel / 60);
    hint format["Time left: %1 minutes", _timer];
    if (_time > 0) then {goto "Start"} else {if (!HostageFound) then {brianhendersson setDamage 1} else {exit}};
    
    exit;

    HostageFound is defined as false in the init.sqf and later changed to true when I find the hostage (The finding part works fine just so you know).

    Any ideas?

    I changed HostageFound to a number ('1') rather than a true / false and used 'HostageFound > 0' as the condition and it still didnt work. The script counts down fine it just doesnt go and do the second IF statement. :(


  4. Ok so I have a little problem with this here script:

    _time = _this select 0;
    
    #Start
    ~1
    _time=_time-1;
    _timer = round (_time / 60);
    hint format["Time left: %1 minutes", _timer];
    if (_time > 0) then {goto "Start"} else {if (HostageFound = false) then {brianhendersson setDamage 1} else {exit};
    
    exit;

    I call it using this in the init.sqf:

    [10] exec "timer.sqs";

    The low number is just for testing purposes at the moment. My main problem is that the timer does not seem to count down at all (even when I remove "_time / 60" so that it shows seconds rather than minutes) and the setdamage does not work after the defined 10 seconds.

    All names and variables are named correctly, I can't seem to figure this one out :( Any help would be appreciated

    Andy


  5. Erm kylania I'm not sure which type of marker you are talking about but I just trying grouping 2x empty markers to a unit in a new and blank mission. When I spawned I was at the place I place myself in the editor? Is this one of those annoying things that only work if you play the mission from multiplayer or SP scenarios screen?

    And to TRexian my parentheses are there they are just at the end, my friend has managed to do it this way and it works for him but I can't talk to him right now.

    So if you can specify which markers make it spawn in a different place then please tell me :)

    Edit: shk how would I go about implementing that? Could it just go in any trigger / init such as the init.sqf?


  6. Ok so currently I have tried to make my mission more random by making the location of my main objective start in a different location. I have 6 Game Logic - Locations named 'HPos1' - 'HPos 6' and a Heli pad named 'H'.

    My current script runs with:

    [] exec "hrandom.sqf";

    In the init.sqf

    This is the hrandom.sqf:

     _randomNumber = random 6;
    
    if (_randomNumber > 0 && _randomNumber < 1) then
    {
    H setPos [getPos HPos1 select 0,getPos HPos1 select 1,0];
    
    
    if (_randomNumber > 1 && _randomNumber < 2) then
    {
    H setPos [getPos HPos2 select 0,getPos HPos2 select 1,0];
    
    
    if (randomNumber > 2 && _randomNumber < 3) then
    {
    H setPos [getPos HPos3 select 0,getPos HPos3 select 1,0];
    
    
    if (randomNumber > 3 && _randomNumber < 4) then
    {
    H setPos [getPos HPos4 select 0,getPos HPos4 select 1,0];
    
    
    if (randomNumber > 4 && _randomNumber < 5) then
    {
    H setPos [getPos HPos5 select 0,getPos HPos5 select 1,0];
    
    
    if (randomNumber > 5 && _randomNumber < 6) then
    {
    H setPos [getPos HPos6 select 0,getPos HPos6 select 1,0];
    
    
    };
    };
    };
    };
    };
    };

    This currently does not work as it always places the helipad (and marker ive made to show where it is) at HPos6. Can anyone please tell me what I'm doing wrong or if there is an easier way to do this?

    Thanks in advance

    Andy


  7. Hi there, I am making a mission where you are a small team in a larger army going to destroy key assets Elektrozavodsk. I would like the team to destroy the fuel tanks at 095133 but I cannot seem to find the name used for the object. Detecting whether or not a building is not a problem usually as I use this to detect it with a Game Logic 'houseDetector':

    !alive nearestObject [houseDetector, "House"];

    But obviosly that doesnt work, my problem is that I have tried many variants of 'Fuel Station' such as Fuel_Station, fuelstation etc.

    I have also tried to use the ID instead of "House" and that still doesnt work, nor does the "Land_A_FuelStation_Build" or "Land_A_FuelStation_Shed" from the classname list.

    Can anybody point me in the right direction? and if I am doing horribly wrong then point out what I did :P

    Well thanks in advance


  8. Sorry for the late reply, ive been trying to get it to work so that as my helicopter gets to a waypoint it will pop smoke on my target helipad. I can pretty much work it out with one example of how to impelement it.

    At first I tried to make a script in my mission folder called smoke.sqs with the above code, after that I put this line into the Init of my helipad

    [this] exec "smoke.sqs"

    and it didnt work, I also tried

    [This,0] exec "smoke.sqs"

    and that didnt work either, so if you can understand what im trying to say can you help? :)

    p.s. Also i tried the script from Mr Murrays Arma Editing guide but thats not working as I assume the code is not used in ArmA2??

    ---------- Post added at 11:03 PM ---------- Previous post was at 09:17 PM ----------

    bump :O

×