Author Topic: Re: Repeat event SEXP? -AND- In Mission music?  (Read 1980 times)

0 Members and 1 Guest are viewing this topic.

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
Re: Repeat event SEXP? -AND- In Mission music?
Seems I accidentally removed the topic from this thread while trying to edit replies, and I didn't save a word file of the topic. I just noticed it now looking back. Sorry, I must have had too much caffeine or something yesterday. I'll try to sum up my question for accuracy.

Recreation (3 part question):

1: I don't the  like 'every-time' conditional, because I can never seem to get it to work.  Is there a way to use a SEXP to 'make-an-event-false-again' so that I can have a 'when' conditional event execute multiple times?

I could just re-write an event again and again to fix this, but in my situation, the event might happen 1 or 20 times. So I can't really anticipate how many times it needs to be written in the events editor. 

2: I am trying to run a mission where there are no hostiles in the beginning of the mission, however while running the soundtrack 'Numbers', I always get the victory music because no hostiles are in the area. Is there a way to fix this?

3: I notice that many of the recent topics on this board have been started by me. Is asking too many questions frowned upon? I want to figure out how to make missions, but I don't want to be a nuisance.
« Last Edit: June 09, 2010, 06:35:45 am by bigchunk1 »
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Repeat event SEXP? -AND- In Mission music?
For the first question, check out "trigger count" (a small text box in the event editor). It basically means that that event will be checked and executed <Trigger count> times, with a minimum interval time set in the "interval" text box.

AS for the second part, go through the objectives and check to see if any of them become valid before their time. For example, if you have an "All enemies dead" objective, make sure it's invalid until the enemies warped in. Also, check out the "Don't play victory sound" checkbox.

Considering the third, no, asking questions is not frowned upon.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
Re: Repeat event SEXP? -AND- In Mission music?
Man you are my freakin hero! Testing now

EDIT: I see something called 'repeat count'. I think this is the same thing as trigger count.
« Last Edit: June 08, 2010, 03:32:44 pm by bigchunk1 »
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

 

Offline Shivan Hunter

  • 210
  • FRED needs lambdas!
Re: Repeat event SEXP? -AND- In Mission music?
It's not.

Repeat count:

Event is checked every [repeat delay] seconds. The event is checked [repeat count] times, then stops.

Trigger count:

Event is checked continually (like most events are), but once it is triggered, FS waits [repeat delay] seconds and starts checking continually again. The event is restarted [trigger count] times.


Essentially, trigger count is more leet than repeat count.

 

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
Re: Repeat event SEXP? -AND- In Mission music?
It's not.

Repeat count:

Event is checked every [repeat delay] seconds. The event is checked [repeat count] times, then stops.

Trigger count:

Event is checked continually (like most events are), but once it is triggered, FS waits [repeat delay] seconds and starts checking continually again. The event is restarted [trigger count] times.


Essentially, trigger count is more leet than repeat count.

Oh no wonder I crashed the game using Repeat count. I set the repeat count to 100 and the interval to 15 sec. So the game executed the same event (in my case a somewhat complex event) 100 times in one frame. EDIT:at least I think that's what's happening.

EDIT: Scratch that, I think it's just a problem with my event being too complicated. Even if it executes one time it crashes the game.

EDIT:Yeah it most certainly was a problem with my code, I had a buggy SEXP left in there accidentally. I see now what you mean by "the event is restarted [trigger count] times." You mean once every [delay] seconds. My bad. 

I'm on 3.6.10 right now and that's why I didn't see trigger count. After looking it up I see it requires a later version 3.6.12. Trigger count is a nice feature though. Surprised it was not in retail. Normally calling a function or object multiple times is easy/essential in programming languages.


AS for the second part, go through the objectives and check to see if any of them become valid before their time. For example, if you have an "All enemies dead" objective, make sure it's invalid until the enemies warped in. Also, check out the "Don't play victory sound" checkbox.

Got the music to work properly thanks.     
« Last Edit: June 08, 2010, 04:27:04 pm by bigchunk1 »
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Re: Repeat event SEXP? -AND- In Mission music?
Trigger count is a nice feature though. Surprised it was not in retail. Normally calling a function or object multiple times is easy/essential in programming languages.

Most people never really understood how repeat count actually worked. I remember being very surprised when I finally realised that it didn't work the way I'd always expected it to. Simple fact was that I'd always set the delay to 1 (or 0) and included some kind of delay in the event trigger anyway so I'd never noticed that the behaviour wasn't what I would have expected it to be.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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