I know what you are going to have to do. Your wanting to see if a ship in a paticular races is under attack, and who his attacker is correct?
Well sence there is not ->get attacker command you have to do it the long way around.
-First you have to unpack these two scripts !ship.signal.attacked and !ship.signal.attacked.ts
-then you have to edit these in notepad and remove the ! from the start of their name, in this file there will be two places you do this, at the start then at the codearray part, then save....but don't "save as"
-then you have to rename them with out the ! by just right clicking on there name if you have windows
-now put these two files in your /scripts folder
-if you have done this correct your game will load, if not it will freeze...but nothing will be hurt you just have to remove those two files from the /scripts folder
-once you do it right..create you a new script in editor and make it like so:
Code: Select all
042 $race=null
043 global ship map: remove: key=SIGNAL_ATTACKED, class=Ship, race=$race
044 global ship map: set: key=SIGNAL_ATTACKED, class=Ship, race=$race, script='ship.signal.attacked', prio=100
045 global ship map: remove: key=SIGNAL_ATTACKED, class=Small Transport TS, race=Argon
046 global ship map: set: key=SIGNAL_ATTACKED, class=Small Transport TS, race=Argon, script='ship.signal.attacked.ts', prio=100
047 global ship map: remove: key=SIGNAL_ATTACKED, class=Small Transport TS, race=Boron
048 global ship map: set: key=SIGNAL_ATTACKED, class=Small Transport TS, race=Boron, script='ship.signal.attacked.ts', prio=100
049 global ship map: remove: key=SIGNAL_ATTACKED, class=Small Transport TS, race=Split
050 global ship map: set: key=SIGNAL_ATTACKED, class=Small Transport TS, race=Split, script='ship.signal.attacked.ts', prio=100
051 global ship map: remove: key=SIGNAL_ATTACKED, class=Small Transport TS, race=Paranid
052 global ship map: set: key=SIGNAL_ATTACKED, class=Small Transport TS, race=Paranid, script='ship.signal.attacked.ts', prio=100
053 global ship map: remove: key=SIGNAL_ATTACKED, class=Small Transport TS, race=Teladi
054 global ship map: set: key=SIGNAL_ATTACKED, class=Small Transport TS, race=Teladi, script='ship.signal.attacked.ts', prio=100
055
056 global ship map: remove: key=SIGNAL_KILLED, class=Ship, race=$race
057 global ship map: set: key=SIGNAL_KILLED, class=Ship, race=$race, script='ship.signal.killed', prio=10000
-name this to what ever you want but start it with init. when your ready for this to be loaded into the game wen you reload or reinit scripts
Now what you have is the ability to edit the signal attack scripts...these scripts will run every single time a ship is attacked. And what does that mean? That means you have power. And with this power you can get the attacker of anyship for in those scripts there is a varable named $attacker...it is him who you seek.
You can use this script to call another script that will do all the checking for you..just use Start at the beging of the script call.
Anything else just holla

"Try not. Do or do not, there is no try."-Yoda
"[Its] time for the human race to enter the solar system"-Dan Quayle