Sam Mortimer's Forum Posts

  • A simple on created action would solve this..

    I mean when I use the 'create object' action.

  • So is there really no way of having objects share artwork in Construct 2?

  • It also means I have to set font scale, character spacing and every other value for each instance I create, rather than Construct 2 just sorting that all out based on an instance of the same object elsewhere in the project if you know what I mean. Kinda annoying.

    Oh well! Thanks for the help.

  • > Why use multiple objects?

    > Just use instances of the same object and your issue is resolved..

    >

    But then the programming gets really messy. I'd have to use instance variables to say which instance has which job, and then specify which instance I want every time I get any of them to perform an action and ugh

    Not happening

    Actually maybe that wouldn't be too tough. But still, there must be a way to have objects share artwork. Anyone?

  • Why use multiple objects?

    Just use instances of the same object and your issue is resolved..

    But then the programming gets really messy. I'd have to use instance variables to say which instance has which job, and then specify which instance I want every time I get any of them to perform an action and ugh

    Not happening

  • If I'm using more than one sprite-font object which all look exactly the same, Construct 2 saves separate spritesheets for each object. I want them to all share the same spritesheet obviously.

    The font uses a fairly high-resolution image so it's kind of important I'm not saving loads of duplicates of it.So how do I have multiple objects share one image? please help omg

  • I have things in my game that need to happen constantly and would usually happen every tick, e.g. the character's eyes looking around at stuff in the environment, the player's cursor-crosshair-thing jumping to the nearest usable object, etc.

    To try and improve optimization, I've added 'every 1/10 seconds' or 'every 1/6 seconds' and similar things to the conditions, so that the computer doesn't need to do everything on every frame. However, I don't know whether this is actually a good idea. On the one hand, the computer should be doing fewer calculations and stuff every tick, but on the other hand maybe it's actually really performance-intensive to have the computer keeping track of all these different timers? I dunno.

    Is this a good idea?

  • ...or do I need to use lerp(a,b,clamp(C,0,1)) for that to happen?

  • Was there some newly created objects along the way per chance?

    Every 1/8 seconds a function runs to correct the size of these fake 3d objects. The function also runs when one of them is first created. However, when that happens the newly created object is not immediately affected.

  • Was there some newly created objects along the way per chance?

    Yes!

  • Set the size of every instance of this object based on some instance variables.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Huh that's weird. I've copy-pasted the actions now instead of using a function and that's done the trick, so don't worry.

  • An action to call a function appears in my event sheet BEFORE the 'on-function-called' condition executing the function, so it should be able to occur in one frame, right? Well it looks as if the function is happening the frame AFTER it's called.

    If that's not supposed to happen and somebody can guess what I might be doing wrong to cause it then it would be super nice if you told me. Thanks.

  • Jesus christ, okay that was tricky but I finally found a solution. Gave up on those bullshit containers. I went back to my instance-variable-indexes and tried a bunch of different ways to pick the correct instances, and I GOT ONE THAT WORKS.

    The important parent object with all the crucial instance variables and shit is called "Person", everything else is in a family called "BodyParts". Every time I want the BodyParts to do something in relation to their parent Person, I use the conditions:

    • For each Person
    • Pick BodyParts by comparison, BodyParts.index = Person.index

    And it bloody works.

    Thanks everyone.

  • Thanks for the detailed answer!

    I experimented with containers, and they're not what I was expecting but they're really useful.

    However I don't think I can use them because the way they work, from what I can tell, is that one of every object in the container is spawned at once, and each one is linked solely to the objects it spawned with. This means I can't have more than one of the same object, e.g. more than one eye, and still have them linked together in the event sheet.

    I could bypass this problem if there were some way to spawn a container full of objects, then spawn another instance of one of the objects without anything else in the container getting duplicated too, then add this extra object into the existing container. But I have no clue how that would work.

    Any ideas, anybody?