KawaiiNya's Forum Posts

  • I have a sprite with set of animations and need to set one of it by number.

    I need to get total amount of animations in sprite object to calculate, which to set.

    There is Sprite.AnimationFrameCount to count frames in animations, that not what I want - I need to count Animations

  • I have "layout base" with size 100*100

    When I go to layout first time I fill it with content and change layout size to appropriate.

    When I change layouts and came back - my layout returns to its base size 100*100.

    I developed a solution - when I came back to filled with content layout, Im recalculate and restore its size.

    But i feel thats wrong.

    So, can I and how I can change layout "base size" to new?

    Tagged:

  • I have sprite object "Camera" with behavior "Scroll to" and customized controls for keyboard, and i want to add "drag" function.

    I need when RMB is pressed "grab" my Camera, but not by set position to mouse cursor.

    Camera still must be centered in viewport no matter where i "grabbed" it.

    So im thinking about every tick check difference between camera and cursor and move it together with cursor.

    But maybe i can drag viewport?

    Tagged:

  • That was a VERY good question, which helped me solve my problem, thanks!

  • Object.X and Object.Y coordinates of an object, which i need to change animation.

  • I have an event sheet function that change an object animation:

    function(X,Y){ event: Object.PosX = X; Object.PosY = Y; action: set animation to "Clicked"; }

    While im trigger it with "On object clicked", with sending arguments of Object's X and Y - everithing work as intended.

    While im trigger it with "On any click", with setting arguments manually - everything work as intended.

    While im trigger it from "On start of layout" event - it doesnt work.

    Tagged:

  • How do i apply behavior to whole layout?

  • But i still want to restrict size of layout to content that fits in it... to not to scroll far away from content.

  • I have layout "world" where i build tiles. It has some basic size like 640 x 480, but i need to build tiles in any direction as much as i want.

    I need to enlarge layout when my objects are near border.

    I dont want to create very large empty layout which still not infinite.

    Tagged:

  • For example i have 2 layouts - "city" and "world". In each there is plenty to do and i need to switch between them often.

    But when i switch layout - all my changes are lost.

    I believe thats basic functionality and there is somewhere checkbox "keep layout in memory", but i cant find it =((

    Tagged:

  • Oh okay, then click on each event and press "i" :]

    But it will mean any object where X != 1 and Y != 2. Its not the same. Am i wrong?

    do the above and add an else below where you do the actions you want.

    Hmmm... this sound reasonable. I'll try. Not exactly what i want, but should work, i guess.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If an object exists with those variables, the action will trigger. If no object exists with those variables, it doesn't.

    I need exactly opposite - if object DOESNT exist with given PAIR of vars. =(

    For example - check if object(1,1) doesnt exist, create obeject(1,1).

  • I have an object instance with variables X = 0 and Y = 0.

    I need to check if instance with variables X = 1 and Y = 2 exists to fire a function.

    How can i do this without loops and JS? I know i can do that, but cant figure out how.

    I need something like if object with X = 1 and Y = 2 doesnt exist - do something.

  • I have 10 objects in Family and when i click on one object i need to change animation on all others.

    I tried pick instance with UID to get clicked UID and inverted variant to set animations to all other (ever with foreach) - and it doesnt work for me =(

    Tagged:

  • State machine is nice... but it check ALL objects in family EVERY frame!

    Thats doesnt feel right.