Author Topic: Post 3.6 request - Modifying the "any-XXXX" trigger  (Read 2695 times)

0 Members and 1 Guest are viewing this topic.

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Post 3.6 request - Modifying the "any-XXXX" trigger
First of a few threads I'm going to make (don't worry, they're all on different topics). Anyway, quick example of what I'm talking about. You're flying in a highly volatile nebula. In order to make it into this nebula, the GTVA commissioned a shieldship - something that will project weak shields to a distance of, say, 2 kilometers. Now, you, the mission designer, want to make it so that if any GTVA ship, be it Player or AI, goes beyond this boundary, they are instantly destroyed. Initially, you want to use the "any-friendly" trigger:

Code: [Select]

when
  >
    distance
      any friendly
      Shieldship
    2000
Self Destruct
  err...


And then you realize that you can't go any further, and you have to delete your sexp. In fact, as far as I'm aware, there's no way to do this without individual sexping for every ship in the mission, and it is impossible to do it for ships from outside the first wave, as these can't be referenced by waves. What I was hoping for was some way by which we could trigger a single sexp to fire at any ship that violates our parameters. There are lots of places it could be useful, and could expand what we fredders can do in missions environmentally.

If we did this, it'd also be nice to expand the any ship sexps. Perhaps "any friendly/hostile/unknown/etc. except" sexps, or "any ship in wing" sexps.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Lightspeed

  • Light Years Ahead
  • 212
Post 3.6 request - Modifying the "any-XXXX" trigger
I've mentioned this before, too.

I hope it's gonna get implemented because it's *very* useful.
Modern man is the missing link between ape and human being.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Post 3.6 request - Modifying the "any-XXXX" trigger
Intriguing.  I might try my hand at this next.

I might be able to add a sexp like this:
Code: [Select]
for-sexp-object
   [x]
   when
      <
         distance
           
         2000
      self-destruct
         
where
  • could be a ship, wing, or waypoint, and would refer to whatever
  • was.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Post 3.6 request - Modifying the "any-XXXX" trigger
That would be ideal :) My idea was to "paint" the target of the sexp, and then have a second sexp that would affect ships as they were "painted" but this would be far more efficient.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline Flipside

  • əp!sd!l£
  • 212
Post 3.6 request - Modifying the "any-XXXX" trigger
Would it be possible to pass which ship has activated the Sexp to a variable? So that you can set general 'triggers'?

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Post 3.6 request - Modifying the "any-XXXX" trigger
Code: [Select]
set-variable
   [your variable]
   

 

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Post 3.6 request - Modifying the "any-XXXX" trigger
In my opinion, the self-destruct operator should have a second part, which says the message to display in the events window. The default is 'Self destructed', but if you could change it, it would not become apparent you used this SEXP to destroy a ship immediatly. You could diversify your campaign a bit by adding 'Sabotaged', 'Destroyed by unknown reasons', 'Reactor overload', etc. etc.

I have never had any problems with the 'any friendly' thing, but that situation BW told must be tested. At least, I must see if FS is really unable to expound this 'any friendly' something.
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Post 3.6 request - Modifying the "any-XXXX" trigger
Quote
Originally posted by TopAce
In my opinion, the self-destruct operator should have a second part, which says the message to display in the events window. The default is 'Self destructed', but if you could change it, it would not become apparent you used this SEXP to destroy a ship immediatly. You could diversify your campaign a bit by adding 'Sabotaged', 'Destroyed by unknown reasons', 'Reactor overload', etc. etc.


That's a pretty good idea actually. By making the second part optional (i.e need to use Add Data)  you could do it without breaking existing missions too.

Quote
Originally posted by TopAce
I have never had any problems with the 'any friendly' thing, but that situation BW told must be tested. At least, I must see if FS is really unable to expound this 'any friendly' something.


No need to test. He's correct. You'd need an event for each ship.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Flipside

  • əp!sd!l£
  • 212
Post 3.6 request - Modifying the "any-XXXX" trigger
Thanks Goob, I'm not a Fredder so I don't know if that was obvious, but I just wanted to know for an idea I had ;)

  

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Post 3.6 request - Modifying the "any-XXXX" trigger
Quote
Originally posted by karajorma
...No need to test. He's correct. You'd need an event for each ship.


But I prefer seeing how things work myself. The only obstacle is that I keep forgeting things. For example, I only realized that I had downloaded the Hi-res planet pack(By LightSpeed, I think)
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.