Hmmm ... i don't know. If I have my assumptions correct, can't you get the ship or station under the cursor, find all their surface elements, then assume that the nearest one (i.e. $surfaceElement.distanceto.{player.entity}) to the player would be under the cursor.schmollo wrote: ↑Sat, 15. May 21, 00:402. is there another way than find_object_component to find subcomponents? I tried it with find_object and added e.g. class.turret to the search, but that doesn't work. This is about adding subcomponents directly under the cursor, i.e. extending the "line-of-sight" search with subcomponents, which does not work yet...
nah, turrets on M ships should be findable. if <find_object_component /> is empty try: $ship.turrets3. do only wards, L and XL ships really have sub-components? You can also build turrets on an M... But I can't find them with the Egosoft search either...
it likely doesn't. the compiler didn't complain. but I do find that mod not targeting the next surface element. and on investigation, I found that its because the next surface element wasn't yet operational. so, I tried adding the "operational" parameter - which didn't work, because I'm still finding that mod not going to the next surface element.4. in your mod, Kuertee, there is the line: "<find_object_component groupname="$surfaceElements" object="$lastDefensibleTarget" operational="true" surfaceelement="true" multiple="true">". However, an auto-check with common.xsd and scriptproperties says this is wrong, operational="true" is supposedly not supported there. You might also be able to check it with a do-loop, but I don't know which is better. The way you do it is more elegant, but does it work properly?
sorry, I don't know. I've not attempted to add a new object type apart from new factions.5th (slightly different topic): If I add a commodity, e.g. to make advanced target functions (missile unlocking e.g.) dependent on expensive software, then this is no longer save-compatible, or is such a commodity simply ignored when the MOD is deleted again? Is there any way to do this anyway and remain safegame compatible?
unfortunately, no tutorial apart from X4's Wiki on the Mission Director.6. is there somewhere a good tutorial (written, video translate is very exhausting for me), where the cues etc. is well explained? How do I nest them? Where does the programme jump to when I call cancel_cue? What does "this" or "parent" mean? How do I share variables elegantly in a common namespace, at the moment I do everything via global.xxx, which is perhaps not so clean... Way too many questions to answer directly, therefore tutorial, I need a crash course
All cues are actioned once only (except if it instantiates) - until they are reset. And all sub-cues are inactive (doesn't receive signals) until their parent cue is active or completed (i.e. actions in the parent cue have executed, but all its sub-cues are waiting for their signals). When a cue is reset it returns to its waiting state. All its subcues become disabled (and all variables and properties declared in the cue and its subcues are garbage collected).