Zaaephod's Recent Forum Activity

  • Made good progress today

    The only thing I'm having trouble with is the SpriteFont plugin's edit box. I can get SpriteFont to display text no problem, but I'm not getting anything at all when trying to use the edit box. Maybe it's late and I'm not thinking clearly. Could someone give me a quick rundown on how you'd normally set one up, or maybe a sample cap file please? I've been at it for over an hour, and have yet to even see it do anything at all.

    Thanks !

  • YAY!! That just made a problem I was facing much easier.

    Next questions:

    1- Can I access a global variable by way of a variable for its name?

    Something like this: global(object.value('somevar')) ?

    2- Is it possible to force an edit box to always scroll to the bottom as text is added?

    3- I have a bunch of text boxes and such on a layer. I'd like to just make them invisible, but turning the layer visibility to invisible doesn't seem to work. I also tried setting the edit box's visibility to invisible at the start of layout, but it still appears. Will I need to destroy them and create them on the fly as I need them?

    Thanks, and happy 4th!

  • Has the problem with accessing private variables through python been fixed? I've not found a definite answer. If so, maybe I'm doing it wrong.

    object.Value('varname')

    should be correct, yes?

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • 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

Zaaephod's avatar

Zaaephod

Member since 21 Jun, 2010

None one is following Zaaephod yet!

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies