2 Actors spawning simultaneously

I've been trying to get a spaceship in a shoot 'em up to shoot 2 projectiles at the same time, but instead, I get one projectile SLIGHTLY ahead of the other, but enough to be noticeable by someone.

This is what I want:
image

This is what I get:
image

Could there possibly be something in the order of what I did that could've caused this?

Having trouble with your game? Sounds like a personal problem.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    Could there possibly be something in the order of what I did that could've caused this?
    Almost certainly.
  • ADSentertainmentADSentertainment Member Posts: 397
    edited December 2012
    Is there any way to make it so the 2 spawn attribute actions are executed at the same time? I tried putting them in a group, but that didn't really work

    Having trouble with your game? Sounds like a personal problem.

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    Is there any way to make it so the 2 spawn attribute actions are executed at the same time?
    Just spawn the two projectiles at the same time and they should be in sync.
  • ADSentertainmentADSentertainment Member Posts: 397
    Is there any way to make it so the 2 spawn attribute actions are executed at the same time?
    Just spawn the two projectiles at the same time and they should be in sync.
    This is what I did:
    image


    If game.Firing was true, then they should both spawn at the same time, shouldn't they?

    Having trouble with your game? Sounds like a personal problem.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Behaviors fire in order, one after another. So technically, they should be split seconds apart. I don't know the actual timing (e.g. 0.0001), but it's not parallel. In a similar game I made, I did exactly what you did and didn't notice any issues. If you're having problems with double shots, you might set up two rules with the same condition and have a spawn behavior in each rule. That should ensure parallel firing of the behaviors.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Member Posts: 12,822
    This is what I did:
    It's not clear why you have the audio and the spawn behaviours in a timer . . . but I'd start by getting rid of unnecessary code / complexity.

    (if there is a good reason for the timer then ignore me).
  • ChakkuChakku Member Posts: 1,513
    @ADSentertaintment

    Yep, do a timer that says "After 0.25 seconds fire projectile 1" "After 0.25000000000000001 seconds, fire projectile 2"

    Hope this helps
    Chakku
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @Chakku, I think @Socks' point is that the timer is probably not necessary. If you're spawning an actor, you don't need a "for" timer at all. Same with the audio, most likely.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • ChakkuChakku Member Posts: 1,513
    @tatiang

    Yep, I see what you mean. I also know that GS loads the stuff at the top first, but if that was not working properly for him, then I suggested that he do a timer where the behaviors are separated by 0.00000001 seconds.

    Hope that makes sense
    Chakku :)

    @ADSentertaintment

    Did it work?

Sign In or Register to comment.