Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: FreeSpaceFreak on December 16, 2010, 03:00:49 am
-
It's not on the Wiki yet, so - what exactly does it do? Can you have ship names in the list of strings, and will the turret then target the ships in the order listed? Or is it something else?
-
If I remember right it sets the priorities based on types so bombs, bombers, fighters, cruisers, etc
teach me to open my mouth before checking
-
Wrong. You are thinking of a different sexp
It sets target priority groups for that turret. You have to have groups defined in object types. It works the same way as setting priority groups on a turret via table.
-
Ah... What I'm trying to do is have a destroyer attack another one, but there are some escorts in between. The idea is that the destroyers battle each other (no beams, so no fire-beam SEXP), and leave it to the player to take out the escorts. Currently, the friendly destroyer fires first on the escorts (presumably because they're closer by).
This is one of the cases where a fire-turret SEXP would be handy, I guess, or can this already be done somehow?
-
Ah... What I'm trying to do is have a destroyer attack another one, but there are some escorts in between. The idea is that the destroyers battle each other (no beams, so no fire-beam SEXP), and leave it to the player to take out the escorts. Currently, the friendly destroyer fires first on the escorts (presumably because they're closer by). Can this be done somehow?
This is one of the cases where a fire-turret SEXP would be handy, I guess.
I've had this plan to fake fire-turret. Here's what I want you to try, tell me if it works:
Set the appropriate guns on the friendly destroyer to turret-tagged-only.
Tag the enemy destroyer with tag-ship.
Simultaneously change the enemy destroyer's target color back to red with the appropriate SEXP (change-iff-color?)
Turret target priority only lets you pick between ships, bombs and asteriods.
-
I've had this plan to fake fire-turret. Here's what I want you to try, tell me if it works:
Set the appropriate guns on the friendly destroyer to turret-tagged-only.
Tag the enemy destroyer with tag-ship.
Simultaneously change the enemy destroyer's target color back to red with the appropriate SEXP (change-iff-color?)
Hmm, that almost works, except that the Demon is still yellow. Apparently the tagged status overrides the IFF colour.
-
I've had this plan to fake fire-turret. Here's what I want you to try, tell me if it works:
Set the appropriate guns on the friendly destroyer to turret-tagged-only.
Tag the enemy destroyer with tag-ship.
Simultaneously change the enemy destroyer's target color back to red with the appropriate SEXP (change-iff-color?)
Hmm, that almost works, except that the Demon is still yellow.
Balls. Put the IFF color thing on an every-time. Does that help?
-
Nope, it doesn't. Still yellow.
Pic to ensure I'm doing it right:
(http://img844.imageshack.us/img844/2998/tempi.gif)
-
I forget what each of the arguments do, so I can't be sure.
I suspect TAG may override the change-iff-color. :(
-
Set up target priority groups. It's not that hard and makes what you are trying to do very easy.
-
Set up target priority groups. It's not that hard and makes what you are trying to do very easy.
I have seen it done, but unfortunately it can't be done in FRED alone, which is inelegant.
-
I've thought of adding that ability. Not sure how hard it would be.
-
Okay, so I make an -obt.tbm like this, and then I can use turret-set-target-priorities with arguments "capital", "corvette", "cruiser" etc.?
#Ship Types
$Name: cruiser
+nocreate
$Name: corvette
+nocreate
$Name: capital
+nocreate
#End
(Oh hey look, code tags have a select button now :) )
-
Not quite right. More like this:
#Target Priorities
$Name: FighterCraft
$Name: Frigate
$Name: Vette
$Name: StrikeCarrier
$Name: Stations
$Name: SmallShips
$Name: MediumShips
$Name: LargeShips
#End
#Ship types
$Name: Fighter
+nocreate
$Target Priority Groups: (
"FighterCraft"
"SmallShips" )
Continue with other types. Then if you want to have a turret shoot at only the ships in frigate class then you just set target priorities to frigate. It will ignore all other types. You can also change the group for a specific ship. This has never been tested but theoretically you could have a target priority group with nothing in it by default and assign a ship to it in mission. I do not know if this would work though.
-
I wrote a sexp that did what you want probably years ago now but no one cared and it never got committed.
-
I wrote a sexp that did what you want probably years ago now but no one cared and it never got committed.
I CARE I CARE
(http://www.lymanite.com/images/warcraft/orly_owls/i/large/I%20Care.jpg)
-
I wrote a sexp that did what you want probably years ago now but no one cared and it never got committed.
I CARE I CARE
(http://www.lymanite.com/images/warcraft/orly_owls/i/large/I%20Care.jpg)
+1
-
Have you tried level 1 TAGging (choose the type of tagging via SEXP)? From what I could experience, it works without marking tagged ships with yellow brackets.
-
Continue with other types. Then if you want to have a turret shoot at only the ships in frigate class then you just set target priorities to frigate. It will ignore all other types. You can also change the group for a specific ship. This has never been tested but theoretically you could have a target priority group with nothing in it by default and assign a ship to it in mission. I do not know if this would work though.
Ahm, umm, there doesn't seem to be a SEXP for assigning a ship to a target priority group, is there?
I wrote a sexp that did what you want probably years ago now but no one cared and it never got committed.
Heck, that sure would make things a whole lot easier. Especially now that there are quite some mods that have non-beam anti-cap weapons and therefore can't nicely script their battles like fire-beam can. Do you happen to have the code lying around somewhere? People care now :nod:
Have you tried level 1 TAGging (choose the type of tagging via SEXP)? From what I could experience, it works without marking tagged ships with yellow brackets.
It is tagged level 1, but shows up as yellow. Changing the it to tag level 3, the hostile destroyer shows up red, without even needing the change-IFF-colour. So this is a step in the right direction.
Edit: However, the turrets are simply not firing now. Those that aren't slaved to the turret-tagged-specific work just fine, so it's got to be something in the SEXPs.
-
Yes there is a sexp for setting the target priority group of a ship.
OK maybe there isn't which is weird because I remember writing it.
-
Update: I made an -obt.tbm like this, and I could choose the "capital" group in the SEXP. It works beautifully now, thanks FUBAR.
For resetting the priorities, does it make any difference if you use the SEXP with a "true" third argument and an empty list, or a "false" third argument?
#Target Priorities
$Name: capital
#End
#Ship types
$Name: capital
+nocreate
$Target Priority Groups:("capital")
#End
-
Reset sets the list back to what the turret is in the tables. A blank list removes target priorities so turrets target as if there were no target priorities. Resetting a turret that doesn't have target priorities tabled or giving that turret a blank list will both result in no target priorities.