Coder Social home page Coder Social logo

arma3_wargame's People

Contributors

dudestin avatar

Watchers

 avatar  avatar

arma3_wargame's Issues

functionが認識されない不具合

config.cppにclass CfgFunctionsを追記したところ認識された

#include "script_component.hpp"

class CfgPatches {
    class awg_main {
        name = "awg_main";
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {};
    };
};

class CfgFunctions
{
	class awg_main
	{
		class myCategory
		{
			file = "j\awg\addons\main\functions";
			class test{};
		};
	};
};

カメラワーク マウスクリック地点より最近傍のユニットを選択

同様の処理を行うスクリプトを発見したので一部抜粋

	_wpos = screenToWorld BR_TACV_mouseClickPos;

	//near units
	_nuList = [];
	{if (alive _x && _x distance _wpos < (5 max (_wpos distance BR_TACV_cam) / 5)) then {_nuList set [count _nuList, _x]}; } foreach (units BR_grp);

	//near waypoints
	_nwpGet = [_wpos, false] call BR_TACV_GetCloseWps;
	_nwpList = _nwpGet select 1;
	_nwpFullList = _nwpGet select 0;

	//selet closest
	_selList = _nuList + _nwpList;
	if (count _selList > 0) then
	{
		_closestSel = [_selList, _wpos] call BRfn_getClosest;
		_closestIdx = _closestSel select 1;

		//wp
		if (_closestIdx >= count _nuList) then
		{
			//if (!BR_TACV_ctrlDown) then //control key can't select wp
			//{
				call BR_TACV_ResetSelected;

				BR_TACV_selectedWp = _nwpFullList select (_closestIdx - (count _nuList));
				BR_TACV_selectedWp set [4,1];
				true call BR_TACV_ShowWpMenu;

				if (!BR_TACV_isWpSyncing) then {(BR_TACV_selectedWp select 0) call BR_TACV_MakeUnitSelection};
			//};
		}
		//unit
		else
		{
			if (!BR_TACV_isTeamLayer) then {call BR_TACV_ResetSelected};
			(_closestSel select 0) call BR_TACV_MakeUnitSelection;
		};
	};

	if (count _selList == 0) then {call BR_TACV_ResetSelected;};

	[] spawn BR_TACV_RefreshWpMenu;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.