Command_turret?

The place to discuss scripting and game modifications for X³: Reunion.

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

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20600
Joined: Mon, 15. Nov 04, 00:26
x4

Post by Cycrow » Fri, 5. Jan 07, 17:31

Red Spot wrote:(in a loop with dec. its first dec. than the stuff, when using inc. first the stuff than the inc. ... now you guys are combining 2 methods ...)
thats not actually true, dec doesn't always have to be first, it really depends what the loop is doing, the same with inc, it can be first, it can even be in the middle if you like, it just depends what the rest of the loop is doing

User avatar
Red Spot
Posts: 3224
Joined: Fri, 4. Feb 05, 14:44
x3

Post by Red Spot » Fri, 5. Jan 07, 18:07

I take it than that you still dont see the flaw in your logic ...


Whats that turret-script you start on task 7 going to do, except bug up the place ... ? with your coding/logic you will start an extra task on any ship with a turret wich never gets switched of as you basicly have no control over it (a regular player wont) and as this isnt an actual turret it may even cause it to run OOS adding even more presure to your game ..



G

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20600
Joined: Mon, 15. Nov 04, 00:26
x4

Post by Cycrow » Fri, 5. Jan 07, 21:47

my logic was assuming that turrets returned 6, which i thought it did, but then i havn't really used the command much

asynd
Posts: 11
Joined: Thu, 4. Jan 07, 09:26
x3

Post by asynd » Wed, 10. Jan 07, 12:21

>< after acouple days of not touching the game, i started up x3 and the script isnt working like it used too :/ , the only turret that works is the front turret and i cant figure out why, even though all the commands are being used for every turrent and they are even set under the orders command.

right now i have this, but with the task# set to all the turrets too

$ship -> start task 1 with script "!turret.killenemies.std" and prio 0 : arg1= [TRUE] arg2= [TRUE] arg3= [TRUE] arg4= [TRUE] arg5= [TRUE]

ive even tried this with acouple different turret commands, only seems that the front turret wants to fire

$turrets = [THIS] -> get number of turrets
while $turrets > 1
dec $turrets =
$ship -> start task $turrets with script "turret.fighterdefense.std" and prio 0 : arg1= null arg2= null arg3= null arg4= null arg5= null


also when i commented out all the other turret ones and had it set to just work on the back or down turrets, the front turret was still the only one firing even though that command wasnt being sent to it
:?

User avatar
Red Spot
Posts: 3224
Joined: Fri, 4. Feb 05, 14:44
x3

Post by Red Spot » Wed, 10. Jan 07, 19:36

the script is almost good ...

try this (and not beause its the answer but beause it makes you see for yourself what your missing .. 8) )

start the turretscript with a "call script" command and see what arguments it uses .. (its kind of important to know what argument a script needs)



G

User avatar
Stevio
Posts: 1983
Joined: Sat, 4. Jun 05, 10:36
x3tc

Post by Stevio » Wed, 10. Jan 07, 19:43

indeed you can't just stick [TRUE] everywhere and expect it to work
My Scripts
Image
So say we all!

Post Reply

Return to “X³: Reunion - Scripts and Modding”