View unanswered posts | View active topics It is currently Thu Mar 28, 2024 11:37 pm



Reply to topic  [ 8 posts ] 
 Triggers in SWATH 
Author Message
Chief Warrant Officer

Joined: Sun Apr 17, 2005 2:00 am
Posts: 194
Location: USA
Unread post Triggers in SWATH
I really enjoy triggers in SWATH. But there's one particular trigger that I have a problem getting to work.

When I create a trigger for the text "Probe Destroyed!" and assign a .wav file to play, it doesn't work. I also noticed that when I turn off ANSI graphics in the Computer menu and try again, it STILL doesn't work!?

Is there a way to use "Probe Destroyed!" with a SWATH trigger? Or is there a better solution? What does "better" mean?

_________________
The New Order
66.26.112.116:2002

MicroBlaster:
http://www.microblaster.net/ServerDetai ... erverid=66

One day, the entire Tradewars 2002 fanbase will tremble at the mere mention of "Lionmane." Too bad it's not my name!?!?! -Krovach


Mon Feb 19, 2018 10:18 am
Profile
Commander
User avatar

Joined: Fri Jun 09, 2006 2:00 am
Posts: 1396
Location: Canada
Unread post Re: Triggers in SWATH
Works on my Swath. So, I wonder if you understand what 'ProbeDestroyed' means(?) ....it means your probe hit a fig'd sector and was destroyed by the enemy fighter.

In case you're not aware:

ProbeSelfdestructs - means it reached it's destination and blowed itself up, real good.

ProbeEnteredSector - a probe entered the sector you're currently in, likely passes through --beit enemy or friendly

YouDestroyedProbe - iirc, means one of your fighters destroyed an enemy probe

..and of course the last bit of advice I can think of is: make sure your volume is up (!muted) 8)

_________________
----------------------------
-= QUANTUM Computing 101: 15 = 3 x 5 ... 48% of the time.
-= There are 10 types of people in the world: Those that understand Binary and those who do not
-= If Oil is made from Dinosaurs, and Plastic is made from Oil... are plastic Dinosaurs made from real Dinosaurs?
-= I like to keep my friends and my enemies rich, and wait to see which is which - Tony Stark (R.I.P.)


Mon Feb 19, 2018 11:12 pm
Profile ICQ YIM
Chief Warrant Officer

Joined: Sun Apr 17, 2005 2:00 am
Posts: 194
Location: USA
Unread post Re: Triggers in SWATH
Ok, I got it to work.

Apparently, the script trigger doesn't accept special characters (exclamation point, etc.) This is why I was able to get it working with everything else except for this.

Thanks!

_________________
The New Order
66.26.112.116:2002

MicroBlaster:
http://www.microblaster.net/ServerDetai ... erverid=66

One day, the entire Tradewars 2002 fanbase will tremble at the mere mention of "Lionmane." Too bad it's not my name!?!?! -Krovach


Tue Feb 20, 2018 8:07 am
Profile
Chief Warrant Officer

Joined: Sun Apr 17, 2005 2:00 am
Posts: 194
Location: USA
Unread post Re: Triggers in SWATH
How do I set a trigger to send these key commands?

$z

Edit: Whoops! I got it!? Create a Macro from the Macro menu and then assign a trigger to it. So I create two of the same triggers with a .wav file on one and my "Stop Script" macro on the other.

_________________
The New Order
66.26.112.116:2002

MicroBlaster:
http://www.microblaster.net/ServerDetai ... erverid=66

One day, the entire Tradewars 2002 fanbase will tremble at the mere mention of "Lionmane." Too bad it's not my name!?!?! -Krovach


Wed Feb 21, 2018 8:25 am
Profile
Warrant Officer

Joined: Thu Aug 21, 2003 2:00 am
Posts: 77
Location: USA
Unread post Re: Triggers in SWATH
First off, instead of creating your trigger on Game Text String you can set your trigger on the SWATH Event "ProbeDestroyed". This seems a lot cleaner and likely more efficient since Swath is throwing this event anyway.

If you want to send the text, first define a macro for "$Z" or whatever you want and choose the Action for that trigger to send your macro. If you want it to send the macro and also play the .wav file then you will probably have to write yourself a script to do both those things and launch that from your trigger.


Wed Feb 21, 2018 8:59 am
Profile ICQ
Chief Warrant Officer

Joined: Sun Apr 17, 2005 2:00 am
Posts: 194
Location: USA
Unread post Re: Triggers in SWATH
I wasn't familiar with the SWATH events. How do I define those?

Defining two separate triggers using the same text string works, so I assume two triggers with the same SWATH event will work also...?

Edit: Wow! SWATH events! Awesome! I still haven't tested multiple triggers for the same event, yet... But, wow!

Edit2: AND you can do BOTH the SWATH event trigger for ProbeDestroyed and the text string Probe Destroyed if you want to stop your scripts AND play a sound! Or you can do two text strings! Or you can do two SWATH events! Lol!

_________________
The New Order
66.26.112.116:2002

MicroBlaster:
http://www.microblaster.net/ServerDetai ... erverid=66

One day, the entire Tradewars 2002 fanbase will tremble at the mere mention of "Lionmane." Too bad it's not my name!?!?! -Krovach


Wed Feb 21, 2018 10:57 am
Profile
Warrant Officer

Joined: Thu Aug 21, 2003 2:00 am
Posts: 77
Location: USA
Unread post Re: Triggers in SWATH
Well, I was only referring to the existing Swath events that are available in the Edit | Trigger List | Add dialogue where you can choose a "SWATH event" as opposed to what I assumed you had used, a "Game text string" which you designated as "Probe Destroyed". There are a number of events already available in the Java API, as well as a UserDefinedEvent class which you can extend to create your own events, but this is getting into deep stuff.

I think your idea of creating multiple triggers off the same event is a very clever alternative to my suggestion.


Wed Feb 21, 2018 7:42 pm
Profile ICQ
Chief Warrant Officer

Joined: Sun Apr 17, 2005 2:00 am
Posts: 194
Location: USA
Unread post Re: Triggers in SWATH
Deign wrote:
...but this is getting into deep stuff.


Lol! I know what that means: late nights sitting in front of the computer! The same reason I'm avoiding scripting! Lol!

Thanks!

_________________
The New Order
66.26.112.116:2002

MicroBlaster:
http://www.microblaster.net/ServerDetai ... erverid=66

One day, the entire Tradewars 2002 fanbase will tremble at the mere mention of "Lionmane." Too bad it's not my name!?!?! -Krovach


Thu Feb 22, 2018 7:35 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.