Cam112549's Forum Posts

  • Okay, thank you very much for the explenation. Though the tutorial I linked should explain what I did well. Sorry I didn't explain well enough. Basically, for the crafting, every object that is going to be crafted has four instance variables: The name of the first resource it requires, the amount of the first recource it requires, the name of the second recource, and the amount of the second recource it requires. So I created a function called "Craft" and have it pass the four instance variables as parameters. So I check if the player has equal or greater wood than the crafted obects wood requirement, and do the same thing for steel.Then if the player has enough of both it crafts it. Althoug, it doesn't actually craft anything right now, it just deletes the placeholder object mini_Sword. Please tell me if this explenation was satisfactory. Thank you again.

  • So, I created a text-based inventory based on https://www.scirra.com/tutorials/583/easy-inventory-using-an-array this tutorial. That went down smoothly. After mulling over the tutorial, I had a couple of array breakthroughs. My interest was very peaked. So I thought I might try a crafting system. Holy crap, I have had no luck. I've tried making one from scratch a couple times, but I'm stuck, and have made no decent progress. This https://www.dropbox.com/s/2yavzzsx7u8hoif/CraftTest.capx?dl=0capx is the best I can come up with. From what I can tell the code should work? I'm just hoping one of you can help. Thank you very much in advance. Have an awesome evening.

    Edit:

  • Here's the new capx, doing what you said: https://www.dropbox.com/s/wwzckg0gohio3 ... .capx?dl=0

    It's only spawning one, in a random order intsead of both, Green -->Blue. Is there any way I can have it spawn the green, then blue, without having to code it manually for each? Thank you, sorry for being a bother.

  • In the capx below, I tried to have the game spawn the green ship, then the blue ship, based on their "Distance" from the player ship. I created a family for the enemy ships, and made a family instance variable called "DistanceX." Every second I subtract one from each ships DistanceX. The ships start out with different DistanceX's, so it will take one longer to reach zero. I wanted it to spawn each ship when it's DistanceX = zero. But they're different instances of the same object, so i used the "For each" loop, and I don't want it to spawn a million times so I used "Trigger once while true". No matter what configuration I use, it either spawns both at the same time, or spawns them in a random order endlessly. if any of you know what is wrong, or how I can acheive the desired effect, I would love it. Thank you so much, in advance.

    Link to capx: https://www.dropbox.com/s/wl6cj3urjhk96 ... .capx?dl=0

  • AllanR I fixed it thanks to your help. I compared vectorx to see if it was positive or negative and it works! Thank you so much

  • I recreated the bug again using the platform behavior, seeing as it doesn't mirror automatically, but it still does it. Here's the sendspace link: https://www.sendspace.com/file/tq6rgw

    Edit: Fixed!

  • I've experienced this problem while working on a personal project, but I recreated the problem In an example .capx. So I have a sprite that has the 8 direction behavior and it is set up so when I press the left arrow, it sets the sprite to mirrored and when I press the right arrow, it sets the sprite to not mirrored. Anyway, the problem is, when I hold left arrow and right arrow at the same time, it always sets itself to be mirrored no matter what order I press the keys in. I'll try to explain better what it's supposed to do, so if i'm holding down the right arrow to move right and I press the left arrow to stop the sprite it should stay un-mirrored, but if I do that it still sets it to be mirrored. Sorry if I'm hard to understand, it's like three am and I've been trying to fix this all night. I was hoping one of you knew how to help me with this, Thanks in advance <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> https://www.dropbox.com/s/e3dvsd8eauafb ... .capx?dl=0

    Edit: Fixed!

  • Thank you I really appreciate it.

  • I don't know if my code is wonky or if this is a bug of some sort, but my npcs are not moving although they should be. Any way, I can't figure out what's wrong so I might as well post the .capx. Thanks. https://www.dropbox.com/s/j2fzvrip0uf3c ... .capx?dl=0

  • Okay, Thanks again guys

  • Try Construct 3

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

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

  • whether it be with the physics function, or just with code, I was wondering if there would be any way for me to create physics for a glider. like in learn to fly. http://armorgames.com/play/3789/learn-to-fly. I was wondering because I wanted to make a game involving a paper airplane, and this would apply.

    Thanks <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • It's no problem, also I was just telling you the controls for the .capx i sent you. Glad I could help

  • Thank you, I never considered that. I was busy trying to think of something I could do strictly with coding, I really appreciate it.

  • This might help you.

    WASD- Left guy

    Arrow Keys- Right guy

    https://mega.co.nz/#!7xV3UBID!WUV7rUU6y ... IeEaKosWFA - File hosting