Jump to content
Sign in to follow this  
Curt84328

variables

Recommended Posts

I find my memory faulty, so need some help.   I have a section of my layout where I am changing from a camera mounted on each train to a single overhead camera.  I want to store the name of the camera as a variable to activate later.   I created an object variable  (Camera) and assigned the name of the camera,   when the train enters a track, I want to read the name of the train ($_Trigger1.name) and store the value assigned to object Variable Camera to another variable   so that I can later activate the camera  that I stored earlier.      Does this make sense?  What might I be missing

 

Share this post


Link to post
Share on other sites

Hi Curtis

I'm scratching my head but no result in finding out what it is that you want to do. Could you describe it just so, without using EV (event management) lingo? One thing sticking out is the $_Trigger. _Name you typed without the 2nd underscore but my guess would be that's a typo in your question and that you'll have it right in your EV.

Cheers

Tom

Share this post


Link to post
Share on other sites

Hi Curtis

If the name of the camera is assigned to the OV of the train (i.e. camera NameOfCamera), and assuming you enter a track you can grab the value in the action part like this:

set variable:   temp
value:            $_Trigger1.camera

There's no need here to ask for the Trigger's name. In that case it is _Trigger1.

greetings
  Andy

Share this post


Link to post
Share on other sites

Thanks, It works.   I stored the OV for the train camera, and activated the overhead camera.   The EV now knows which camera to activate at the end of the track.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×