How to make 'set command' to work

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

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

wga
Posts: 34
Joined: Thu, 19. Feb 09, 15:04

How to make 'set command' to work

Post by wga »

It seems 'set command' additional parameters target, target1, part1, part2 will not work if we only use page id 2008, 2010, 2011 when creating custom command. As the document from exscriptor, the page id 2003 maybe the place to add parameters for target, target1 ... etc ?

Workaround method :
Check exists COMMAND for using as template to display custom command. Just play all ship command and findout which is like custom command's display.

For example, COMMAND_FOLLOW have one parameter (Var/Ship) and will display it at 'target' place, the following display will be "Following .. targetShip"

If the custom command also use a Var/Ship parameter, then we can use {COMMAND_FOLLOW} as "template" and replace the 'command part' but not the 'target part' by using additional "set script command"

COMMAND_CUSTOM = "Aim at .."
$targetShip = "Tiger 1"

Code: Select all

    [THIS] -> set command: COMMAND_FOLLOW  target=$targetShip target2=null par1=null par2=null
    set script command: COMMAND_CUSTOM
    = wait 10000 ms
Above code doing two thing, first display "Following.. Tiger 1" and then quickly replace with "Aim at .. Tiger 1", and then the following 10 seconds, you will see only "Aim at .. Tiger 1".

However, if no template exists for custom command, then we need to figure out what and how to implement the parameter for custom command.
Anyone ?
dblade
Posts: 151
Joined: Fri, 20. Jan 12, 05:13
x3tc

Post by dblade »

Hey guy I am new to scripting, but wanted to understand what you are asking.

Are you stating that custom commands do not make use of the target parameter? Could set script command target do the trick?

If am totally wrong here at least your thread gets bump! :)


EDIT: set command target or set script command target
dblade
Posts: 151
Joined: Fri, 20. Jan 12, 05:13
x3tc

Post by dblade »

I believe this thread is the same question: http://forum.egosoft.de/viewtopic.php?p=2157465

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