Zaaephod's Forum Posts

  • Thanks guys,

    Latest question: Is there a way to have an object follow another object at an image point without having an 'every tick' condition updating the second object's position?

    What I'd like to do is have a vehicle's load be visible in the back, but since it can be one of several resources, it would be nice if it didn't have to be a special animation for each one.

    EDIT: I'm also working out how to destroy only the load of the current vehicle that's dropping off resources, without destroying the loads on the back of the other vehicles. I have a couple ideas for that, but I thought I'd include it here, in case anyone has a slick suggestion.

  • I really like both of those, and will definitely be using some of those ideas in my projects. Thanks R0J0hound

  • Silent,

    I did actually get the context menu working. I used the list box, and in fact, it worked very well. I was loading the menus from a file, with plans of later being able to edit them from inside the game through options.

    As I worked with it though, I decided that the menu popping up over the play field didn't really feel like it belonged, so I took it out. Instead I started using an approach where selected objects are selected mainly by left click and a selection box, and are given commands by right click. Any command that can't be dealt with in this way will be added to a menu in the HUD.

    That's one part I still haven't decided on though. I'm going to have sprite buttons on my hud bar, but they won't always be the same for each unit. I'm trying to figure out how I should group them so I have an easy way of switching from one group to the next. I'm leaning towards families, but I wonder if I'd be better off with them on a different layer.

  • Ah ha, I was close, but was missing the scrollxleft and scrollytop part. Thank you

    Next question: Is it possible to move objects from one layer to another? Say I hypothetically added a whole bunch of objects to the wrong layer, not realizing which layer I was on, since the project tab was visible, instead of the layers tab... hypothetical question ..

  • I feel bad having so many threads floating around, so I decided to try to condense all my learning into one thread.

    Today's challenge is about positioning an object over another object with a zoom applied. I'm trying to position a listbox over a sprite, which works fine, until a zoom is applied. I've not been able to find the solution on the forums. How can I handle this?

    http://dl.dropbox.com/u/6365460/positioning.cap

  • This will be an extremely useful effect.

    Very much so! Is there a thread for it so we can watch for releases?

  • Hehe, ok I'll give that a shot too.

    Last thought for the night: I love right click context menus. Any suggestions on how to approach something like that? I checked out the listbox and such, but it seems those are rather limited, and as far as I could see, items couldn't be added or removed from the list on the fly, unless I'm missing something.

    I was hoping for a right click on a unit opening a menu, selecting amazing things to do based on what kind of unit it is, but only using one dynamic context menu that is populated by a function. That's the dream anyway.

    Thanks for all the help again today guys, I'm having fun with this

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, I've been working with the functions, and I did get it working, all except the return value. I've got a function that sets the return value to either a 0 or a 1 depending on the outcome of two sub-events, but how can I use that value in a separate condition, after the function has been called?

    EDIT: or, do I have to assign either an object or global variable to whatever the outcome was in order to use that value in a condition?

    EDIT again.. I figured out a way to do what I was after through an expression in a compare condition, but I'm still curious if there's another way.

  • I'm curious about a couple things in Construct.

    First off, on the event sheet, I had a condition that had 5 actions attached to it. Later in my code, under a different condition that needed to be run later, I had 5 actions that were identical to the ones in the previous one. The difference was, I needed the same thing to happen again later under a different condition. Is there a way to re-use the same code more than once, like a function, or do you have to do each condition's actions separately?

    Kind of along the same line, I have several test cap files that I've been fooling with, each with different aspects of a possible game. Can I somehow copy this already working, usable code into a new cap file, or do I have to re-write the whole thing?

    Thanks,

    Z

  • Excellent, I've figured out what was going on there. It was working as intended, just not as expected

    Thanks again for all the help, I really appreciate it.

    Z

  • Very cool =D One last thing (yeah right!)

    I'm having some trouble moving events around sometimes. For example, I have an event #12, it has 4 events in it, but I need to take one out, and make it only happen based on a new condition. I can't seem to pull the event out of the group of 4, why is this?

  • Very helpful stuff =D

    I'm getting excited about this. Is there somewhere I can find out about more of the 'not-so-obvious' commands like the one you mentioned, Silent Cacophony?

    I've made some modifications to my original plan, and things are looking much better.

  • Wow, so much help! Thanks guys

    I do have one more question. Is there somewhere that has some documentation on the picture editor? I know that it's probably not the best for creating anything beyond basic images, but I do have some questions about it nonetheless.

    EDIT: I'm also looking for some information on how to detect things within a circle around an object, and how to find the nearest kind of 'whatever' object.

    Thanks,

    Z

  • Newt, I have not tried families. I'm not familiar (no pun intended) with them yet.

    Tube, your example works perfectly, though it's more complex than I expected it would have to be. If only RTS would return what object or location it had arrived at, this could be much simpler, I expect. Ahh well, I'll work with this. Thank you for your help

    EDIT: Well, maybe not that much simpler, I guess. All it would eliminate would be the destination variables, and the RTS returned variables would still have to be part of a condition anyway. A couple lines shorter, but not such a big deal.

    Z