Author Topic: Events After Completion of Event  (Read 2422 times)

0 Members and 1 Guest are viewing this topic.

Offline LoneKnight

  • 27
  • One does not simply ALT-J into Mordor.
Events After Completion of Event
I've been wracking FRED to determine if there is a way to trigger an event AFTER another event is completed. The main reason for this is if I play a sound track from play-from-file, the only way to make the song repeat is by adding a delay that is the exact amount of second that the song is. If the Player pauses at any time, the sound keeps playing, and this count is thrown off. There will be time of no music.

So, can events trigger AFTER a certain event is COMPLETE, not just true-delay?
Burning Heaven

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Events After Completion of Event
set up the event like normal and position a second event under the first which has the triggers and results for the second stage of the event, then with the second event selected check the chain box and if needs be set the delay and there you go
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Events After Completion of Event
If you have a branch (Can't do a chain) you can use

Not
--Is-event-false
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 
Re: Events After Completion of Event
I don't think chaining would work any better than event-true-delay here. I don't think there's any sexp to check when a sound has finished playing.

However, there is an easy way to do what you're trying to do. Right-click on the play-sound-from-file operator, click "add data," and set the new line to any non-zero number. The soundtrack will now loop.

 

Offline LoneKnight

  • 27
  • One does not simply ALT-J into Mordor.
Re: Events After Completion of Event
I don't think chaining would work any better than event-true-delay here. I don't think there's any sexp to check when a sound has finished playing.

However, there is an easy way to do what you're trying to do. Right-click on the play-sound-from-file operator, click "add data," and set the new line to any non-zero number. The soundtrack will now loop.

Boom. Genius! Worked perfectly. :D
Burning Heaven

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Events After Completion of Event
If you're ever in a situation where you can't just loop the sound (a SEXP that doesn't loop for instance) the solution would be to use the mission-time-msecs SEXP to determine when a certain number of milliseconds have passed since the event started.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FelixJim

  • 28
  • User 11092
Re: Events After Completion of Event
If you're ever in a situation where you can't just loop the sound (a SEXP that doesn't loop for instance) the solution would be to use the mission-time-msecs SEXP to determine when a certain number of milliseconds have passed since the event started.
He suggested that in his opening post, but pointed out that this wouldn't work if the player paused at any point, as pausing doesn't affect music (you'd encounter a similar problem with time compression, come to think of it).
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Events After Completion of Event
Yeah, that's cause sounds don't pause when the game is paused. But for anything else that does pause the solution would work.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: Events After Completion of Event
I've been wracking FRED to determine if there is a way to trigger an event AFTER another event is completed. The main reason for this is if I play a sound track from play-from-file, the only way to make the song repeat is by adding a delay that is the exact amount of second that the song is. If the Player pauses at any time, the sound keeps playing, and this count is thrown off. There will be time of no music.

So, can events trigger AFTER a certain event is COMPLETE, not just true-delay?

WROOOOOOOONG


the play-sound-from-file has an optional second argument, set it to a non-zero number to repeat the track
use it.
:rolleyes:



EDIT:

looks like because i'm blind i'm late.
sue me
(´・ω・`)
=============================================================