temple1997's Forum Posts

  • .capx at the bottom

    Let me elaborate, I need one number variable to see if another variable equals itself. I have a time system set up through number variables and "Every X seconds.." events, and another set of variables that work alongside a Slider.

    The Hour number is simply a text box that is changing to whatever the value is of the slider. But whenever the player clicks Go, it will record the Hour to a number variable and the AM/PM to a text variable.

    I have an NPC that you can send away to scavenge, you can use the slider to set the hour he comes back for and you can click the AM/PM to toggle it to set what time of day he comes back. When you click go he uses pathfinding to leave the counter and go somewhere outside of the players view, when he arrives at his destination he finds a path back to the counter. He won't move along this path until the Hours and PM in the time system matches what the player set from the Slider.

    [Is HOURS = to (whatever the return number hour is)]

    [ Is AM/PM = to (whatever the return text AM/PM is)]

    I know this may appear confusing and unorganized, so here is a .capx to help. http://goo.gl/ErFiFZ The NPC event sheet is 'Colonists' and the time system is within the 'HUD' sheet. (It's not dropbox, but just click the downward point arrow in the top right corner to download it)

    Thanks in advance!

  • Haha, thanks for finding all these bugs. I'll be sure to work on them, and the left door is just a fad; it's not an actual door, yet. The Z order thing COULD actually be the problem, I'll look into it. Thanks!

  • It's driving me insane, so any support would be highly appreciated, thanks.

  • Hey, so I'm using a save and load function within my game; it works fine but there's a weird bug with loading. You can save and load your last save whilst in-game, but there is also a load last save button in the main menu. The bug is that when you save and then load the save from the main menu, a random selection (usually just one thing) doesn't load in properly. It will physically load in, so my character collides with it and can not pass through it, but visually it won't load.

    The most I can do in terms of showing the bug is letting you try get it for yourself. goo.gl/L5sxbw This is an NW.js export of the game so far, it's no where near finished; but the problem still happens even in export so you may as well test it there.

    (It's not dropbox, but just click the downward pointing arrow in the top right corner to download the game)

  • I was actually using the Canvas for a dynamic shadow effect, but I've decided to scrap it so if it fixes my save problem; then that's perfect! Thanks everyone!

  • :bump:

    Nobody?

  • 1. I have tried it in an empty template, and it works fine. It's just this template.

    2. I'm not using the debug mode, I haven't tried an exported version yet though.

    3. I have looked at tutorials and followed them, that's when it broke and I tried it on an empty template.

    I've upload a .capx if it helps, I just prefer to do that as a last resort because I've heard of people stealing people's work.

    Also, correct me if I'm wrong. But do these save/load functions work in the way that you can save the game, close it down and then load your game again?

    .capx: goo.gl/7GzP5j (the forums won't let me post the original link without shortening it and making it inaccessible)

    (It's not DropBox, but it's pretty simple. Just click the downward pointing arrow with the line beneath in the top right corner)

  • I'm trying to set it up so that the player can now Save and Load the game, just like every other game out there. The problem is that when I test it the game just freezes. It doesn't crash, it doesn't start to not respond; it just freezes. The actual Construct 2 engine is fine, it's my game that crashes.

    Here's the part of my event sheet that handles saving and loading, although I haven't even had the chance to test loading because it freezes.

    Any help and/or suggestions would be amazing, thanks!

  • Thanks, plinkie, that did it!

  • It's happening around my game a lot it seems, as an example. I have a function where you can trade creature skins for money, the UI tells you how many skins you have remaining (all this works fine). When you have enough money/skins it will give you the item but also play a sound effect, if you don't have enough money/skins it won't give you anything and play an error sound.

    The problem is, if the player has just 1 creature skin the system reads they have at least 1 and trades it for money. At the same, it seems that because it reads how many creature skins I have it also reads that I have 0 because the purchase function is taking one off me when I do have one. This then too plays the error sound, so basically whenever I have one of something left and purchase something taking the count to 0 it plays both the purchase sound effect and error sound effect.

    Any help would be greatly appreciated.

  • SOLVED, solution in Edit at bottom post.

    Hey, can anybody help me? I've managed to use this plugin in my game, it works really well. But for what seems like no reason whatsoever, the shadow casters (the 'p' sprites from the example) aren't being moved to the object's corners. It's really weird and annoying, can anyone help?

    I just copied the events and actions across from the example and changed the objects to what they need to be. It finds the right object, finds generally the right corners but then just doesn't move the shadow casters ('p') to them. It's almost like the math within the actions is just a little off, but it works fine in the example and this is the same everything as that! If anyone can spot what is wrong, that would be super helpful.

    EDIT: I figured it out, it's because the sprite's only image point was in the Top-Left. This breaks it, it has to be in the centre unless you want to play around with the actions and fix it. To fix it is fairly simple, when it spawns the ShadowCasters ('p' from the example) it spawns them at the sprite's 0 image point. So just make another image point on your sprite and set it to centre, then where it says "Image Point:" in the settings for "Spawn another object" put the number of the new image point.

  • Thanks, CloveltOc. I tried a few things, played around and managed to figure out how to use Line of Sight and Pathfinding to randomise movements when not aggro'd and then attack the player when aggro'd anyhow.

  • So I'm working on a top-down game where enemies randomly spawn so far out of the players view, but until the player gets so close the enemy AI will kind of wander around at random intervals. Like it will just be stood still for a second or two, then randomly turn around and walk in a random direction for a few seconds then stop and do the same in another random direction until the player comes into it's aggro range.

    Any suggestions would be incredibly helpful!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks all, I think I figured it out using your help.

  • Let me explain, I'm working on a top-down game. In the HUD there are coordinates and a 'Location Name' text object. Just as a placeholder whilst I get all of the mechanics working I'm testing between three locations, the Spawn, the Safe House and the Wilderness. My character detects where he is by overlapping objects, meaning that I have invisible sprites that the character overlaps to tell him where he is.

    At the moment the only two specific locations are the Spawn and the Safe House, I'm trying to get the character to automatically locate empty areas as 'Wilderness' using the Else event. It works when there's only one specified location, but when I add any more it won't automatically set empty areas to Wilderness. It just doesn't detect anything, it get stuck on whatever location he was last on; but I can still walk between specified locations with it telling me what it is, just not the Wilderness.

    (The Blue is the Safe House, the Yellow is the Spawn and the empty grey is just nothing: where the character is supposed to figure out it's 'Wilderness'!)

    Any suggestions?

    EDIT: Fixed the event sheet image.