Jump to content

Larrow

Member
  • Content Count

    3402
  • Joined

  • Last visited

  • Medals

Everything posted by Larrow

  1. Is it just a timing issue maybe? Maybe the module and fsm are not initialised before the tracker function queries it. Try putting... waitUntil{ getClientStateNumber >= 10 && { TrackerModule1 getVariable[ "bis_fnc_moduleInit_status", false ] } }; ... right at the top of your initServer.sqf Otherwise, I'm out of ideas as I don't own SOG to be able to do any testing.
  2. I don't see how, the loadout just creates a function to call and calls onTrackerSpawn to create a while true waituntil loop to monitor the module. Much the same as you do in initServer for TAG_fnc_setTrackerGroupSkill. Try this instead. Rewritten as one EH that handles all onTrackerSpawn callbacks, rather than filling up the scheduler with while true waituntil loops. Notice that I have changed the _callback parameter for vet_fnc_onTrackerSpawn. It is now a STRING name of the function to call rather than the actual function variable. I have not tested these changes, so let me know if you encounter errors.
  3. Leader is a script command. Calling the group leader "leader" will make a missionNamespace variable( global variable ) called leader. Even trying to do this will show an error in the editor.
  4. Larrow

    Cycling Waypoints

    I do not see the same behaviour. I created a vehicle and a Gamelogic, placed addwaypoints code from your post into gameLogic, then changed the code as per my post. I then saved it as a composition and deleted the original. Wherever I place the composition the truck will perform its three waypoints and when it reaches the last one will be teleported to the first and begin its waypoints again from that wp. TruckWP composition Not quite sure what you mean by "composition init"? A composition does not have an init.
  5. May just be a timing problem due to execVM scheduling the code and its not ready before function gets called. See updated code in previous post.
  6. No, you pass the tracker module and a function to the function defined in the onTrackerSpawn script(no modification needed). vet_fnc_onTrackerSpawn then monitors the passed tracker module and when it spawns new units it calls the given function passing the function [ _groupSpawned, _moduleSpawnedFrom ]. So something like...
  7. Larrow

    Cycling Waypoints

    _wp3 setWaypointStatements ["true", "vehicle this setPos [9178.48,6907.43,0]; group this setCurrentWaypoint ( waypoints group this select 1 )"];
  8. Changed the previous post, Moved the string padding format into the function. Might make it a little more readable.
  9. Larrow

    Supply drop

    Of course, just change _this for the crate you spawn. _spawnedCrate = createVehicle[ "CargoNet_01_box_F", getPosATL _laptop, [], 0, "CAN_COLLIDE" ]; [ _spawnedCrate, myCrate getvariable "loadout" ] call BIS_fnc_initAmmobox;
  10. You set the variable SpawnVehicles to false at the top of the addAction. So the variable is only ever going to be false so the only part of the IF statement that will run is the Else. The Else sets SpawnVehicles to true, but as soon as the action is triggered again SpawnVehicles is set to false immediately at the top of the addAction. Also you only publicVariable to the server, so no other admins would see the update( that's if you depend on this to be usable by multiple admins ) to the variable.
  11. Only if you are using actual tasks. Task Modules and the related BI task functions of the task framework are all based on a STRING (taskID). The framework pretty much hides TASKs away from the end user and replaces them with the use of taskIDs STRING. To turn a framework taskID STRING into its actual TASK use BIS_fnc_taskReal on the ID. player addEventHandler ["TaskSetAsCurrent", { params[ "_unit", "_task" ]; //_task is of type TASK //"0001" ( taskID ) call BIS_fnc_taskReal ( turn taskID STRING(task framework) into its actual related TASK ) if ( _task isEqualTo ( "0001" call BIS_fnc_taskReal ) ) then { hint "Task 0001 is been ASSIGNED"; }; }];
  12. Yes, Just create a local trigger for each player in initPlayerLocal.sqf. Something like...
  13. No, I just remember the solution from a forum thread long ago.
  14. Larrow

    Simple Rearm Script

    Don't use this as it does not account for magazine wells. Use BIS_fnc_compatibleMagazines instead. See eventHandler reloaded params[ "_target" ]; private _targetCenterTop = [ 0, 0, boundingBoxReal _target select 1 select 2 ]; // create and attach charge private _charge = createVehicle[ "DemoCharge_Remote_Ammo_Scripted", getPosATL _target, [], 0, "CAN_COLLIDE" ]; _charge attachTo[ _target, _targetCenterTop ];
  15. hint format[ "%1\n%2", "first line", "second line" ]; eg _hint = ""; { _hint = format[ "%1%2\n", _hint, _x ]; }forEach ( primaryWeapon player call BIS_fnc_compatibleMagazines ); hint _hint;
  16. Attach the laserTarget to the designated object(your _randomTarget heli pad invis) to stop it from disappearing.
  17. Seeing as W0lles original thread seems to have disappeared here is my current up to date wordfile for UltraEdit/UEStudio (UE & UES). Installation instructions A total rewrite using the BISim version as a base. Includes sections for.. Arma3 commands Control structures (for if forEach etc) Variable types (objNull LocationNull etc) Local variables Labels and Operators (#define _EXEC etc) Special (magic variables) BIS functions and some basic Regex for filling Variable and Function lists. Added region command to UE/UES language definition. Adding comments of... //#Region //#End Region ...will allow you to collapse sections between the comments from within UE/UES. Also included is a template list for some of the more verbose commands. For instance typing createMarkerIcon will insert.. _mrk = createMarkerLocal [ _name, _position ]; _mrk setMarkerShapeLocal "ICON"; _mrk setMarkerTypeLocal "Empty"; _mrk setMarkerDirLocal _dir; _mrk setMarkerColorLocal "ColorBlack"; _mrk setMarkerAlphaLocal _alpha; _mrk setMarkerTextLocal _text; With TAB selection allowing you to insert variable names, whether is local, Icon type and colors from available Arma options. Also included templates for EventHandler params, templates are EH<name of EH> eg EHKilled, for standard events using addEventHandler MEH<name of EH> eg MEHEntityRespawned, for addMissionEventHandler EHUI<name of EH> e.g EHUIKey, for display/ctrlAddEventHandler of which the last would cover keyUP keyDown and will add the template... params[ "_ctrl", //"_display" "_keyCode", "_shft", "_ctr", "_alt" ]; DOWNLOAD Scripts for pulling command and function wordfiles A3 Update Diffs Latest GUI Base Class Defines can be found here Updates
  18. Correct Give them an option in the description.ext? So the function in your mod is set to postInit as default. The function when run and param 0 is "postInit" (as default from CfgFunctions setup) checks for the presents of the mission/campaign configfile property "BUNC_someFunc_runOnInit". If its 1 the function executes, if 0 the function exits, if its missing then the property configFile > "BUNC" > "someFunc" > "runOnInit" is used instead, which is 0 so function exits. So it is always set to not run on postInit unless specifically flagged to do so by the mission/campaign designer.
  19. Its worth making a distinction here, calling a function does not necessarily make the code unscheduled. It all depends on the scheduled state of the calling code. If the calling code is unscheduled, then the called code will be unscheduled. If the calling code is scheduled, then the called code will be scheduled. You can always use canSuspend to see what the state of suspension is within your called code. ie //initPlayerLocal.sqf TAG_fnc_someFunc = { if !( canSuspend ) exitWith { systemChat "unscheduled, spawning code instead"; _this spawn TAG_fnc_someFunc; }; //Must be scheduled to sleep sleep 5; hint "Done!"; }; //InitPlayerLocal is scheduled waitUntil{ time > 5 }; [] call TAG_fnc_someFunc; //scheduled environment will persist to function findDisplay 46 displayAddEventHandler[ "KeyDown", { //Events are unscheduled //unscheduled environment will persist to function //notice systemchat as the function catches !canSuspend //and spawns the code for you instead [] call TAG_fnc_someFunc; }];
  20. No, I mean serialised. If you have the option checked in Eden > Settings > Preferences > Binarise New Scenario Files when saving a scenario, then making a tutorial explaining to open said file and change stuff will corrupt the mission if it is serialised. So it is worth explaining this in your tutorial. mission non serialised... Mission serialised...
  21. Remember it's worth mentioning to ensure the sqm is deserialised first, otherwise, you will destroy the mission file. You can do this by using the A3 Tools and dragging the sqm onto \Arma 3 Tools\CfgConvert\MissionDerap.bat
  22. Yes, If you actually use my code from that thread rather than @kylania's (which relies on smoke shells) you can set whatever you like as they are particle emitters.
×