I cant get this to work fully.
The command "Self destruction: Activate" work fine.
The command "Self-destruct: Follow dont work. Tested it on a TS, TP and M4. They just continue to fly around target with cargo full of squash mines.
When I opened plugin.stl.selfdestruct.xml in exscriptor and tried to save it I get this message:
Save failed because of compilation errors - please compile again
Save failed due to compilation errors!
- Error on line 44 - Incorrect parameter; expected: Var/Array (parameter #9)
Warnings:
Variable var2 is being used on line 27 before being assigned to.
Variable station is being used on line 45 before being assigned to.
This from plugin.stl.selfdestruct.xml:
Code: Select all
0024 end
0025
0026 $var1 = read text: page=8767 id=2
0027 $var2 = string $var2 to integer
0028
0029 $i = [THIS]->get cargo bay size
0030 $i = $i / $var2
0031 skip if is datatyp[ $i ] == {DATATYP_INT}
0032 $i = 1
0033 skip if $i
0034 $i = 1
0035
0036 while $i
0037 dec $i =
0038 $var1 = [THIS]->get x position
0039 $var2 = [THIS]->get y position
0040 $var3 = [THIS]->get z position
0041 $sec = [THIS]->get sector
0042 $squash = create ship: type={Argon SQUASH Mine 3851} owner={Player} addto=$sec x=$var1 y=$var2 z=$var3
0043
0044 $station = find station: sector=[SECTOR] class or type={Station} race=null flags=[Find.Random] refobj=[THIS] maxdist=3000 maxnum=null refpos=[THIS]
0045 skip if not $station
0046 gosub SubStation
0047
0048 = wait 10 ms
0049 skip if not $i MOD 10 == 0 AND !$nosound
0050 play sample 924
0051 $squash->destruct: show no explosion=null
0052 end
So there is something wrong with line 27, 44 and 45..any idea?
Also I have no other scripts/mods installed.
Anyone that can help....thanks