Yttermayn's Forum Posts

  • Is there a way to display the sprite's animation in such a way that it stays facing one direction, independent of the sprite's angle variable? My MOB's AI uses the sprite angle a lot, but if I do 3/4 view I need the sprites to remain standing "upright" and not flip all over when changing direction.

  • alextro That's what I've ended up having to do. Thanks.

  • DatapawWolf Thanks, folks. Looks like I'll be going that way as well.

  • Ok, so it kind of sounds like I might have to do something like this: All MOBS are actually just one object. The dungeon generator/mob spawner will spawn a "generic" mob and set some kind of mob index variable. An "on object created" event will then tweek the generic mob's stats, animation set, and sound set according to the "mob index" value to make a particular type of mob out of it.

    Anybody see any pitfalls in this approach? I am pretty sure you can select animation sets by number, but I haven't worked with sound much yet.

  • megatronx Tease! Well, good luck anyway.

  • Ok, megatronx . Now I'm curious. What is the nature of this special something? I've been using C2 for over 2 years now and I keep discovering new things it can do. I imagine the shortcomings are either 3d related or inability to use some sort of io device maybe?

  • Have not got to the point where I'm selling anything, but I intend to try to put my stuff on Google Play and maybe Apple store. I think that as with anything you are trying to sell, marketing/advertising is going to have more to do with your success than which distribution service you put it on. I intend to go to the places (forums and such) that my target audience hangs out in and tactfully show it off to try to get a little buzz going on it. Couple that with reasonable prices and being sure to be responsive to customers and potential customers and I would expect it may get some traction. Last and probably best, make sure the product is awesome! Word gets around, good and bad.

  • Colludium Lol, no problem. And yes, that was a joke- with the joke tag (jk). If you just spell out "joke", folks don't get spun up enough to get funny.

    jayderyu Thankyou for the well thought out reply. Unfortunately, I'm only understanding about a third of what you are saying. I get that in your first example (atrocious, horrible, disgusting!), that we would have a function set up that would take the variable and create an object, chosen by that variable, then fill in all the appropriate instance variables.

    For your last two examples, why do we need to set values of common family variables? Aren't the newly created objects inheriting those values from the family's set?

    Note: regardless of how they are created, each mob type will have to have the values specific to that type set in it's own "on created" block. Does this help, or make it more confusing?

  • When you use create object to create a family object, you get a random member of that family. I request that make it non-random by using an optional variable that will be treated as an index to the specific family member you want. If the variable is left null, then you get random selection still, so we don't mess up projects that utilize this random decision.

    This would allow greater flexibility in projects that do a lot of procedural generation, along with I'm sure many other applications.

    Example:

    One of my projects does a lot of generating and destroying of enemy mobs. All the different types of mobs have lots of instance variables and behaviors they inherit from a common mobs family. When a map is saved (not a whole game save), the save routine has to record into an array all that data for each mob. The load routine has to then recreate those mobs from the saved data when the map is loaded back up. With the create object action as it currently is, there will have to be a create object action and associated supporting lines for each member of the mobs family. With a new variable, there would be just one create object action with a value for the family member index.

    I would like to see this implemented by friday.

    (jk)

    I will be ponderously working around this problem, but I thought it might be useful for other users and future projects.

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • blackhornet Oh, I see what you did. I hadn't looked at the first example, so I was confused by it's presence in this example, plus the two different animation frames for the same sprite. I get it now, so like I said in the above post. That's awesome, and much simpler. Thank you Blackhornet!

  • blackhornet Hmmm, so if the same sprite is in two different families, and an instance of the sprite collides with another instance of the same sprite, it will trigger an event as a collision between a member of family A and family B? I loaded up your double family example and maybe I'm reading it wrong, but it seems to show a collision between two *different* objects from the same family? I will experiment a little...

  • blackhornet Weeellll, it turns out the two objects in question are mobs in the same family. How does that change things?

  • How would you go about getting the angle() between two instances of the same object when they overlap? I'm having difficulty isolating each of them. I want it so that when they overlap, they are moved a couple pixels directly away from each other. I figured that if I get the angle() between them and move one in a positive and the other in a negative direction, that will separate them.

  • newt Kurz So it sounds like >,<,etc is faster than division, and getbit() is faster than both? If I got that right, which bit is the sign?

  • I realize you could divide the number by its absolute value and that results in a 1 or -1. Is there a computationally cheaper way to isolate the sign? Like maybe could you use getbit() in the most significant bit? (I'm guessing that's where the sign of an int is stored). Or maybe is a condition in C2 that tests for > or < zero faster than division?