Get an object value by mouse click?

  • #1, by MachtnixSaturday, 21. November 2015, 23:32 5 years ago
    Hi, I want to get an object value by left or right mouse click to work with in a further action. F.e. there a six scene objects with values from 1 to 6. Can I get them with

    getInt() 	Retrieve the integer value of the linked object. 
    1
    2


    (I don't want to get the object's ID!)

    and how must be the final script code (I never have used a LUA script...)?

    Sorry, my English isn't very well...

    Kann ich mit einer Aktion durch linken Mausklick einen bestimmten Wert (Value) eines Kulissenobjekts herauspicken? Angenommen, ich habe sechs verschiedene Objekte mit den Werten von 1 bis 6. Diese Werte möchte ich per Mausklick aufnehmen und in einem Script oder in einer Aktion weiterverarbeiten.

    Machtnix

    Thread Captain

    1079 Posts


  • #2, by afrlmeSaturday, 21. November 2015, 23:43 5 years ago
    What do you mean by an objects value?

    Imperator

    6816 Posts

  • #3, by MachtnixSunday, 22. November 2015, 00:11 5 years ago
    Every of this objects has its own value, simply one to six. It's a little "pipe" game with six different kinds of square objects to arrange into a closed line in time. If the player push the pipe jigsaw in the field, it should be change its position with a jigsaw outside. So I tried with a "value" to set a variable.
    I think, you know this kind of game, I found it in the little "Bioshock's" hacking games.
    It's VERY difficult to make it with the Vis editor only... I've never believe HOW...

    And yes: I tried a lot of tiny test games (all unfinished...) last time to make a choice for or against buying Visionaire... ;-)

    EDIT: I should better use an action by mouse click. I call an action which checks the value and changes the values of both jigsaws in a second action. I can use a variable instead of an integer... OMG - I'm the worst programmer ever and didn't know how to do it.... ;-)

    Machtnix

    Thread Captain

    1079 Posts

  • #4, by afrlmeSunday, 22. November 2015, 00:48 5 years ago
    So you managed to sort it out? Or you still need help?

    Imperator

    6816 Posts

  • #5, by MachtnixSunday, 22. November 2015, 01:02 5 years ago
    Thanks. I think the huge problem comes later: to verify if the pipe is closed or not to win the game... Than I need help, I'm sure... ;-)

    Tomorrow I try this value thing for myself...

    It's a typical case to solve it with Lua, but I can't...

    Bye Machtnix

    Thread Captain

    1079 Posts

Write post