Probrobly Simple

Posted by GageEndal on Sun 06 Jul 2003 06:22 PM — 7 posts, 26,624 views.

#0
Hello, I'm trying to make a space combat setup for a SWR game and I'm having a little problem, I want to make it so I can recognize the ship I'm fighting against the others. I have everything but this part down and it's the one that will bring it all together.

I am going to throw in some samples of what it looks like so y'all know and do examples with it.

Comet (ISD) -345 -987 1562
Ion Engine Fighter (TIE) 51849 51207 53756

In this one I would want to target the Comet ship. What I want the function to do is make it so when I target the ship, it will automaticly send me to it's coords. I have this set up also (Triger for it if it's the only ship in space). Now this is the problem. I need it to make sure that it will only set the coords to the Comet and not the TIE ship. Is there some way that I can make it so when I target the ship a script will pop in that will make my trigger know which one I'm looking for?

Thanks, I hope you understand what I just said!
Australia Forum Administrator #1
Without knowing exactly how this works, I would suggest this...

I gather you have a trigger like this:

* (*) * * *

Where the asterisks represent the ship name, type, and co-ords.

In the trigger you can just have a simple "if" (if you do a "send to script") like this:


If "%1" <> "Ion Engine Fighter" and _
   "%2" <> "TIE" Then
  Send "goto %3 %4 %5"
End If

Amended on Sun 06 Jul 2003 08:46 PM by Nick Gammon
#2
Oh, I probrobly explained that wrong. The big problem with that is there are customizable ships. They can choose any name they want (but luckily no color codes). To do it the way you suggested would mean for me to put every ship in the game on that list.

Are there any other ways to do this?
Canada #3
Copy the following to windows clipboard by highlighting and pressing CTRL-C:

<aliases>
  <alias
   name="Set_Target_Ship"
   match="target *"
   enabled="y"
   variable="ShipType"
   send_to="9"
   ignore_case="y"
   sequence="100"
  >
  <send>%1</send>
  </alias>
</aliases>
<triggers>
  <trigger
   enabled="y"
   expand_variables="y"
   match="@ShipType (*) * * *"
   sequence="100"
  >
  <send>goto %3 %4 %5</send>
  </trigger>
</triggers>

In MUSHclient, select File, Import, Clipboard.

You may need to change the send line in the trigger to whatever is appopriate for your needs.

Once they are in MUSHclient, type target _____, where _____ is the ship you want to chase.
Amended on Mon 07 Jul 2003 02:37 AM by Magnum
#4
Alright, now I know I'm not explaining it right, I will go for a coders point of view here ;)

I want to make it so the trigger will do an IfCheck for a specific name of a ship that I can set into the Variables list.

The setup I have right now will have it so when someone targets me the variable is set to whatever ship it is (IE: Set to 'Durga's spaceship' or whatever). But there may be seven or eight other ships in that system. What I want to know is if there is a way for MC to decern between All of those other ships and the one that I am targeting so I can set my course to that ship. They all look identical except for their names. Here are the commands I will see when this happens... I used ship Sim-05 because that's the one my buddie used ;)

When I'm targeted:
You are being targetted by Sim-05 (X-Wing).

When this happens I set the ship Sim-05 as my target which is logged into Variables as 'SpaceFighter'. It also sends me into the Radar screen which would look like this.

Simulator Starsystem

Sim-04 (X-Wing) 218 -116 30
Sim-05 (X-Wing) -1109 2812 673

Your coordinates: -1135 2792 749

Now my problem is that I need to make it so I will set my course to Sim-05 instead of Sim-04 using an IfCheck of some sort. If this is possible I would be very happy to know how to do it, cause I'm at a total loss.

Thanks and sorry if I was confusing. (If you can help more I can be IMed at GageEndal almost anytime)
Canada #5
Just use this trigger:

<triggers>
  <trigger
   enabled="y"
   expand_variables="y"
   match="@SpaceFighter (*) * * *"
   sequence="100"
  >
  <send>set coordinates %3 %4 %5</send>
  </trigger>
</triggers>

You don't mention what command you use on your mud to set coordinates, and what the syntax looks like. I assume "SpaceFighter" is the name of the variable you are setting, and that it is a mushclient variable.

This trigger assumes there is only one ship at a time stored in that variable. If you want multiple ships, it will require a slightly more complex setup (but definately possible).
#6
Oi! I can't believe how stupid I am, The whole thing was so simple to do.

I had it set up so when I'm targeted I set the offending ship into my variables. Then I activate that radar and the ship will set course to the ship. Once that's done I target them and open fire.

So far I'm 0-15 since I made that

Thanks Everyone!