Script get ship class

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Norm49
Posts: 18
Joined: Wed, 23. Jul 14, 22:27
x4

Script get ship class

Post by Norm49 » Mon, 12. Sep 16, 02:35

I am trying to create a ship command available only for a specific ship class, M5 in this cases. I try the command:
if $shiptype = M5
but it doesn't seam to work. How can i do that?

I am a that stage were I pass hours trying to figure out how to made a scrip in Arma for after came in x3 telling me it will be easy and realize than it is not the same language and i have to learn all a code language again. :evil:

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Mon, 12. Sep 16, 10:32

classes are in a hierarchy, so get ship class will only return the top level.

instead you need to use the, $ship -> is of class M5, command instead. Which you can use to check any class within the heirachy

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”