Author Topic: How does mission know if it is played first time ?  (Read 1459 times)

0 Members and 1 Guest are viewing this topic.

Offline Skullar

  • 29
How does mission know if it is played first time ?
I am still fredding Earth Alliance Civil War for TBP and something came to my mind...

are there any SEXPS so a mission can revognise if it is played for the first time ?

You know, when it is embedded in a campaign, you replay a mission when you somehow fail, however, I want some SEXPS being used when it is currently not the first time you play the mission...

 

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Re: How does mission know if it is played first time ?
Campaign-persistent variables?
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
Re: How does mission know if it is played first time ?
Player Persistent Variables. Campaign Persistent ones wouldn't work since they will reset to the default value when the mission fails.

All you do is simply add one with a default value of 0. Set it to 1 whenever you want in the mission. For the stuff in the second playthrough you simply check if the variable = 1.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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