Author Topic: Tiny SEXP problem  (Read 1505 times)

0 Members and 1 Guest are viewing this topic.

Offline Ferret

  • 28
  • A very hungry Fiona.
Okay it's probably because I'm tired but I can't seem to work out the best way to do this.

In my mission, you have to oversee the capture of a station, during the mission an enemy cruiser pops up that you also need to deal with that you can chose to disable or destroy.

My problem is getting this single message to show up at the right time.
If you capture the station and you still havn't finished with the cruiser I want Command to say so, then tell you to RTB once you've done with it.
If you've already dealt with the ship and you've then captured the station I want to just tell the player to RTB and finish.

The message in question is in bold, I can't seem to think of an easy way to make that message show up at only that time. Roar.

Please help? :shaking:

 
This should work (though more experienced FREDers may have a better way, and I may be wrong on something too)
I've also attached 2 screen that show what it should look like (using the SCP FRED, so it's diffrent from retail, if your using it).

If the station is captured and he cruiser is still alive:

Event name
-when
--and
----has-docked-delay
----Troop Transport
----Station
----1
----0 (amount fo time docked, change as you wish)
--not
----is-destroyed-delay
----0
----Cruiser
-send-message
--#Command
--High
--Stay untill cruiser destroyed (your message)

If the cruiser is dead before station capture (links with RTB, and should be put in anyway):

Event name
-when
--and
---has-docked-delay (or undocked, whichever you want)
----Troop Transport
----Station
----1
----0 (time spent docked)
---is-destroyed-delay
----0
----cruiser

*CHAIN* RTB
--when
---has-departed-delay
----0
----Alpha 1



There are strings and variables to make this more intresting over at Karajorma's FAQ.

[attachment deleted by admin]
« Last Edit: May 09, 2006, 02:17:46 am by Warnstaff »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
To be honest though that's probably not the way I'd have handled things. The reason is that you should already have events in your mission for when the ship is disabled or destroyed because both of these are important mission plot points and should either be covered by directives, messages from command or both. So I'd probably simply reuse those events like this.


Event name
-when
--and
---has-docked-delay
----Troop Transport
----Station
----1
----0 (amount fo time docked, change as you wish)
---is-event-incomplete
----Cruiser-Destroyed-Event-Name
---is-event-incomplete
----Cruiser-Disabled-Event-Name

-send-message
--#Command
--High
--Stay untill cruiser destroyed (your message)
« Last Edit: May 09, 2006, 02:36:25 am by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 
That's actually quite simple.



If you want some more specified messages, you probably have to check if one of the events has already become true, or not. You can do that via variables or there might also be a way to do this using the and-in-sequence sexp.

Edit: Yikes, guess I'm too slow :D

  

Offline Ferret

  • 28
  • A very hungry Fiona.
Thanks much all, Karajorma's is definately the best solution, I totally forgot about is-event-incomplete. <_<

*hugs*