Jump to content
Sign in to follow this  
dragon zen

How to create a FunctionsManager......

Recommended Posts

Alright, a simple question.

I just don't know how to create a "FunctionsManager". I try this, but hintformat said fm1 is ObjNull.

fm1 = "FunctionsManager" createVehicle (position player);

What's the right code??

Thanks for your help.

:o

Share this post


Link to post
Share on other sites

It's considered a game logic, so you need to use createUnit instead. I tested this successfully:

_grp = createGroup west;
fm1 = _grp createUnit ["FunctionsManager", position player, [],0,"NONE"];

There's a shorter syntax, but it won't return a reference like this longer version :)

Share this post


Link to post
Share on other sites

Sorry guy, maybe I'm failed again. I try this in init.sqf:

_fm = Creategroup resistance;

_fm1 = _fm createUnit ["FunctionsManager", position player, [],0,"NONE"];

It doesn't report any bug but no FunctionsManager spown, for "call Function"... can't be used.

I really don't know what's wrong.

Share this post


Link to post
Share on other sites

I made an error. When creating group, use sideLogic. So replace first line:

_fm = createGroup sideLogic;

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  

×