Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Ouchtime

createvehicle problem

Recommended Posts

I'm trying to create a M252 mortar with a script.

_art = createvehicle ["M252",_artpos,[],0,"NONE"];

This spawns the mortar but I don't get the target artillery action when I'm gunner in it. If I place another empty mortar beside it using the editor I get the action.

I've place the artillery logic and synced it to myself. It's only script spawned artillery that get no targeting. Map place artillery work as intended

Share this post


Link to post
Share on other sites

I thought you had to attach the module to the arty piece, not the player. I dunno though haven't used the arty module much.

Share this post


Link to post
Share on other sites

The main problem is really that I can target artillery using mortars I place with the editor but not when using mortars placed with script.

Oh, and the reason you sync the artillery with the module is to sync the crew with the module. The actual piece don't need syncing if I understand it right

Share this post


Link to post
Share on other sites

you checked this page?

http://community.bistudio.com/wiki/Artillery_Module

Why can't I get the targeting system to work?

Ensure that you have one of the listed Artillery Module magazines loaded into the vehicle you are using.

Have you done that?

can't help you right now but almost home in Sweden Ouchtime, heard you talking about this on teamspeak today...

it just sounds like the artillery module probably scan all vehicles on its init and add them to perhaps an array, in that case (hopefully it isn't a local array) you will need to add it or add the magazine (see first option) but dont know.. havent got my hands on arma2 yet.

Share this post


Link to post
Share on other sites
The actual piece don't need syncing if I understand it right

If you want "Target Artillery" in the action menu as the player, you do need to sync the empty mortar to an Arty logic.

Ensure that you have one of the listed Artillery Module magazines loaded into the vehicle you are using.

The correct ARTY_ magazine type doesn't need to be loaded for "Target Artillery" to appear in the action menu. Not having the proper ammo type will just stop it from working, but you'll still get the targeting map... your shots just won't go anywhere. And if you try with an MLRS, the regular 12Rnd_MLRS magazine will detonate the moment you launch it.

Share this post


Link to post
Share on other sites

Jdog, any idea how to sync when you create a vehicle? I could need this aswell.

Share this post


Link to post
Share on other sites

Here you go, from the ComRef:

unit synchronizeObjectsAdd [objects]

Haven't used that yet but guessing it would play out in this case as:

artyLogicName synchronizeObjectsAdd [mortarName1, mortarName2] 

Share this post


Link to post
Share on other sites

Jdog, that didn't work. I suspect that the artillery module isn't a "unit".

Share this post


Link to post
Share on other sites

Did you try it the other way around? Maybe the artillery piece is the "unit" and the module is the "object"?

Share this post


Link to post
Share on other sites

I've found some more info. When I played last night with my squad we found that if you log on AFTER the artillery piece have been created you can target it. If it's created after you log on you can't target it.

This seems like something to do with how the arty module sync with players and arty pieces. Not errors in scripts.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×