Jump to content

jshock

Member
  • Content Count

    3059
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by jshock


  1. Since your're keen on your trigger:

    _trg setTriggerStatements 
    	[
    		"!alive ammocrate1",//condition
    		"task_1 setTaskState 'SUCCEEDED';  player setCurrentTask task_2;  task_1 = true;  publicVariable 'task_1';  hint 'Operation Success!';",//on activation
    		""//on deactivation
    	];
    

    You got your stuff mixed up as to where it belongs: https://community.bistudio.com/wiki/setTriggerStatements

     

    And you still had some double quotes where there should be single quotes.

     

    All this would be caught by the -showScriptErrors startup parameter, recommend you turn that on: https://community.bistudio.com/wiki/ArmA:_Startup_Parameters

     

    My waitUntil expression in the other thread should work, not too sure why it didn't, unless just the task wasn't marked as completed, therefore something is wrong with your task system, which is another issue entirely.


  2. Yeah not sure about that, I think I need a different method of spawning it but can't figure it out.

    Spayd is correct.

     

    But you could easily do this without a trigger:

    //  Create weapon cache at random marker
    ammocrate1 = createVehicle ["B_supplyCrate_F",getMarkerPos "cache_1",["cache_2","cache_3"], 5, "NONE"];
    
    _handle = [] spawn
    {
    	waitUntil {!alive ammocrate1; sleep 0.5};
    	task_1 setTaskState "SUCCEEDED";  
    	player setCurrentTask task_2;  
    	task_1 = true;  
    	publicVariable "task_1";  
    	hint "Operation Success!";
    };
    
    

    You were missing ']' at the end of your createVehicle line, that's probably why it didn't work, fixed in my example above.


  3. Yea, I wasn't saying that your're not right, just the reason why some people use count over forEach, and in this instance, the return from count isn't necessary and _forEachIndex is also not necessary so truly it doesn't matter either way, and yea the data sample is small enough to not exactly matter.


  4. You may still need a large backpack (so you will have the space to auto add them to your inventory), you'll need to fill in the class of the rocket magazine:

    this addEventHandler
    [
    	"Fired",
    	{
    		if ((_this select 5) == /*classname of rocket*/) then
    		{
    			player addMagazine /*classname of rocket*/;
    		};
    		if ((_this select 5) == "SatchelCharge_Remote_Mag") then
    		{
    			player addMagazine "SatchelCharge_Remote_Mag";
    		};
    	}
    ];
    
    

    If the satchels don't work with the fired EH, you can try them in a put EH.


  5.  

     

    Now is there any way to move that 3D sound around the player? Say 360 degree circles?

    KK, answers this in the last note of the command's wiki page: https://community.bistudio.com/wiki/playSound3D

     

    Where the sound is first emitted, it stays, so unless you get creative with the sound and a looping script that keeps up with the central position, then spawns in a new sound at whatever interval over 360 degrees, it won't be as simple as moving the original sound spawned around in a circle around the central position.

×