plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

SFSimsDev avatar image
SFSimsDev asked SFSimsDev edited

How do we use HasMovingPlatform on a SimObject?

Now that we have a new HasMovingPlatform property for SimObjects, how can we make use of them please?

Thanks,

SFSimsDev

modeling
1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Hi @FlyingRacoon - Are the team able to share any details on how we can use this? Is the suggestion by @Mr_LiamT the only way to achieve solid SimObjects?
0 Likes 0 ·
Mr_LiamT avatar image
Mr_LiamT answered Rotorhead135 edited

Maybe have a look at the carrier from the top gun update. It has collisions

5 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Yeah I've looked there ;-) but there's more to it than that it seems. Even adding the Top Gun carrier itself into a scenery doesn't make it landable.

0 Likes 0 ·
Yes, i'm trying stuff out right now to get it to work. Any idea how the cables work? Are they integrated in the model?
0 Likes 0 ·

(A:CABLE CAUGHT BY TAILHOOK, number)

2 Likes 2 ·
Show more comments
Rotorhead135 avatar image
Rotorhead135 answered Kaiii3 commented

Outside the Mission the carrier didnt have a harddeck platform. Carrier was placed with simconnect for first try.

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

it is even missing the "island/tower"....
2 Likes 2 ·
Mr_LiamT avatar image
Mr_LiamT answered SFSimsDev edited

You have to place the simobject with a mission script file. You can load them in a mission (such as the carrier landing challenge) or as a worldscript. You need to add a SimContain.Container to the script with the IsCollidableWithUser property:

<SimContain.Container InstanceId="{}">
	<ContainerTitle>SimObjectName</ContainerTitle>
	<IsCollidableWithUser>True</IsCollidableWithUser>
</SimContain.Container>
8 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Where did you find those tags? I can't find any documentation about mission scripting!


I'm interested in "flocks" at the moment, I can do waypoint movement of a single bird (yep, any Simobject indeed) but no flocks (the code I'm using is from a decompile found on fsdeveloper)
0 Likes 0 ·

You can decompile .spb files with SPB2xml. You can also find properties in the propdefs, in this case propmission and propcontain.


You can do flocks like this:

<SimMission.Flock InstanceId="{}">
	<RadiusOneAnimal>150.000</RadiusOneAnimal>
	<AnimalCount>4</AnimalCount>
	<WaypointHeading>30.000</WaypointHeading>
	<WaypointRadius>150.000</WaypointRadius>
	<AltitudeHeight>0.000</AltitudeHeight>
	<SpawnRadius>1000.000</SpawnRadius>
	<Containers>
		<ContainerItem>
			<ContainerTitle>Frigate</ContainerTitle>
		</ContainerItem>
	</Containers>
	<Leader>
		<ObjectReference InstanceId="{E9F919B0-8454-4FBB-9600-771D249E5DE1}"/>
	</Leader>
	<InitWorldPosition>
		<AltitudeIsAGL>True</AltitudeIsAGL>
		<IsOnGround>True</IsOnGround>
		<WorldPosition>N32° 48' 18.34",W117° 18' 15.34",+000000.00</WorldPosition>
		<Orientation>0.000,0.000,213.600</Orientation>
	</InitWorldPosition>
</SimMission.Flock>

<SimContain.Container InstanceId="{E9F919B0-8454-4FBB-9600-771D249E5DE1}">
	<ContainerTitle>SimObjectName</ContainerTitle>
	<AIType>Boat</AIType>
	<SimplifiedSimMode>AI</SimplifiedSimMode>
	<ParameterAI>
		<GroundCruiseSpeed>20.000</GroundCruiseSpeed>
		<GroundTurnSpeed>10.000</GroundTurnSpeed>
		<GroundTurnTime>100.000</GroundTurnTime>
		<YieldToUser>False</YieldToUser>
		<KeepLastHeading>False</KeepLastHeading>
		<CanReverse>false</CanReverse>
		<WaypointList>
			<WrapWaypoints>True</WrapWaypoints>
			<CurrentWaypoint>0</CurrentWaypoint>
			<BackupToFirst>False</BackupToFirst>
			<AlwaysBackUp>False</AlwaysBackUp>
			<YieldToUser>False</YieldToUser>
			<Waypoint InstanceId="{B74EA8D5-7C33-4E0E-BB3D-C505B40D30A2}">
				<Descr>Waypoint 1</Descr>
				<WaypointID>0</WaypointID>
				<SpeedKnots>20.000</SpeedKnots>
				<AltitudeIsAGL>True</AltitudeIsAGL>
				<IsTeleportEnable>False</IsTeleportEnable>
				<AttachedWorldPosition>
					<AltitudeIsAGL>True</AltitudeIsAGL>
					<IsOnGround>True</IsOnGround>
					<WorldPosition>N32° 38' 18.34",W117° 18' 15.34",+000000.00</WorldPosition>
					<Orientation>0.000,0.000,213.600</Orientation>
				</AttachedWorldPosition>
			</Waypoint>
			<Waypoint InstanceId="{F32F9B76-67CE-45E3-B02A-8B5EAA40E898}">
				<Descr>Waypoint 2</Descr>
				<WaypointID>1</WaypointID>
				<SpeedKnots>20.000</SpeedKnots>
				<AltitudeIsAGL>True</AltitudeIsAGL>
				<IsTeleportEnable>False</IsTeleportEnable>
				<AttachedWorldPosition>
					<AltitudeIsAGL>True</AltitudeIsAGL>
					<IsOnGround>True</IsOnGround>
					<WorldPosition>N32° 38' 18.34",W117° 28' 15.34",+000000.00</WorldPosition>
					<Orientation>0.000,0.000,213.600</Orientation>
				</AttachedWorldPosition>
			</Waypoint>
		</WaypointList>
	</ParameterAI>
</SimContain.Container>
2 Likes 2 ·
Thanks man , that was fast and Splendid!, I have tried spb2xml but I can't find the needed props file anywhere, maybe because I'm on Microsoft store installation rather than the Steam one
0 Likes 0 ·
Show more comments
<SimContain.Container InstanceId="{}">
<ContainerTitle>SimObjectName</ContainerTitle>
<IsCollidableWithUser>True</IsCollidableWithUser>
</SimContain.Container>


Good work spotting this @Mr_LiamT ! Have you been able to get it working?


I'd be interested to hear clarification from Asobo / @FlyingRaccoon if this is the only way we can 'solidify' a SimObject.

0 Likes 0 ·
Yes i've got it working, but I did discover a limitation; the worldscript has a radius of 30 nm, which means that if the camera goes more than 30 nm away from the start location, the carrier and whole script is reset to the start, even if the user's plane is on the carrier...


I'll upload it to flightsim.to in the coming days.


2 Likes 2 ·
Sorry for little off topic, but by any chance do you know how assign ICAO to moving carrier, so it can be selected as landing runway?

In landing challenge, OLS panel appear that takes relative runway position from ATC RUNWAY variables, but to have them in normal flight runway should be selected by ATC menu. We have moving carrier with arresting gear, catapult and crew working, but not ILS or onscreen OLS available which is frustrating. As it works in landing challenge, we are missing something.

0 Likes 0 ·
No, I can't find out how they've done it in the landing challenge. You'll have to rewrite the panel's javascript. I tried to do it, but I'm not a javascript programmer and it was quite complicated.
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.