
fun with filter
- Aury
- Fleet Admiral
- Posts: 5526
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.

(shpOrder gPlayership 'barrelRoll)
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
I tried making an ore scanner using your code, but it's simply either not finding the asteroids, or not showing the nearest one. According to Periculi the code works just fine on his machine, but all it does on mine is output the "ore found" message and that's it. If you guys have any idea how to make it work let me know.
There's the extension I made
http://neurohack.com/transcendence/foru ... php?t=1723
It might have something to do with my windows version but the only things that's given it any problems before was system26.
There's the extension I made
http://neurohack.com/transcendence/foru ... php?t=1723
It might have something to do with my windows version but the only things that's given it any problems before was system26.
-
- Commonwealth Pilot
- Posts: 66
- Joined: Wed Mar 21, 2007 12:45 am
I won't pretend that I understand the script all that well, but is there any limit in the code that would prevent the AI from using a script like this? Say, on a police ship that would fly out from Commonwealth stations to meet incoming vessels and scan them for contraband at close range? Or shifty privateers who only attack you if your armor and shields are below a certain level?
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Nope enemy ships can also use this kind of stuff. (anywhere you can put code you can use filter)
For things like police ships I would give them a timed event so they would check every so often.
But I do like the idea of having privateers going after weak ships or even you could make wreck looting or destroying ships.
For things like police ships I would give them a timed event so they would check every so often.
But I do like the idea of having privateers going after weak ships or even you could make wreck looting or destroying ships.
Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
a new use for filter that I just used in my tinkerer plus one mod.
to test if every element in a list is true for a condition you just
(eq (count (filter myList element condition)) (count myList))
and now you have a conditional to test if every element in a list passes a condition 8)
to test if every element in a list is true for a condition you just
(eq (count (filter myList element condition)) (count myList))
and now you have a conditional to test if every element in a list passes a condition 8)
Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Code: Select all
(filter (sysFindObj gplayership "t") spaceobject (eq (objGetName spaceobject) name)
or use sysGetObjectByName. (that would seem easier)
Crying is not a proper retort!