ChrisBennettStudio's Forum Posts

  • Hello there,

    So I have a Player or Sprite that when the Layout starts I want the camera on him but the scroll to Behavior is zoomed out too far. Any way I can maybe zoom it in closer?

    Thanks in regard,

    Chris

  • Hello there, So I have a game that I've been making but as I've been making it I've run out of Ideas. I wanted to make a sneaking game that you would have to sneak around and find the end of the level in order move on but I think that is too bland and boring.. Any Ideas?

    Thanks in regard,

    Chris

  • Thanks everyone for the replies! Figured out what I wanted!

  • Hello there,

    So I'm making a sneak game so I was wondering if I could add a sound implement? What I mean is, is that if the player (you) doesn't "sneak" within a certain vicinity then the enemy will immediately snap to the player and look for them! Any tips?

    Thanks in regard,

    Chris

  • 1. Line Of Sight > Set Range

    2. The light thing is because you have it set on the UI layer with a different parallax to Game. If you put it on Game layer it will move with the player properly, or move it to another layer etc

    3. The enemies seem to avoid the walls and stuff. If you mean with each other then the solution could be here

    Thanks for 2 man! I'll PM you if you want to help again Thanks again

  • I don't seem to be able to access the capx but :

    1. Line Of Sight > Set Range

    3. Line Of Sight > Add Obstacle

    Try this!

    https://onedrive.live.com/redir?resid=3 ... ile%2ccapx

  • Hello there, So I have to issues I cant Figure out and I'll post the CAPX down below.

    1. I have a couple AI's that will chase the player when in a LOS but it seems as if they can see me from very far away. I don't think that would be fun for my players that play my game type! So I was wondering if I could make it where the Enemies could only see within a few pixels?

    2.This one might be simple to fix but I am new so don't go too hard on me! I have a basic sprite that acts as a light and I did a pin to object and when I start to layout it seems like its completely off as you will see in the Level 1 layout. Anything to fix this?

    3. Last thing I need is probably the more challenging question.... I want the enemies to walk around the map but not through objects! I have followed a recent manual here https://www.scirra.com/tutorials/474/pa ... sight#h2a1 . But no matter how I do it the code will not work. So maybe someone can point me some tips to help me through this?

    Lastly here is the CAPX so you guys can see what I'm doing wrong! https://drive.google.com/drive/u/1/fold ... kstczlQX3M

    Thanks in regard,

    Chris

  • I've done it here in 2 easy events. No need for variables in the end, it relies on the bar width only. Have a look. I've kept your old logic in there but disabled.

    https://dl.dropboxusercontent.com/u/495 ... dited.capx

    You MAY need to relate it to a global variable in future, it's easy to adjust, or you could still rely on the width of the bar if you wish i.e. if width=1 then show character's tired animation, reduce speed etc something like that.

    Thank you so much!

  • I've done it here in 2 easy events. No need for variables in the end, it relies on the bar width only. Have a look. I've kept your old logic in there but disabled.

    https://dl.dropboxusercontent.com/u/495 ... dited.capx

    You MAY need to relate it to a global variable in future, it's easy to adjust, or you could still rely on the width of the bar if you wish i.e. if width=1 then show character's tired animation, reduce speed etc something like that.

    Thank you so much!

  • I can fix up the logic but it'll be later on today. If someone else fixes it in the meantime that's fine, otherwise I'll take a look.

    Thanks man!

  • Either one but make sure it's only one. If you plan to have stamina bars for enemies and other characters then using local variable would probably be best, then linking only the player stamina to the UI bar. If it's just the player that has stamina then just use a global variable. If it's still not working as intended with the global variable 'Stamina' then we can take another look.

    So I'm new do you think you could switch it for me?

    If not thats fine and thank you for the tips!

  • The logic is randomly swapping between a global variable called Stamina which is always between 0-300 and a local variable on player called Stamina which keeps reducing constantly into negative amounts every tick and never recovers. The local variable seems broken, I don't see where it relates to the bar? If you set up two text boxes separately to display Global Stamina and Player Stamina every tick you can see what they're doing. Too confusing for me to look through as it just says Stamina everywhere.

    So should i stick with the global or instance

  • Can you post a capx, or a picture of your events?

    Here hope this works! https://onedrive.live.com/redir?resid=9 ... ile%2ccapx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello there, So I'm making a chasing game and I'm trying to find out why when I hold the shift key the stamina bar's width keeps getting wider instead of smaller.... Could use some help!

    Thanks in regard, AfterLife

  • You are welcome!

    An important note is that maybe there are best ways to achieve similar results. So, you can mess with the code and improve it!

    What I did here is setting a random X and Y location every random amount of time. This location is stored in the two variables and is based on the window size, so the footsteps will never get lost beyond the screen.

    The amount of time you can configure to fit better your project.

    Another important thing is know exactly what you want when the random time is reached and a new location is setted.

    In this case, I wanted that the footsteps turn slowly to the location.

    So, in addition to being always moving forward, the footsteps will, with the lerp action, always turn to the specified X and Y in the screen.

    Edit: Oh, I forgot.. the new location is setted when the timer reaches it's limit, but when the distance between the actual location and the footsteps is less than 30 too. This way, the footsteps will never be stopped.

    Made sense! Thank you very much!