hdnine's Recent Forum Activity

  • I just realized that some of the limitations set on the free version presents a problem, especially for me to decide if i want to buy a license or not. Granted, i am new to this program but i was fiddling with a radial menu where, when i click on an object, X number of menu elements should appear.

    This is where the limited "families" feature would have come in handy as i understand it?

    I wanted to group all menu options into a family and having the whole family being affect with things like visibility or mouse hover checks. Instead i am forced to "write" code for every single menu object and that really sucks. How am i supposed to make a decision on if whether or not i want to buy the product if i can't try essential features?

    A radial menu toggle is a key feature in the game me and my friend is planning so this would have been nice to try out. Then again, maybe I'm wrong about families and you can have a set of objects appear at the same time when another object is clicked?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey everyone!

    This will be my first post and I'm very excited about creating my own game. I have some previous JavaScript experience but it's been a while. Anyway, at the moment I'm trying to understand how functions work in C2 but i can't seem to get a grip on some things.

    Below you will find an image of my current test. Basically what I'm trying to do is to have a toggle function. When an object is clicked, it will call a function which will fade in another object (an image, some text or whatever). If the object already is visible, i want it to fade out... easy right?

    <img src="http://i.imgur.com/I5d7fu7.png" border="0" />

    So my problem is this. I want to pass three values into the function, the target object, the fade in time and the fade out time. These should set the the target objects behavior fields to those values. So in order to get it to work i have been struggling to understand how the functions work in C2.

    If i have a function object and set its name as fadeToggle, is this the same as:

    function fadeToggle(targetObj, in, out)

    {

        // set fade in and out values

    }

    OR

    var fadeToggle = function(targetObj, in, out)

    {

        // set fade in and out values

    }

    Aren't these then set in GLOBAL scope? What i want to do is have something similar to this:

    var gameObject = {

        fadeInTime: 0,

        fadeOutTime: 0,

        fadeToggle: function(targetObj, in, out) {

              // set fade in and out values

        }

    };

    Anyway, after trying for a while i can get an object to appear when i click a button and then disappear when i click it again, but not with proper fading. It fades in and out alright. But then when i click it again nothing happens. Both are set as "restart fade".

hdnine's avatar

hdnine

Member since 10 Jul, 2013

None one is following hdnine yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies