dop2000's Recent Forum Activity

  • Ah, you need to add this behavior to Tilemap object, not to sprites.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the coffee!

    It may be a difficult task when character has multiple animations and you need to prioritize and delay actions based on which animation is currently playing.

    It's hard to speculate without knowing your game, but it may be a good idea to use a state machine here. Assign a state to the character when an action starts, for example, "kick". Wait for the animation to finish (or use Timer behavior to wait a certain time), then reset the state to "idle". Allow new actions to occur only when the state is "idle".

  • Adavo It works fine for me with the latest C3 build.

    Is it any specific action/event of the behavior which throws this error?

  • There is an expression Family.ObjectTypeName

    You can pass it to the function, and inside the function use "Create object (by name)" action.

  • Adavo Make sure to download the latest version of the plugin from Eren's comment above.

  • I believe array object is essentially a Javascript array, so you can estimate its memory usage:

    mattzeunert.com/2016/07/24/javascript-array-object-sizes.html

    This way at least we can show the loading progress for feedback instead of nothing.

    I actually stopped using loadingprogress expression, as it often doesn't refresh. Instead I'm showing a fake progress counter, something like this:

    Every random(1,2) seconds
    Progress set to min(100, progress+choose(0,1,2,3))
    Text set text "Loading ..." & Progress & "%"
    
  • [removed]

    EDIT: Never mind, found "LocalStorage Set/Get Binary" actions. I don't know how I never noticed them before!

  • It is possible with BinaryData plugin - you can convert the image to base64 string and save it to Local Storage. However, to restore it you will have to load the image into a sprite first, and then paste the sprite to DrawingCanvas. There may be some quality loss if window size has changed, for example. Also, if the image is large, base64 string may be really long (many megabytes)

  • You need to multiply by that expression, and add a small delay before "Save image" action - because pasting a large image may take a few ticks.

    The result in my case was an image with resolution 1081x1922. Which is pretty close, but I don't know how to make it exactly 1080x1920..

  • when you create an event you can add only once "On Key Pressed", every other condition or sub-event will give only the option "Key is down".

    These are two different kinds of events. "On" event is a trigger, it fires only once when the key is pressed. Only one trigger is allowed per event. "Is" event is a condition, if this key is down, the event will run every tick, until the key is released.

    So the easiest way to fire the event once all three keys are pressed is this:

    On D pressed
    Is DownArrow down
    Is RightArrow down
    

    But of course it doesn't take into account how fast the keys were pressed and in what order. You need to save the time when each key was pressed. The array seems like an overkill for me, you can do it with a pair of variables - pressedRight and pressedDown.

    On DownKey pressed
    Set pressedDown to time
    
    On RightKey pressed
    Set pressedRight to time
    
    On D pressed
    Is DownArrow down
    Is RightArrow down
    pressedDown > (time-0.5)
    pressedRight > pressedDown
    ....... Play combo animation
    

    This event will fire when all three keys were pressed within 0.5s and in this order: Down->Right->D

  • I was going to suggest the same as lionz, but use a global variable instead of an instance variable on the button. The button won't remember its variable when you return to Layout1, unless it's set as global (which I don't recommend here) or has Persist behavior.

    So a global variable would be the easiest choice.

  • Ashley Ah, will do, thanks. I posted here mostly to see if anyone else have the same issue.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 279 followers

Connect with dop2000

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies