dop2000's Forum Posts

  • Superxonic is right — The first time you press the Up button and the function is called, the frame is still 0. Events 3 and 4 will only update the animation frame on the next tick. Move Events 3 and 4 inside the reload_position function to fix this particular issue.

    I imagine something similar is happening with your texts — likely due to the wrong order of events. Though it's hard to tell from your screenshots. For example, if you’re receiving data via AJAX and want to display it immediately, the correct sequence should be: Load the data into variables -> Then update the texts

    It looks like you might be updating the texts before setting the variables. But again, not possible to tell with the provided screenshots.

  • This is strange. We have a sprite with multiple animations for mouse cursor and changing between them is instant.

    Maybe 100px is too big for cursor? As an experiment, try resizing them to something like 20x20 px.

    Also, try disabling the Worker in project properties. If it helps, this might be a browser bug:

    github.com/Scirra/Construct-bugs/issues/3652

  • I use random(100)<30, it's slightly easier to read.

  • You do not have permission to view this post

  • How big are these images? 2s to load them seems way too long.

    You can try placing them all on the layout, they can be off-screen and you can destroy them after the layout has started. This should pre-load their textures into memory, which may help to reduce the delay.

    Another option is to add all cursor images into a single sprite as animations. Keep the sprite on the layout. Set the required animation, then set the mouse cursor from the sprite.

  • I press the button changing the variable, for example. Which sets the text.

    Which variable and which text?

    Are you talking about Index3 and "Engine_Type_Text"? The text should display (Index3+1)&"/5"

    So when Index3=2, then the text would display "3/5". Is this not the case?

    It would be a lot easier if you could share the project file.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, so what exactly isn't working? What do you see, and what should be displayed instead?

  • Can you show the events above the "On tap" one? Is it nested under any other conditions?

    Also, please post screenshots of those functions - Change_Details, Details_Update

  • I need to stop when the blue object touches the line, and I thought of doing it via having another global variable and add another conditional check and 3 event blocks?

    Yes, you can add another condition like IsGameOver=0 to all those events. Or you can put them into a group and deactivate the group.

    Also, you need to use delta time in event #2: (direction*100*60*dt)

  • Physics behavior performance will likely be a lot better than your code - events are slow.

    physic filter

    What does this mean?

  • Is there a reason why you can't use Physics and the built-in collision detection?

  • It would be easier to use a single font that supports all languages. Google Fonts have a large selection.

    If you need a spritefont, you can make it yourself with these tools:

    construct.net/en/forum/game-development/tools-and-resources-27/sprite-font-generator-v3-64038

    construct.net/en/forum/game-development/tools-and-resources-27/spritefont-generator-168408

    It is also possible to use different fonts for different languages, but this will require more work. I have a paid template that has this feature:

    construct.net/en/game-assets/game-templates/multi-language-support-c3-2407

  • If you want sliding, use 8direction behavior. You can move the sprite by setting vectors:

    Set vector X to max_speed*cos(angle(self.x, self.y, Mouse.x, Mouse.y))
    Set vector Y to max_speed*sin(angle(self.x, self.y, Mouse.x, Mouse.y))
    

    To detect when the character is behind a wall - use a separate invisible non-solid wall sprite with a larger collision mask. But I think having a semi-transparent copy of the character displayed on top of everything is a much better solution.

  • I can't download your project, it says "Access denied".

    If you want the character to walk around obstacles, you'll need to use the Pathfinding behavior — check out the official examples.

    A simple way to make the character sprite visible behind walls and trees is to make a copy of it (a clone object). Set its opacity to, say, 50%, attach it to the real character sprite and place it on a layer above.