TheEggMaster's Recent Forum Activity

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Thank you for your reply, it does make more sense to do it this way :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey so I'm wanting to know how I can detect if a sprite is in front of him. The sprite in question is a door. I want my player to walk up to the door and be prompted to press E to open. I was wondering how i could do this with raycasting. So cast an invisible line that when it collides with a wall or the door, it sets a variable that says what the cast is overlapping.

    I am making a top down survival shooter.

    Thank you :)

    Tagged:

  • I just meant spawn a tree at x = random(0,800) y = random(0,800) if 0 and 800 are the size limits of the layout, in its simplest form. It would pick a random value for x and y i.e. spawn tree at 43,290. It really depends on what you are trying to achieve.

    Yeah I understand that part, I think I have a solution, if i just give leeway for the resources height and width so that it doesn't spawn anywhere near the layout's borders. Thank you plinkie :)

    I think i should probably learn some more about arrays too, that's another thing i've never quite figured out :)

    - If anyone else has any ideas, they're appreciated as there might still be a better way :')

  • If it's a random location then you can choose between a range of x,y and place it.

    If it's set locations but the items are random you could add the resources to an array and assign them as variables to location sprites.

    There are loads of ways it just depends how the game works. I can't really imagine your game but randomness is easy enough to do.

    I remember once trying the range of x and y, but some were spawning half in the map and half outside. Do you know how I would stop that from happening. I think I might have an idea but not 100% sure. If my sprite is say 96x128 would I make it so on start of layout, spawn object tree at random tree.width, 1920-tree.width for X and tree.height, 1080 - tree.height for Y or am I nowhere near XD

    Thanks for your response :)

  • Hi, something I've been wondering how to do ever since my Construct 2 days is spawning resources in a random place. I'm wanting to create a top down survival game but every time I've tried before, I have always gotten stuck on this. I have tried every way I can think of but none of them are really that good so I'm looking for anybody who might have good way of doing this. I just need them to spawn in random places, respawning I can handle :)

    I would class myself as having an intermediate level of knowledge for the engine. I know quite a bit but I'm no expert so please try and explain in the best way possible :')

    Thank you!

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Thank you

  • You can compare time elapsed between previous and current launch of the app.

    This would be fine, any chance you can give me some info on how to do this then ^

    Thank you - I'll try googling that now I have what its called too

TheEggMaster's avatar

TheEggMaster

Member since 31 Jul, 2014

Twitter
TheEggMaster has 1 followers

Connect with TheEggMaster

Trophy Case

  • 10-Year Club
  • x5
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies