Pangoscript: Set Position of the calling Cue (or Event on timeline)

Discussion in 'Lasershow Designer BEYOND' started by Sven Rü., Aug 27, 2019.

  1. Sven Rü.

    Sven Rü. Member


    in the cue Properties there is the Pangoscript Tab available with "Cue Start" and "Cue End" section to execute script (the same is resp. on the event-Tab of an object in the timeline available). OK - So far.

    I'd like to set the (for example) the x-position randomly of ONLY this Cue, where the script is implemented and not for all:

    When I' calling the following script in the "cue Start" Section of a Cue from the workspace (or resp. on the "On enter Event" at the timeline):

    PositionX RandomIn(-100, 100)

    ... it's workinf fine - BUT now ALL cues started from this timestamp got this x-position. The x position seems to bee adjustet at "top level" :(

    I only want to set the x-position from the calling Cue / timeline Event.

    So I'm looking for an universal qualifier , reference-keyword to the calling object or something like that to get the calling cue / event and then set its position. Is this possible?

    Using fixed ObjectNames or CueNames is not what I'm looking for because then I've to adjust the script on each cue again. I'm looking for an general / univeral scipt Command.

    Can anybody give me a hint or lead?

    Thank you :)
  2. Bob@Pangolin

    Bob@Pangolin Staff Member

    What if you do :

    ControlCue 1,1
    PositionX RandomIn(-100, 100)
  3. Sven Rü.

    Sven Rü. Member

    Hi Bob,

    thanks for the answer.

    It's working on principle with cues... but as i wrote above: - I'm looking for an "universal command" here .

    Because two disadvantages i see here :

    1. every cue gets the individual "hardcoded" scriptpart "Control X,Y" -> on each Cue this part has to be adjusted - exactly this i'd like to avoid!

    2. on the timeline it's not working on the "on event enter" section of an timeline-event -> On the timeline I want to control with pangoscript (for example) the x-position of the Event-Container where the pangoscript is executed from.
    for example:

    a. adding a new event on the timeline, with creating a new simple frame (e.g. a small circle)
    b. from this event I'd like to "setup" a true random x-position with the "on event enter" Pangoscript section of this timeline-event before this frame it's shown via the laser(s)
    c. So i would need a Pangoscript syntax like:

    "CallingObject.PositionX RandomIn(-100, 100)", or
    "ParentObject.PositionX RandomIn(-100, 100)", or
    "This.PositionX RandomIn(-100, 100)"

    or something similar syntax like that.

    => a "Keyword" which points to the calling Object would help here. Because then it's more all-purpose and could be used in general, without adjusting the script for each Object, Cue, Event etc. again, again and again. :)

    I hope i found the right words to explain my problem.

  4. Igor Strakhov

    Igor Strakhov Staff Member

    Hi, Sven!
    In Grid mode you can use sequence:
    PositionX RandomIn(-100, 100)
  5. Sven Rü.

    Sven Rü. Member

    Hi Igor,

    thanks for the answer.


    here is the problem that I have to select Cues first, where I do something like "Select Cue X, Y" (= Hardcoding the cell position, what i want to avoid! :( )

    The next problem here: ALL SelectedCues get the same x-position (OK, the position is random, but each cue gets the same one :( )

    OK, as i recognize - there is no keyword or Syntax for this available. Because i need this function in timeline. Bummer!

    A little background:

    My simple plan (where the base of this thread started) at all is to visualize a melody (not a fixed BeatSequence!) on the timeline. Each note of the melody should set the x-position randomly of the event which i put on a lasertrack (under the music).

    I used one Cue-Event (for example one little circle in a "simple frame" or "shape" Event-Cue-Container). My intention was to give this timeline event in the "on event enter" pangoscript section a random x position.
    Then i wanted to copy this timeline Event under each note of the melody . But it's not working.

    The only way to do this is to set the position of each timeline event manually... and this i wanted to avoid (costs looooots of time :( ) when using a random position.
    I didn't get rid of it.

    I tried the oscillators with time / beatbased settings and the "random options" offered there... but it's not working properly.
    The Effect "KeyEffect-Position" would be perfect if it would offer the option of a random position - but this is not available. Only fixed Positions there.
    Last edited: Aug 27, 2019
  6. Igor Strakhov

    Igor Strakhov Staff Member

    Ok, Sven!
    In Timeline you can use Beyond channel technology

  7. Sven Rü.

    Sven Rü. Member

    Hey Igor!

    OUUU... o_O What a cool solution -> little bit tricky,

    BUT: That's it! Exactly what i've been looking for! Works perfect!

    I say thanks very much for the excellent help!!!:)
  8. Igor Strakhov

    Igor Strakhov Staff Member

    I was glad to help you, Sven! :)