valkyriegames's Recent Forum Activity

  • Thanks for the example R0J0hound. That helps!

  • Hi Yann,

    I tried to do that with a for loop but to no avail. Perhaps using a repeat loop might have worked depending on how it is implemented.

    I ended up figuring out a work around though, which was by performing the action every tick except when a condition was false.

    Thanks for your help :)

  • Hi GenkiGenga, that wasn't exactly what I was after. I was hoping there was an equivalent to the programming "While Loop" in Construct 2.

    Thanks for trying though :)

  • Hi guys,

    I'm in need of a while loop for part of my game and I notice there is none. I tried simulating one with two events added together - a for 1 to 10 loop and a flag variable that is either set to 1 or 0 depending on whether or not I want the loop to terminate. This flag variable is set in sub-events of this combination event. When I run this however the loop is not short circuited by the flag variable being set to 1, but rather it keeps looping. I have placed the flag variable first. Is there any way I can simulate a while loop at all? Also I need to submit this to the arcade so non standard plugins may not be an option... :/

    Thanks for your help in advance!

  • rexrainbow

    Nice! I hadn't realized that you made a plugin already. It looks great, I'm going to check it out now thanks! :D

  • Thanks for all the helpful comments guys!

    Yes, it's possible to have the same functionality as a family tree, but you have to add each object individually to multiple families, instead of adding a family to another one (that would consequently add all the belonging objects automatically).

    It's a pity they don't allow adding a family to another - that would make things quite convenient! (Maybe the devs could think about doing it *hint hint* :D)

    SullyTheStrange and Arima: The suggestions about simulating a constructor and destructor are fair alternatives, but I was hoping for a "language supported" way of doing it! Probably the most important thing that constructors and destructors allow is nice groupings of functionality to object types and makes the "code" much simpler and more readable.

    valkyriegames

    "Constructors and destructors" could be implemented by plugin. Do you need one?

    Would the plugin allow the "code" to be grouped together with the objects? If so, that would certainly be very useful!

    > valkyriegames

    >

    > "Constructors and destructors" could be implemented by behavior. Do you need one?

    There, fixed it for you.

    lol Fimbul.

  • This does sound quite bad. Hopefully Scirra can negotiate with AppMobi a bit? This is quite a disappointment for me. I wouldn't pay those prices for the limitation, although AppMobi sounded like a great idea to begin with.

  • Thanks Arima! That cleared some things up a bit. So are family "trees" currently possible as well if there is no nesting?

    Constructors and destructors are functions that belong to a particular object class (in this case, an object type or family) that are called when an object is either created or destroyed respectively. This is convenient in that, for example, you can create a constructor for randomly placing a newly spawned enemy on the map, without having to specify the place to spawn the enemy each time you create an enemy. This also keeps the "code" neat by keeping the events together with the object types, rather than floating around on the events page.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks Fimbul, that certainly pointed me in the right direction!

    I had a look at families and that's exactly what I was looking for. What did you mean by object groupings? I found this topic which directed me back to families: scirra.com/forum/object-groups_topic45320.html

    I agree, some form of multi-inheritance would be handy. If the dev's don't want something as heavy handed as that, they could consider something more lightweight like java interfaces.

    By the way, does nesting of families (inheritance trees) work currently? (eg WorldObject -> Unit -> Player).

    Looks like I'll be needing my standard license soon so I can use those features! (Or if I could just conveniently win the Rotary Competition... :))

  • Hi there,

    I'm new to the forum as well and am looking forward to making some great games with construct 2! I'm looking forward to my stay here, and hope that we can all help each other out sometime! :)

  • Hi there,

    This is a question directed to the developers. As I come from a Java background, I am used to being able to create inheritances for object types. I was reading the fabulous manual and noticed that right now, this functionality is not available in C2. Is there any likelihood that this will be implemented in the future? Being able to create inheritance trees will speed up the game development process greatly because this will allow me to create a parent object type of Enemy which has associated events which say perhaps checks for collisions. I can then simply create TrollEnemy and OgreEnemy as child classes which would automatically also inherit those events without having to write them again for each.

    Also, there's no chance of Constructors/Destructors or Functions being planned for development would there? They would surely improve the efficiency of game development with the wonderful C2.

    Having the functionality above will allow much larger games to be created much more easily, and you can make it available only for the paid version :)

    Thanks for your time!

  • Thank you! I do :)

valkyriegames's avatar

valkyriegames

Member since 27 Feb, 2012

None one is following valkyriegames yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies