Jump to content
Sign in to follow this  
cupcake_actual

Sector rewards R3f Credits

Recommended Posts

ok, im making a MP TDM, and i want to award the team that captured the sector. Using r3f creation factory in this mission. the teams have to build up their base. capture sectors to gain credits to use to buy stuff to build the base. blufor's box is named blubox, opfor's box is named redbox.  basically all i have to do is run this line of code to add money to the crate.

 

 private ["_credits"]; _credits = redbox getVariable "R3F_LOG_CF_credits"; _credits = _credits + 100;  redbox setVariable ["R3F_LOG_CF_credits", _credits, true] //for opfor's "redbox"

 

or 

 

private ["_credits"]; _credits = blubox getVariable "R3F_LOG_CF_credits"; _credits = _credits + 100;  blubox setVariable ["R3F_LOG_CF_credits", _credits, true] //for blufor's "blubox"

 

How do i execute these lines for the specific team in a sector control mission. I can add one of these the expression line of a sector and it will add credits everytime the sector is captured, no matter who captured it. When opfor captures a sector execute the line for "redbox" when blufor captures a sector run it for "blubox". that all i need to do.

Share this post


Link to post
Share on other sites

This was alot easier than i thought. Basically i made a redbox.sqf and a bluebox.sqf with the above script in them, named respectively. Then i made a trigger, condition: sector1 getvariable "owner" == east; activation  nul = []execvm "redbox.sqf"; and then another for west. works like a charm

Share this post


Link to post
Share on other sites

Works on dedicated too ? Im stuck because dont know how execute this (server only, client, both....nothing seems to work properly )

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×