easyDoesIt's Recent Forum Activity

  • I have setup a platform game where the player walks between layouts. There are also characters walking around that move between layouts. All layotus work on the same time, so if you come back to a lyout 1 hour later then 1 hour of time should have passed. Initially I have set the players and characters to be global and use an array to record their position so if the player leaves layout1, enters layout2 and then comes back to layout1 the characters will be in the same position and keep on doing what they need to do.

    My issue is that I want the characters to keep moving even when they are on a different layout. My tried solutions so far are;

    1. Each person has a path (in an array) they follow which has key stages (each with coordinates, a layout, and a time) that determines where they should be any time in the game at intervals of say 30 seconds. So stage 1 start here at this time, stage 2 walk here at this time, stage 3 idle around here at this time, etc. When a character is on the current layout, the character does all these activities one after the other in realtime, no problems! using behaviours. When a character is not on a layout, their coordinates are changed each time the path "time" is reached for each stage, then when the player returns to the layout, the characters are simply re-positioned to this position.

    Problems with this is when the player returns to the layout of the character in between 2 stages of the path, the character can either move to the start or end location of their current stage in the path, making them jump to locations. If the players exits and enters a layout quickly enough the characters will keep jumping between stages rather than starting off where they were when they left the layout.

    2. Record the time the player leaves a layout and then again when they come back to the same layout. The game then resets the time back to when they originally left and fastforwards (time scale set to 10) to the current time by changing the time scale. All the characters will therefore move around fast for a few seconds (can hide using a layer). This seemed like a good solution but the issue I have with this is the fastforward often causes the characters to over exaggerate simulation movements or delays trigger to behaviours than if the timescale was set to 1. Causing issues with the characters travelling to their correct cooridinates to trigger next stage in path.

    3. I haven't tried it but when a character is offscreen I could calculate where they should be every tick, but this would be quite complicated on a multilevel platform (think hills where X&Y positions change constantly). It would work but...... must be a better solution and not so code heavy.

    Is there another easier solution I am missing? I feel I am over-complicating it.

    Tagged:

  • Oh yes, didn't realise it didnt need to be defined as string. Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    I am unable to move from one layout to another using a global variable as the name. The one highlighted in the image below. Is this a bug?

  • Yes, that was it. Should be 0 not 1.thx dop2000

  • When I touch a object, I want to either

    1. pick the 1st instance, if there are multiple ones where I touch OR

    2. pick the only instance, if there are NOT multiple instances where I touch.

    I then do some actions to that particular instance.

    To do this I use "pick instance 1", however if I just touch one instace, it doesnt pick any. If I don't use "pick instance 1" then I cant pick one instance from multiple ones I touch.

    If I use else, I then have to repeat the action or introduce a function. Is there a way to do this more efficiently?

    Am I missing something?

    Tagged:

    Have you had a look at https://www.construct.net/en/make-games/manuals/construct-3/overview/publishing-projects. Try the tutorials at the bottom of link.

  • Thanks all, very useful info.

  • Oh ok, seems obvious now. Thanks plinkie

  • I am sure I am missing it but I cant find any documentation on how to use this? Should I be using this for button or "icons" instead of just creating objects and why?

  • Thankyou , I missed that tor some reason

    Thankyou dop2000, that's a much cleaner solution and good to know about the wait action. Very handy.

  • I have a dictionary that gets saved to local storage every X minutes.

    When the game starts I want it to load the dictionary from local storage if it exists. If it doesn't exist (ie the game has never been started before) I want to load the dictionary from a game file.

    Problem is

    1. There is no event "if doesn't exist" and

    2. It takes time to check exists so I don't want other events to continue until it is checked and loaded.

    Link below is to an example capx of where I have got to but not working 100%. Any help appreciated

  • Thankyou dop2000.

easyDoesIt's avatar

easyDoesIt

Member since 3 Feb, 2018

None one is following easyDoesIt yet!

Trophy Case

  • 6-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

8/44
How to earn trophies