AmpedRobot's Recent Forum Activity

  • Actually, never mind! With the 0 speed, it should be manipulatable, just gotta check it.

    Thanx!

  • Ok, thanks, plinkie.

    But what about the other part?

    Is the only way to do this to split the animation into single frames?

  • Is there a way to do this?

    I mean 1 sprite, 1 animation with say 10 frames.

    You decide which single frame displays all the time based on a trigger.

    Is there a way to keep these 10 frames from playing as an animation in the beginning?

    Or from playing from a single frame on?

    Basically to use 1 animation as a holder for say 10 different frames and then display just 1 frame based on a trigger.

  • That is intriguing. And you're right, for all intents and purposes it does look like they have different fire rates, even though there is a slight chance of duplication (about which I don't care).

    The timer is interesting too. Never used, so would've had no idea how to code.

  • Hey, plinkie.

    Believe it or not I tried a few things, but I was wondering what the best programmer's method would be as all of mine seem bloated.

    For example, I thought I could consistently vary the fire rate for each one of those objects

    http://www.darksunpictures.com/public/SAME INSTANCE FIRE DIFFERENTLY.zip

    by making them separate objects (just same animation) and then you can give them different fire rates, but you'd have to track spawns via an array to make sure they spawn in a pretty unique sequence. That seems a bit bloated.

    You could load up one of those red objects (in capx) with a lot of different fire rate variables and then potentially on spawn set each instance to a unique fire rate? Not sure if that would work, but again seems a bit bloated or not sure if the code would work (I try a lot of different things for hours, but most of them end up not working).

    Without that I thought maybe you could set the fire rate value on spawn, but that just changes it for all the ships.

    Isn't there a nifty programmer way that would make this easy?

    Again, all I'm trying to do is make different instances of the same object fire at consistently different rates I could set.

    I believe this is what you suggested initially, different but consistent fire rates for each ship or ship type (not to put you on the spot or anything).

    I went back to this because the problem with all the other solutions is an inconsistent fire rate based on how many ships have spawned or been killed etc which becomes a bit problematic.

    Plus it becomes boring if all ships of the same type always fire the same, and it looks fake.

    So..... is there a programmer's solution to this?

  • How would I set a variable fire rate for the same sprite? (without switching instances)

    So Instance 1 of ship X fires at 0.1 (same bullet for all)...

    So Instance 2 of ship X fires at 0.5...

    So Instance 3 of ship X fires at 0.25...

    I thought this would be easy to do, but it's giving me a devil of a time. I mean they all have the same cd or fire rate variable (and you can't set it to random inside the instance variable), so how the heck do you vary it without affecting all? Is there something like pick current or last instance or some equivalent?

  • OMG, Miraab his sails unfurled!

    <------You're dealing with a 40 year old brain here, so I guess it gets foggy sometimes when I have to deal with new concepts, plus so little brain space left after I had to learn all the other stuff to make this game.

    This is great, thanks.

  • Plinkie, am I wrong, but is this assigning random numbers to the ship types via "choose" and "pick", so they are only sometimes the same?

    I actually wanted the same firing pattern for each different ship type consistently. So say ship type 1 or t1 would only fire green shots, ship type 2 or t2 would only fire red shots.

    Is that possible?

    I guess the question is; how can one compare a specific object type picked via random instance in a family?

    Or is the only or better way of doing this via specific family instance variables setting everything up separately for each ship in terms of firing pattern?

    I guess I was looking for a convenient shortcut if one exists.

    Also, not really sure how to avoid each ship of a specific type from firing the same, some sort of random roller for the cooldown instance variable?

    It gets pretty hairy 'cause I have a lot of different ship types and if you start using similar logic without one all encompassing algorithm things break down.

    That's sort of the boat I am in right now. I designed a lot of different shot spawners, but it's similar logic, so they malfunction when there's multiple ship types on screen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey, guys.

    Just wanted to confirm something.

    I've done some cool things with turret behavior, some unexpected, which turned out to be very cool, but one thing I wanted to confirm.

    Initially, I was trying to set up turret behavior/predictive aim for a family of different sprites/objects, but that never worked.

    The setup seems to work individually per sprite type and then you can group it to a family for other things.

    Is this correct?

    I mean I couldn't get these to do anything as a family behavior.

    Scratch this. I was able to modify plinkie's code to make turrets work as a family behavior also.

    Yei!!

  • Hey, guys or plinkie specifically!

    Alright, here's that capx.

    I'm trying to set up separate ship firing patterns.

    If you'll notice in the capx, there's 4 different ship types - based on color (t1, t2, t3, t4).

    I can't figure out or find on Google/Scirra how to code when a specific ship type (t1, t2...) is picked as a random instance and then link it up to the firing pattern instead of "ship_type" which obviously makes no sense in there right now.

    Only coded 1 firing pattern for now, but pretty easy to change with just copy and paste.

    You mentioned something that "picked instance" exists somewhere I believe, but I've never done it before so no idea how to code.

    http://www.darksunpictures.com/public/R ... _MODIF.zip

    I did this publicly because the pm system is weird. Some of my messages sit in outbox for days.

  • Thank you, plinkie.

    That works great.

  • Could you demonstrate? I had it done with sub-events only, based on logic a layman should think would work. The only difference was the Firing Group was a subevent of System -> Every x Seconds (second condition Pick Random Ships Instance), but it wasn't even picking the instance correctly in terms of timing.

AmpedRobot's avatar

AmpedRobot

Member since 4 Jul, 2013

Twitter
AmpedRobot has 1 followers

Trophy Case

  • 11-Year Club

Progress

11/44
How to earn trophies