Author Topic: SEXP: every-time, how ...?  (Read 1162 times)

0 Members and 1 Guest are viewing this topic.

Offline emi_100

  • 28
  • www.artstation.com/emimartinez
    • Skype
    • artstation.com/emimartinez
SEXP: every-time, how ...?
Hi, people :)
I'm still freding doing my "Battle at.." campaign. Thing are start looking good..but I need some help.
I've made a cinematic with the following code:

°/track alpha
===== op- every-time
======| op- is-event-true -delay
======|  | cam1c
======|  | 0
======| op- set-camera-facing-object
========| Ship(alpha1) *VARIABLE*

°/ next ship
===== op- every-time-argument
======| op- any-of
======|  | alpha 1
======|  | alpha 2
======|  | alpha 3
======|  | alpha 4
======| op- not
======|  | op- is-destroy-delay
======|     | 0
======|     | <argument>
======| op- modify-variable
==========| Ship(alpha1) *VARIABLE*
==========| <argument>


ok. the cinematic work fine. But when it's finish the camera is too far from the player's ship.
This is the big problem. Is there a way to disable "every-time" SEXP after using it?
or is there a other solution?

Sorry for my bad english  :p
Thanks
 :)
DEDICATED TO ALL THE
PEOPLE WHO PREDICTED
THAT THE BABYLON
PROJECT WOULD FAIL IN
IT'S MISSION.

-------FAITH MANAGES------
  • Normal Maps for -The Babylon Project-
  • "Battle at ..." (Campaign) You can't choose when, but you will choose where... and you will fight! GO NOW!
  • "One Mistake" (Third Space Campaign)
  • "Each Night I Dream of Home" (Crusade Single Mision)

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: SEXP: every-time, how ...?
Moved this from the TBP forum so assume the TBP release build of 3.6.9. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: SEXP: every-time, how ...?
I'm taking a look at this and to be honest I'm a little mystified at what you're trying to achieve here. Your next ship event is always going to end up with the variable holding the value Alpha 4 until Alpha 4 is destroyed because it will set the variable to Alpha 1, then Alpha 2, Alpha 3 and finally Alpha 4 before moving on to any other event.

However to answer the question I can understand, it is actually quite easy to disable an every-time(-argument) SEXP if you use a control variable like this

Do Something
every-time
- =
--VariableName[1]
--1
-do-stuff

Stop Doing it
-when
--Whatever
-modify-variable
--VariableName[1]
--0

The variable is now a switch that can turn the every-time SEXP event on and off. It's often common practice to include a modify-variable SEXP in the event so that it switches itself off after you've used it, like this.

Do Something
every-time
- =
--VariableName[1]
--1
-do-stuff
-modify-variable
--VariableName[1]
--0
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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