Jump to content
Sign in to follow this  
Chaos

createvehicle "logic" doesn´t works?

Recommended Posts

Hello, i found following problem:

_alg = "logic" createvehicle [0,0,0];
~1
hint format ["%1",_alg]; 

The hint answer is "<OBJ-NULL>".

Probably it is a bug. Can anyone confirm it as bug?

Share this post


Link to post
Share on other sites

This was changed in ArmA 2.

Logics only can be created by the command "createVehicleLocal"

_alg = "logic" createVehicleLocal [0,0,0];
~1
hint format ["%1",_alg];

Share this post


Link to post
Share on other sites

WTF? Thanks for the info.

Share this post


Link to post
Share on other sites
This was changed in ArmA 2.

Logics only can be created by the command "createVehicleLocal"

Thats not 100% correct,

you can also create a logic via createunit !

In this case you are also able to interact with them from other machines like before ArmA2 ;)

Share this post


Link to post
Share on other sites
you can also create a logic via createunit !

Actualy, you should. Using createVehicleLocal for spawning logic units is not 'legal' way how to do it and could cause some unexpected errors.

Share this post


Link to post
Share on other sites
Actualy, you should. Using createVehicleLocal for spawning logic units is not 'legal' way how to do it and could cause some unexpected errors.

that's fine and good, but createUnit forces me to MUST USE an already existing group which also causes 'unexpected' results, such as suddenly appearing as a 'vehicle' in the players icon tray.

"logic" createUnit [[0,0,0], group player] // eg

there's an unhelpful note in the comref:

" If you do not wish it to be in a group, you can create a gamelogic and group it to that. Note: The unit will deny to move away from the gamelogic."

umm errr, 'creating a gamelogic' is exactly what i want to do, a catch 22

if the author meant an already existing gamelogic on the map, then not being able to move it is also unhelpfull.

Share this post


Link to post
Share on other sites

This is what I use:

if ((isNil ("SPY_GAMELOGIC"))) then {

_center = createCenter sideLogic;
_group = createGroup _center;
SPY_GAMELOGIC = _group createUnit ["LOGIC", [0, 0, 0], [], 0, "NONE"];
publicVariable "SPY_GAMELOGIC";

};

Executed on the server once.

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  

×