psychoanima's Recent Forum Activity

  • Thank you !

    I wasn't aware of this event condition, works like a charm!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If I have instances of same object stacked on top of each other, is it possible with touch command to select only instance that is at a very top (fully visible), not the whole stack?

  • Is this even possible, I can only see Set Instance action but doesn't seem to work on another objects (result mode is set to Relative).

  • Thanks for the example mrcgkh, solution looks quite interesting!

    However I manage to do this in a different way with very few steps

    On start of layout

    -create object spr_a

    -set animation frame spr_a to random (0, 15)

    Subevent

    While

    Array contains value in spr_01.animationFrame

    -set animation frame spr_a to random (0, 15)

    Trigger once

    -Array push back to Array on X axis

    So far works flawlessly!

    kudos to Ashley, Debug layout is one of the best I've seen, it's helping tremendously!

  • OK, I am doing something very wrong

    I have spr_a with 15 different animation frames that I want to spawn 15 times, each time with different animation frame (texture in my case)

    //create first object

    System/On Start of layout:

    -Create Object spr_a

    -Set animation frame to Random(0,14)

    -Array set value at 0 to spr_a.AnimationFrame

    //create second object

    System/On Start of layout:

    -Create Object spr_a

    -Set animation frame to Random(0,14)

    SUBEVENT

    System/For "sprite" from 0 to Array.Width

    System/ spr_a.animation frame = Array.At(loopindex("sprite"))

    Set animation frame to Random(0,14)

    now the problem is I have no idea how to go back to same subevent to check again if animation frames are different, and if different to do:

    Array/Push back last spr_a.AnimationFrame on x axis

    Maybe I am doing it all wrong from very start, I need your help to figure this visual logic out.

  • Thanks, I would like to use Arrays cuz I can use that stored values for further logic in my game.

  • In my case I am using animation frames as a different textures for one object.

    Let's assume that my object has 15 different textures stacked in animation frames.

    What I want to do is, at the beginning of game, create 15 instances of same object but with different texture - no repeating and random.

    So, in Event editor, On start of frame Create 15 same objects, one by one, and for animation frame set Random(0,14)

    Now, random function will at some point spawn object with same textures which I want to avoid.

    What is solution for this? I was thinking: when object is created, take the number on animation frame and store it in one dimensional array. While spawning second object, use Random(0,14) for animation frame, but, check if that frame is already stored in array - if it is, run Random function again until it's different and store that animation frame number in Array. Repeat same process for the rest of instances.

    Now, this is theory, but I am new to Construct visual programming paradigm and have no clue how to make this things in Event editor.

    Please help.

  • I'm still not sure what you mean abot Box2D worlds. I think maybe you're talking about something else?

    I meant to say more than one Box2D engine, but in Construct terms I guess you are calling it Box2D world.

    In another engine I was very occasionally using more than one Box2D "engine": With one Box2D I am setting global gravity that is applied for main character, with second created Box2D I am setting global gravity for big amount of assets. This way I am changing gravity and forces for dozens of objects in two text boxes only, and also my character is not affected by forces of assets from another Box2D engine.

  • Ashley For me it's just organizational thing using more than one Box2D world. I can setup character on one Box2D, and assets that needs to explode all over the place on another. So most changes I am doing is on Box2D itself without need to tweak each asset that belongs to different group/family, and as a benefit, those Box2D worlds don't collide.

    Speaking of collision, I currently have more than 30 pieces that are not suppose to collide physically. The fastest way I figure out how to do this is: put all 30 pieces in one family, in event editor select each peace and switching off physics collision with this family. However, that's 30 actions, and family doesn't hold physical collision action, is there any faster way to do this?

  • Thanks for explanation guys!

    Ashley, I am coming from different game engine so I have to ask, are all physics objects in Construct sharing one box2D engine? To make it more clear, in ClickTeam Fusion I can create more physics engine with different set of rules and then I can say to each sprite/object which physics (engine) rule to follow.

  • Ok, apparently it's because different refresh rate, on computer it's 144hz and it gives around 120fps, and on cellphone I am getting fixed 60fps

    So, how can I limit framerate in Construct 3, to have fixed fps, to achieve almost exact physics behavior since this is causing the problem while testing the game.

  • I am having an issue with physics in my game, revolute joints more precisely.

    On my desktop when I simulate a rope swing, everything is behaving how I want, subtle. When I test it remotely on my cellphone everything is different, gravity seems lower and ropes are swinging more aggressive.

    Can someone explain to my why is this happening?

psychoanima's avatar

psychoanima

Member since 23 Mar, 2018

None one is following psychoanima yet!

Trophy Case

  • 6-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

10/44
How to earn trophies