Fistmaker's Recent Forum Activity

  • This is exactly what I needed. Thanks! Man do I need to brush up on my math stuff. Wonderful solution.

  • Yeah, you can Pin another sprite to the Object's Image Point and then check for collision of the attached sprite. You can make it invisible if you need to.

  • Howdy again all!

    I'm looking for another solution for an issue I am trying to work out.

    What I want to do is spawn a sprite over another sprite at random. Currently I have created Image points to use as a marker for where things can spawn. Using Image Points 1 thru 5 on one sprite I use Choose(1,2,3,4,5) to spawn one at random on one of the five points. While this works great, I'd like to spawn another sprite over ANY X,Y point of the first sprite without having to create lots of Image Points.

    Is there a way to spawn an object over any x/y coordinate of a sprite? I'd like it to spawn anywhere on the base sprite inside of it's collision mask. Any ideas?

    It seems that I cannot post a direct link as I don't have enough points.

    dl.dropbox.com/u/11063814/SpawnOverSprite.capx

  • While I'm not quite 100% on why this works, I finally do have it working. I think I had too much stuff jumbled around on my event sheet. An extra Include later and it's all working now. I think I was pointing at the wrong text box before, but I went over it again with your suggestions and all is well! Thanks again for taking the time to give me a hand!

  • Ok. I tried to take the text from my input box and transfer it to another plain text box but I'm still getting the same output. I'm not sure what I am doing wrong here. Here is the edited capx.

    Updated SeedGen.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Great! That worked. Now I dont have anymore crashes, but I think I messed up trying to use what you showed me. When I generate a new seed, I'm getting a result with letters with the numbers appended. Example: abba is given, and result is abba1221. I just want the 1221 when it's finished. Here is the capx.

    SeedGen Capx

    I'm very thankful for all of the help so far!

  • This is working great with one exception, spaces. If a space is typed into the text box, the preview and construct2 crash. Good thing I saved! Any ideas on how to fix?

  • After some testing, I have another quick question. If I try to set the seed to a string of text, the result is always the same, regardless of the text the seed is set to. I tried using numbers and it works correctly.

    So, my next question would be, how can I go about changing the string from text to numbers? Is using the replace(src,find,rep) function in the text input the easiest way to do this? This seems to be the only solution I have come across so far. Thanks again for any input!

    Ninja Edit: If replace is the best way, how can I go about iterating over the string?

  • You are wonderful. Thank you! This is exactly what I was looking for!

  • I was looking at the system expressions in the Manual, and I do see a few options for randomization. I was wondering if it was possible to generate a random number by a given variable. I've done something similar in python, and it saved me alot of time and memory.

    I am currently using an array with a random number in each point to generate terrain for my map. Now, because I cannot save a layout, I would need to save that array via web storage, or as a JSON string to be loaded later. I'm still playing with those options, but it's still a learning process.

    If I could generate the same random terrain via a Seeded Randomization, I would not need to store the terrain array, just the simple random seed in web storage. This would be WAY smaller, and save me alot of time.

    So, is there a way to create a random from a seed? Anyone know of a plugin? Or is it possible to request this feature in a future release? Any help would be wonderful!

  • Ah, ok. I have it right now. You can only reference an image point if the Sprite is on that frame currently. I just needed to change the creation of the new sprite AFTER the frame was changed. Simple mistake. Thanks for the Help!

  • I'm having trouble trying to set a Sprite to a specific ImagePoint on a specific animation Frame. Is there a way to Create Sprite at Object.AnimationFrame(4).ImagePoint(4) ?

Fistmaker's avatar

Fistmaker

Member since 4 Feb, 2012

None one is following Fistmaker yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies