find_object_component - not working?

The place to discuss scripting and game modifications for X Rebirth.

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

V-virus
Posts: 33
Joined: Sun, 1. Dec 13, 17:01
x4

find_object_component - not working?

Post by V-virus »

I want to create a counter of modules for my mod
Or simply to understand how to access the module station

<find_object_component object="$Stations.{$i}" name="$Cmpnent" multiple="true"/>
<show_help log="true" force="true" custom="'Number of modules: %1'.[$Cmpnent.count]"/>

I can not create a counter modules.
$Cmpnent.count always returns 0

what is wrong
Last edited by V-virus on Fri, 27. Feb 15, 21:12, edited 1 time in total.
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13126
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

$Stations.{i}

Missing $ for the i variable.
V-virus
Posts: 33
Joined: Sun, 1. Dec 13, 17:01
x4

Post by V-virus »

$ - Is not the case (typo). in the script everything right but it does not work.
V-virus
Posts: 33
Joined: Sun, 1. Dec 13, 17:01
x4

Post by V-virus »

Found an error not noticed

thanks

Return to “X Rebirth - Scripts and Modding”