Jump to content
Comrade Cheeki Breeki

Trying to create a module in the air using createUnit

Recommended Posts

Hello! I've been trying to create a fire module using createUnit so I can create some fire with a custom action of mine. My code is this:

"ModuleEffectsFire_F" createUnit [[1390.102, 6325.516, 10.8], _fireGroup];

When executed, it spawns the module, but not in the correct place. The module is supposed to spawn at the coordinates in the code, but instead it seems to spawn in this one specific place in the building I'm using and at ground height. It's very strange, since as far as I can tell the coordinates of where it actually spawns are completely different, not to mention to the fact that it spawns at ground level and not at the floor of the building it's supposed to spawn on, despite the coordinates putting it at the correct height.

 

Could anyone help me out?

Share this post


Link to post
Share on other sites

not tested but you could try to not use the alternative syntax of createUnit and set option "special" to "CAN_COLLIDE".

Share this post


Link to post
Share on other sites

I think the create commands adjust the position so you could try what sarogahtyp said or if that doesn't help try using setPosATL after creating the module. Like this:
 

_pos = [1390.102, 6325.516, 10.8];

_mod = _fireGroup createUnit ["ModuleEffectsFire_F", _pos, [], 0, "NONE"]

_mod setposATL _pos;

 

 

 

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

×