Ship group spawn

Take command of air and naval assets from post-WW2 to the near future in tactical and operational scale, complete with historical and hypothetical scenarios and an integrated scenario editor.

Moderator: MOD_Command

Post Reply
User avatar
Alejo1968
Posts: 101
Joined: Sun Oct 22, 2006 3:42 pm

Ship group spawn

Post by Alejo1968 »

Hi,
I created an event to make 3 ships teleport to a certain area. The problem is they spawn not as a group (respecting their initial formation) but spread along the area. How can I make them spawn as a group/formation?
Thx
User avatar
Gizzmoe
Posts: 396
Joined: Wed Aug 24, 2005 5:36 am
Location: Germany

RE: Ship group spawn

Post by Gizzmoe »

I played around with Teleport for the first time thanks to your post, very nice feature. Works great for teleporting a group, it keeps its formation, speed and heading, but as you said, three single teleported ships don't keep the initial formation. I, as a lua noob, would use three single AddUnit commands instead of Teleport. But maybe there's a better solution...
ComDev
Posts: 3116
Joined: Fri May 12, 2006 1:20 pm
Contact:

RE: Ship group spawn

Post by ComDev »

Savegame? [;)]

Instructions?

Code?

etc...
Image

Developer "Command: Modern Air/Naval Operations" project!
User avatar
Gizzmoe
Posts: 396
Joined: Wed Aug 24, 2005 5:36 am
Location: Germany

RE: Ship group spawn

Post by Gizzmoe »

ORIGINAL: emsoy

Savegame? [;)]

Instructions?

I am not allowed to post links yet.

To clarify, lets say you place four single ungrouped ships in a box formation and then teleport all four of them with a single teleport command, each ship will be randomly placed inside the teleport area, they will be no longer in their initial box formation. If you put those four ships into a single group they keep the formation. It bet this all is by design and intended and I'm ok with that, but it would be nice if that random placement of objects within the teleport area would be optional.
User avatar
Gizzmoe
Posts: 396
Joined: Wed Aug 24, 2005 5:36 am
Location: Germany

RE: Ship group spawn

Post by Gizzmoe »

Ok, I found a way to post links, here's the scenario:
bit.ly/1ZGake0
User avatar
Alejo1968
Posts: 101
Joined: Sun Oct 22, 2006 3:42 pm

RE: Ship group spawn

Post by Alejo1968 »

I saw yor file, your 4 ships also do not spawn in formation but spread along the area. Same thing that happens to me.
Is there any document which explains lua so as to use the addship script?
User avatar
Gizzmoe
Posts: 396
Joined: Wed Aug 24, 2005 5:36 am
Location: Germany

RE: Ship group spawn

Post by Gizzmoe »

ORIGINAL: Abbeville_01
Is there any document which explains lua so as to use the addship script?

This document says it's better to use AddUnit, you find this command and the others here:
bit.ly/1MMIaqh
mikmykWS
Posts: 7185
Joined: Tue Mar 22, 2005 4:34 pm

RE: Ship group spawn

Post by mikmykWS »

Add import might be best
User avatar
Gizzmoe
Posts: 396
Joined: Wed Aug 24, 2005 5:36 am
Location: Germany

RE: Ship group spawn

Post by Gizzmoe »

Mike, I don't get what you mean by that, please explain :)
kritter
Posts: 411
Joined: Mon Dec 03, 2007 8:23 pm

RE: Ship group spawn

Post by kritter »

I have used this feature in the past. It works as long as you select the group in the teleport window and not the individual units.
User avatar
Gizzmoe
Posts: 396
Joined: Wed Aug 24, 2005 5:36 am
Location: Germany

RE: Ship group spawn

Post by Gizzmoe »

^ That is right, but in the described case the ships aren't supposed to be part of a group.
User avatar
Alejo1968
Posts: 101
Joined: Sun Oct 22, 2006 3:42 pm

RE: Ship group spawn

Post by Alejo1968 »

ORIGINAL: kritter

I have used this feature in the past. It works as long as you select the group in the teleport window and not the individual units.

I did that, but they still spread out. Will try using the lua script that mike recommends. Which is absolutely new ground for me.

User avatar
Gizzmoe
Posts: 396
Joined: Wed Aug 24, 2005 5:36 am
Location: Germany

RE: Ship group spawn

Post by Gizzmoe »

I did that, but they still spread out.

They don't spread out when you group them and teleport the group entry and not the single ships of the group. Also try it with the latest Command version.
Will try using the lua script that mike recommends. Which is absolutely new ground for
me.

Here is an an example, unfortunately the f-ing forum software doesn't let me post it as text.

That adds a Burke-class DDG (You find the ID in the DB) to the Blue side, names it Test and puts it in the New York bay area.



Image
Attachments
Clipboard02.jpg
Clipboard02.jpg (30.15 KiB) Viewed 328 times
Rudd
Posts: 468
Joined: Wed Jul 10, 2013 10:34 am

RE: Ship group spawn

Post by Rudd »

You two are all over the place.
^ That is right, but in the described case the ships aren't supposed to be part of a group.

The 'Ship group spawn' thread isn't talking about groups? What?
Add import might be best
I believe Mike is talking about.
ScenEdit_ImportInst (side, filename)


User avatar
Gizzmoe
Posts: 396
Joined: Wed Aug 24, 2005 5:36 am
Location: Germany

RE: Ship group spawn

Post by Gizzmoe »

The 'Ship group spawn' thread isn't talking about groups? What?

It is about a group of ungrouped ships and a group of grouped ships and the two different results you get when teleporting them ;)
I believe Mike is talking about.
ScenEdit_ImportInst (side, filename)[/link]

Oh, ok!
User avatar
Alejo1968
Posts: 101
Joined: Sun Oct 22, 2006 3:42 pm

RE: Ship group spawn

Post by Alejo1968 »

Thank you Gizzmoe
Post Reply

Return to “Command: Modern Operations series”