set script priority to <Var/Number>

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

Post Reply
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

set script priority to <Var/Number>

Post by mark_a_condren » Tue, 7. Sep 10, 19:57

set script priority to <Var/Number>


<Var/Number> = Integer or variable input to command.

Changes the priority that the current script is running at to <Var/Number>.
When a script is given a priority with this command, it can not be interrupted by a lower priority script (more specifically, the lower priority script is put lower in the stack and executed later)


Example:

set script priority to 50

Possible use for a Retreat script as 50 is Flee response to SIGNAL_ATTACKED


Command Location:
Last edited by mark_a_condren on Fri, 31. Dec 10, 12:58, edited 2 times in total.

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 286407

Post by X2-Illuminatus » Sat, 18. Sep 10, 12:02

set script priority to <Var/Number>


<Var/Number> = Ganzzahl oder Variablen Eingabe für den Befehl.

Ändert die Priorität, mit der das entsprechende Script läuft, auf <Var/Number>.
Wenn einem Script eine Priorität zugewiesen wurde, kann es nicht von einem Script mit einer geringeren Priorität unterbrochen werden. Genauer ausgedrückt wird das Script geringerer Priorität auch im Stack weiter unten einsortiert und später ausgeführt.

Beispiel:

set script priority to 50

Eine mögliche Verwendung für ein Rückzugsscript mit einer Priorität von 50 ist die Fluchtantwort auf SIGNAL_ATTACKED.


Zu finden unter:
Last edited by X2-Illuminatus on Wed, 24. Nov 10, 20:46, edited 2 times in total.

mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren » Wed, 22. Sep 10, 16:09

s9ilent wrote:set script priority to <Var/Number>
It may also be good to mention, (or link to a general information page which mentions) what this actually achieves. i.e. Can not be interrupted by a lower priority script (more specifically, the lower priority script is put lower in the stack and executed later)

Again, if you would like to write up the required information i will happily add it.

Mark

Post Reply

Return to “MSCI Reference”