**Actor Touch Release Issues (Please Help!!)**
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.
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
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
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.
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
Actually it just sent me an email back saying that the email address did not work.