Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
androkiller

(Question) createVehicle/Trigger problems updating a postion in a respawn function

Recommended Posts

Hello i have a trigger which  creates and deletes a flag on a capture point and looks like so 

Repeatable

Condition
(scA getVariable "owner") ==east;

On Activation
deleteVehicle bluresa; opfresa = "Flag_CSAT_F" createVehicle getMarkerPos "resA"; 

So the trigger works in creating and deleting the flag upon owner change.

However when i want to use it in BangaBob's BRS respawn script it does not work, leading me to think the respawn script was not getting updated with the new spawn points therefor i changed the way it get executed by simply placing it in the onPlayerRespawn.sqf  

null= [[NATO_BASE,bluresa],WEST,TRUE,5] execVM "BRS\BRS_launch.sqf";//SPECIFIC PARAMETERS FOR WEST
null= [[CSAT_BASE,opfresa],east,true,5] execVM "BRS\BRS_launch.sqf";//SPECIFIC PARAMETERS FOR EAST

even with this change it still doesn't work. However if i create a flagpole in the editor and name it "bluresa" it will work and the trigger will also remove it but for some reason when the trigger creates the flagpole it does not work.

Plox someone help me :(

 

 

 

Share this post


Link to post
Share on other sites

Obviously you need to public the variable
 

if (isServer) then {

deleteVehicle bluresa;
opfresa = "Flag_CSAT_F" createVehicle (getMarkerPos "resA");
opfresa setVehicleVarname "opfresa";
publicVariable "opfresa";

};

 

Share this post


Link to post
Share on other sites

doesnt solve the issue, will have to ask Bob himself due the reasoning in the problem must be in the script it self when it removes respawn positions form the array.

Share this post


Link to post
Share on other sites

Not sure what BangaBobs BRS is but generally for sectors you do not need to manage the flag.

Syncing any flag that inherits from "FlagCarrierCore" to a sector, the sector will look after it automatically swapping out its graphic for the current owners side.

 

As I cant quite make out from your post what the end goal is but you seem to being creating each new flag at a marker position.

If you do need to change positions just add a SEH on the server...

[ scA, "ownerChanged", {
    params[ "_sector", "_owner", "_oldOwner" ];
            //[east, west] - marker positions?
    _pos = [ "resA", "resB" ] select ( _owner call BIS_fnc_sideID );
    nameOfFlag setPos getMarkerPos _pos;
}] call BIS_fnc_addScriptedEventHandler

Where nameOfFlag is the name given to the flag placed and synced to the sector in the editor.

Share this post


Link to post
Share on other sites

the end goal was to allow players to spawn on the captured objectives. Thus i needed to create objects for each capture point aswell as for each side and add them to the execution array, however it doesnt seem to accept the objects made by the triggers and only shows positions which have existed from the start of the mission. As a result i bailed on this option and decided to use a different means of deployment due to i cant make sense of the script itself at all. (as you may have seen the map click method) works fine but i just cant spawn on group members yet which i am still looking into

 

Share this post


Link to post
Share on other sites

×