Wertle's Recent Forum Activity

  • Is there way to get the count of a certain subset of instances without picking them?

    Like, if I wanted to get the number of sprites with instance variable x set to y to use that number in a comparison, could I do it without actually picking the instances and using PickedCount?

  • I just realized that in spite of being on the forums off and on for nearly a year, I've never posted an introduction :O

    I'm Wertle, and I've been a professional game developer for ~5 years now, working primarily in the AAA space. Before working in games, I worked in the theater, worked as a web app developer (back when a web app was something made with PHP and mysql), and did general art and computer science type things.

    I learned about Construct 2 from this blog post on a developer blog to which I contribute. I use Construct 2 primarily for fast prototyping and for doing game jams and personal side projects, where getting an idea up and running fast is really important and where this program shines. I have a personal license and also convinced my company to get a business license to use it as a prototyping tool among other things.

    Happy to be here!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just to follow up, tokenat() is used if you want to break up a string that is delineated by a common character. So for example, if you had a string that was like "coffee,tea,cakes,biscuits," that is delineated by commas.

    If you wanted to get, say, the third item in that list, you would do tokenat(list, 2, ","). That says "get me the third (remember indexing is 0-based, so it's 2 and not 3) object in the given string where the objects (or tokens) are separated by a comma"

  • In this case I don't think you need tokenat, just find()

    find(sentence, "tea") will return the index of the first time it finds "tea" and -1 if it doesn't find it at all.

    If you just wanted an event to check if it existed or not, you could do System-> Compare two values.The first value would be find(sentence, "tea"), then check if it is NOT equal to -1. The event will fire if the text is found.

    EDIT: Note, you have to be careful with this, because let's say you had the word "team" in your sentence. It would find "tea" and then return that it found something.

  • Sounds like you would need to get the vector of the wall facing and use that to calculate the new angle on collision, but I'm not sure if/how you can get that information.

    You may want to investigate the custom movement behavior's "push out solid" action.

  • Problem is i want to stop these all duplicate instances on their same Axis if any one of them reach in the middle of screen but it is not working it overlap each other till they don't reach in the middle of screen.

    Could you clarify what you mean by them overlapping each other until they don't reach the middle? I'm not clear on what is happening. If you could upload your .capx file it would really help.

    Also, how are you detecting when they've reached the middle of the screen? If you're doing it by collision with another object, you may need to add a "pick all" event to pick all the other bullet sprites. Otherwise your action will only affect the one sprite instance that did the colliding.

    I made an example here but I'm not sure if it's doing what you want from your description.http://storage.wertle.com/construct2/bulletThing.capx

  • One thing I do to sort of get around this is use a sprite called "Camera" with the scroll to behavior. I set this sprite position to my character when I want the scroll to on him, but if I need to cut away for whatever reason I can move the camera sprite. If I need to turn it off altogether I just destroy the camera, then spawn a new one and re-attach when I need scroll to again.

    This way you can still keep that handy shake :)

  • I was able to get this to work by putting the sprite into a family and then comparing against the family, like so. Would this work for you?

    http://storage.wertle.com/construct2/overlap.PNG

  • Wooo doing that makes the gamepad work! Yay!

    It's still bizarre that the other way has a discrepancy when using the gamepad. Do you think I should write a bug for it?

  • I'm not sure if this is a bug so I'm going to try here first.

    I have it set up so a sprite moves around on its own, and you can stop it and turn it with either mouse clicks or trigger buttons on a game pad.

    However, when you turn the sprite using the game pad, when you let go the sprite returns to its previous angle instead of the new angle. This does not happen with the mouse.

    I am mystified because the mouse input and gamepad input are calling the exact same function. Any idea what could be going on here?

    http://storage.wertle.com/construct2/AngleProblems.capx

  • Yeah, I started off with the .capx when it was a small prototype, but it's really grown enough that I should break it out into a project folder.

  • I figured as much. Moral of the story: Submit to source control often and never mess around with submitting/reverting early in the morning.

Wertle's avatar

Wertle

Member since 23 May, 2012

None one is following Wertle yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies