**Actor Touch Release Issues (Please Help!!)**

FallacyStudiosFallacyStudios Member Posts: 970
edited February 2012 in Working with GS (Mac)
I'm trying to make some what of a tower defense game. I just implemented the ability to scroll the screen around. After implementing that I had to go back and change any Actor touch pressed to released since it doesn't register until release.

After I click the buy button the things that should happen is any areas that cant have something placed should light up red. If you click anywhere (after already pressing the buy button) it places an object and turns the placing ability back to false (including the buy button back to normal).

2 Issues I'm having with this:

1)When I press the buy button it auto places an object and switches back to false (it should not do that until I click on the screen in the place I want to place it)

2)I have it set to spawn actor at touch release x and y. It keeps spawning it in basically the same area every time. How can I make it spawn in the exact location I release?

Any help would be greatly appreciated.

**I can send the file to you if you would like to take a look if you have an email for me to send it to.

Comments

  • FallacyStudiosFallacyStudios Member Posts: 970
    Please help I am completely stuck and from what I can tell it should work correctly. It has timers preventing the touch releases from registering together. So it should work.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    Hi @FallacyStudios

    It's odd that your touch pressed wasn't working, it sure should of done.... anyhow, you've changed that now.

    1) GSC will only do what you've told it to do! So when you press the buy button, change your boolean to true; and put your when touch is pressed in all the areas that aren't red. So: when touch is pressed (or released)
    ---another Rule within that first touch rule
    When YourBoolean is true
    ---place your item
    Change YourBoolean to false

    If you want the item to be only used once, make another boolean called Bought, and when the item is clicked on in the buy button, change it to true. Then add that into the Rules:

    when touch is pressed (or released)
    ---another Rule within that first touch rule
    When YourBoolean is true
    AND
    Bought is false
    ---place your item
    Change YourBoolean to false

    2) Try setting the Spawn behaviour "Relative to" to scene, that should hopefully solve that problem for you.

    ----------------------------------------------
    http://davidgriffinapps.co.uk/

    iPad: End of the Earth game coming soon to the iTunes App Store....

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • FallacyStudiosFallacyStudios Member Posts: 970
    @gyroscope

    Thanks a ton for responding.

    That's the odd thing, I do have a boolean that appears to be switching at the right times. It was working before I put in the ability to scroll around the screen (used the @Tshirtbotth 's Multiscreen Menus video) As soon as I implemented that I had to switch all of the Actor on Touch Pressed's to Releases. Once that happen the error begun happening and everything I have tried to resolve it does not work.

    2) As for that one sadly it is set relative to scene and is still popping up in weird places.

    I realize it is extremely difficult to understand what I am talking about. I can send you the file (its very small with not many rules in it yet) if you want to take a look and see what I mean.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    Yes, it'd be better if I took a look at your game file; I'll see if I can fix it for you. Either give me the dropbox link in an email to contact [@] davidgriffinapp [dot] co [dot] uk or a compressed file attached to the same email address (which'll probably be the easier option), that'd be great.

    I can't promise I can look at it straight away but will as soon as I can.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • FallacyStudiosFallacyStudios Member Posts: 970
    edited February 2012
    @gyroscope Ok I sent it on over. And whenever you get a chance is great I just appreciate you taking time to help me out.

    Actually it just sent me an email back saying that the email address did not work.
Sign In or Register to comment.