lionz's Recent Forum Activity

  • The object 'Enemy' moves towards the center of the screen using the 'rex_moveto' plugin, and when overlapping (not collision, sorry) the object 'Player', triggers the 'moveTo' below the screen (in pixels) and is destroyed. If I hit the keys extremely fast (one of the challenges of the game) the object 'Enemy' continues his path along the X axis passing the object 'Player' and not detecting the overlapping (what I was calling collision).

    I'm afraid I'm not using the proper method for this 'moveTo' because, I will need the movements (and all of its events) to be made from point A to point B, in one key press, regardless how fast the user hit the keys.

    After some investigation I figured out that the reason for this is because they're set to 'Die' on collision with player but also are asked to move across X when the player presses left. This means they move and play die animation at the same time, the move angle of 0 overrides the die angle of 45. I fixed this by putting in the On EnemyMove logic, you check enemy is not playing the die animation. This works well.

    In terms of the gameplay, is it not better to have the enemies moving towards the player after an amount of time, not when the player is pressing the left arrow? Although I can understand if this is just temporary functionality.

  • How would the player choose what happens on touching a power up+inactive room from a visual perspective?

  • There are probably better approaches to some of the ideas in this game, you can ask in the Feedback section. You could just start a new topic for this game. If you are having real problems with the MoveTo plugin you can find the topic for MoveTo and ask in there as plugins are considered separate and usually you will have to go to the person that made it to ask about its functionality.

    Note that when you're moving a sprite you can just move it X and Y with 'Set X' 'Set Y' 'Set Position' without the use of plugins.

    • I don't understand why I can't call a function I named "Spawn";

    You're calling the expression Spawn, not the function Spawn.

    • on start of layout, some objects detect collision even though they're not 'in collision';

    You've set it up so that sometimes an enemy can spawn on top of the player based on co-ords.

    Can you give more detailed example of what you think is wrong with the collision in terms of 'failing'?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah you can use after X seconds, or timer plugin if it needs to be more complicated. I guess the actual attract could be a different layout you cut to with its own events that loop around until a button is pressed.

  • I read everything in the thread actually and fully investigated it. The example from Prominent is exactly what I described and accurately GUESSED you were doing. I checked the .capx. You shouldn't set the object to Global and put it on a Global layer, it's flawed logic and it's as designed in C2.

  • Put the objects on a layer set to 'Global=Yes' then, every time you use that layer, on loading the layout all of the objects will be in the same original place. You can make this global layer on its own layout too, that is outside of the game flow. Position your objects here and make it global.

    Edit: Just realised, if you're talking about purely so you can paste them into view to mess around with in layout view, you could lock all of the layers except the one you want, Ctrl+A, copy, paste in new layout.

  • It's because you set the object on the global layer to global so every time you switch layout it's doing the following :

    Go to Layout 2 > Load Global Layer with Global Object 1

    Go to Layout 3 > Load Global Layer with Global Object 2, Global Object 1 remains as it is global

    Go to Layout 4 > Load Global Layer with Global Object 3, Global Objects 1 and 2 remain as they are global.

    If the HUD elements are going to be updating between layouts and it's important that they persist then just make every object on the HUD a global object. If you want to do it with a layer then do not make the objects on the layer global, only the layer.

  • Well it sounds like it is working except for the very last bit which could just be a few tweaks with the logic. Does the pathfinding work if the enemies are actually spawned inside the layout with the current logic? i.e. is the pathfinding logic working on its own? Does it work for a single enemy?

  • On clicked

    If frame0 > Wait 0.1s > Set frame1

    If frame1 > Wait 0.1s > Set frame0

    Something like that you mean?

    If you're just using a single object you can use 'Compare Frame' > 'Set Frame'

    The wait is so that the variables don't try to change each other at the same time and you get stuck in a loop.

  • I assume they have the same name and are 4 of the same object in which case updating animation will update for all. You need to create 4 separate objects (right click-clone object type) and they can have separate animations. Alternatively you can pick by UID of the 4 objects and set different animations that way. If you've done something different to this then please post a screenshot of the events.

  • OMG this looks amazing. Use it to make a rogue-like RPG, I love them

lionz's avatar

lionz

Member since 5 Aug, 2013

Twitter
lionz has 79 followers

Trophy Case

  • 12-Year Club
  • 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
  • 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
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

25/44
How to earn trophies