Spawn, translate across the screen and rotate

Trying to get an actor to spawn from the right side of the screen, continuously rotate through 360 degrees as it translates across the screen unless it hits a specific actor. The rotating actor will spawn correctly and appear on screen rotating, but after about 40-60 pixels it travels in the direction it came from back off screen and just repeats this loop. If I turn off the rotation then it translates across the screen just fine. Any thoughts as to the stupid mistake I have made?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Make sure your Rotate behavior is set to Relative to scene.

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

  • HulaPigHulaPig Member Posts: 5

    Not using Pro, don't see that option for my "Rotate" attribute. Currently set for "Counter-clockwise" at a speed of 200.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    It's not a pro feature. I don't use the windows version but on the macintosh there is a drop down menu to choose 'relative to' actor or scene.

  • SocksSocks London, UK.Member Posts: 12,822
    edited February 2015

    @HulaPig said:
    Not using Pro, don't see that option for my "Rotate" attribute. Currently set for "Counter-clockwise" at a speed of 200.

    It is in the Move behaviour that you are using where you need to change Relative from 'actor' to 'scene'.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Sorry, my mistake. That's what I get for trusting my memory!

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

  • HulaPigHulaPig Member Posts: 5

    OK, I have the "Move" attribute set to translate the actor across the screen, right to left, at 180 relative to scene, move type is additive. Then I used the "Rotate" attribute to spin the actor. Seems when I introduce the "Rotate" attribute is when the troubles start. If needed I will gladly pull everything else out of my file and just save the actor and post the striped down version if that would help.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Yes, that would help.

    These behaviors:

    Should produce this:

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

  • SocksSocks London, UK.Member Posts: 12,822
    edited February 2015

    @tatiang said:

    [Steals idea for StrawberryNinja™]

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Socks, it was the subliminal "Should produce this" that must have enticed you.

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

  • SocksSocks London, UK.Member Posts: 12,822
    edited February 2015

    @tatiang said:
    Socks, it was the subliminal "Should produce this" that must have enticed you.

    :p

  • HulaPigHulaPig Member Posts: 5

    OK, got it working, Thanks Socks! Now my other issue. It translates fine, when it gets to the lefthand side the random spawner works and it appears again on the righthand side. Here's the second issue: I now have an actor blocking the path. I want to destroy the spinning actor if it hits the stationary actor (that works fine), but respawn it on the righthand side again at a random time. That part doesn't work. My question: It seems as though I need two spawn rules, one if it translates across the screen and one if it is destroyed. Is this correct? I have both but the destroyed rule isn't working.

  • HulaPigHulaPig Member Posts: 5

    Sorry tatiang, meant to give you credit on that one but was too focused on my text.

Sign In or Register to comment.