Compare Display Variables

    Joined
    Jun 7, 2015
    Messages
    4
    Reaction score
    5
    When using a sensor block to compare the contents of displays, it would be nice if the value of a display variable in one display module could be compared to text in another display module. For example, if one module contains [sector], and another module contains for example the homebase sector coordinates, then a match happens when the ship reaches the homebase sector. Then we could program things to happen at specific sectors or ship speeds, etc, like hanger doors that open on arrival, or chain drives that shut off when the waypoint is reached.
     

    Lone_Puppy

    Me, myself and I.
    Joined
    Mar 12, 2015
    Messages
    1,274
    Reaction score
    529
    • Purchased!
    • Community Content - Bronze 2
    • Legacy Citizen 8
    Ah, I'm pretty sure you can do this with the new functionality.
    [doublepost=1476393404,1476393330][/doublepost]Oh wait, not the ship speed control.
     

    Ithirahad

    Arana'Aethi
    Joined
    Nov 14, 2013
    Messages
    4,150
    Reaction score
    1,330
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen 8
    Ah, I'm pretty sure you can do this with the new functionality.
    [doublepost=1476393404,1476393330][/doublepost]Oh wait, not the ship speed control.
    You cannot do it, period. What gets compared is, for instance, "[sector]" and "2, 2, 2", not "5, 4, 2" and "2, 2, 2".
     

    Lone_Puppy

    Me, myself and I.
    Joined
    Mar 12, 2015
    Messages
    1,274
    Reaction score
    529
    • Purchased!
    • Community Content - Bronze 2
    • Legacy Citizen 8
    You cannot do it, period. What gets compared is, for instance, "[sector]" and "2, 2, 2", not "5, 4, 2" and "2, 2, 2".
    Ah! That's a shame. I was hoping to make use of it when I had a chance.
     

    Ithirahad

    Arana'Aethi
    Joined
    Nov 14, 2013
    Messages
    4,150
    Reaction score
    1,330
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen 8
    Basically, the way the game works, the actual ship metadata just stores [sector] or [powerAux] or [docked] or whatever; there is a separate part of the code that replaces those tags with whatever quantity (or string-from-boolean) they reference on the server. Sensors compare the metadata text.
     
    Joined
    Jul 30, 2013
    Messages
    398
    Reaction score
    282
    • Wired for Logic Gold
    • Legacy Citizen 8
    • Purchased!
    ... actualy.. you can do that, using the command [ADD] and [REPLACEFIRST]
    give a moment and i post here the stuff you need for do that :)
     

    Ithirahad

    Arana'Aethi
    Joined
    Nov 14, 2013
    Messages
    4,150
    Reaction score
    1,330
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen 8
    ... actualy.. you can do that, using the command [ADD] and [REPLACEFIRST]
    [ADD] and [REPLACEFIRST] use the stored string data, too, last time I checked, not the output string rendered on the display block.
     

    Lone_Puppy

    Me, myself and I.
    Joined
    Mar 12, 2015
    Messages
    1,274
    Reaction score
    529
    • Purchased!
    • Community Content - Bronze 2
    • Legacy Citizen 8
    Basically, the way the game works, the actual ship metadata just stores [sector] or [powerAux] or [docked] or whatever; there is a separate part of the code that replaces those tags with whatever quantity (or string-from-boolean) they reference on the server. Sensors compare the metadata text.
    Makes sense.

    ... actualy.. you can do that, using the command [ADD] and [REPLACEFIRST]
    give a moment and i post here the stuff you need for do that :)
    I was wondering if there was a way to parse the output somehow.