Behavior Not Working Outside of Starting Screen Area.

polarpanda16

  • Posts: 83
First off, the behavior that isn't working involved spawning actors when the screen is touched(clicked) inside of a region.
When testing my game in the iOS simulator I came across a problem in the spawning of actors. I have a feeling this is due to the fact that my scene is larger than an iOS screen both horizontally and vertically.
The behavior itself works fine when I click on an area inside the region as long as it is within the area of the scene that is originally loaded. As soon as I scroll the camera to another area of the scene and attempt to spawn another actor the actors no longer spawn, even if it is in the region. I did attempt removing the region requirement, but that had no effect.
Check out my apps and other apps on the iOS App Store by searching Double Trouble Studio! Publisher of A-Mazing.

https://itunes.apple.com/us/app/a-mazing!/id542958150?

https://itunes.apple.com/us/app/drag-on/id568944870?mt=8

dtrungle

  • Posts: 1938
Post your codes. This could be due to the region configurations or the touch coordinate values.

polarpanda16

  • Posts: 83
I'm still not to good at coding so this is in block form.

Check out my apps and other apps on the iOS App Store by searching Double Trouble Studio! Publisher of A-Mazing.

https://itunes.apple.com/us/app/a-mazing!/id542958150?

https://itunes.apple.com/us/app/drag-on/id568944870?mt=8

dtrungle

  • Posts: 1938
Enable debug drawing and see if the region is actually there. Then use print statements to see if your region clicks are registered. Then use a print to see if an actor is created.

polarpanda16

  • Posts: 83
I did all of that, thanks for the help, but as soon as a scroll to another part of the scene regardless of whether it is in the region no actor will spawn upon click.

When a scene is started is the area offscreen disabled?
Check out my apps and other apps on the iOS App Store by searching Double Trouble Studio! Publisher of A-Mazing.

https://itunes.apple.com/us/app/a-mazing!/id542958150?

https://itunes.apple.com/us/app/drag-on/id568944870?mt=8

dtrungle

  • Posts: 1938
So when you moved the camera, did you move the region with you? When the camera was moved, none of your print commands activate?

Actors outside the viewing screen (camera) are put to sleep by default. If you want them to always be awake, set them to always active/simulate.

polarpanda16

  • Posts: 83
The region takes up most of the scene in the editor, so it should not need to be moved in the simulator. Would this still be a problem?

Yes when the camera move none of the print command activate. The only thing that still functions when I click is a button locked to the screen that toggles whether or not I can spawn an actor but that is useless if I can not put it spawn one in the first place.

I went through most of these things before posting but could not figure out what was wrong, got desperate and posted originally.

Once again, thanks for the quick replies, it is very helpful, even if the problem still exists.
Check out my apps and other apps on the iOS App Store by searching Double Trouble Studio! Publisher of A-Mazing.

https://itunes.apple.com/us/app/a-mazing!/id542958150?

https://itunes.apple.com/us/app/drag-on/id568944870?mt=8

dtrungle

  • Posts: 1938
Did you make sure BUILD is true? That SCORE is > 100?

When you click, can you for certain know that you are indeed clicking in the region? (enable debug draw)

Is this 3.0 or 2.2? The event you are using or the region may be bugged at this point.

polarpanda16

  • Posts: 83
Yes, I do know that BUILD is true and the score is great enough. The behavior functions correctly as long as I do not scroll to an area of the scene that is not in the initial screen size (Whatever the dimensions of an ipod are).

As soon as I scroll back to the initial scene area the behavior will continue to work.

This is 3.0
Check out my apps and other apps on the iOS App Store by searching Double Trouble Studio! Publisher of A-Mazing.

https://itunes.apple.com/us/app/a-mazing!/id542958150?

https://itunes.apple.com/us/app/drag-on/id568944870?mt=8

dtrungle

  • Posts: 1938
I created a test game and found no problems. I used the same event and used a region attribute. I started the game with the region shown and then I had the camera move. Clicking the region before and after the camera movement has the same result.

Create a sample game that reproduces your error and attach it please.

polarpanda16

  • Posts: 83
It could be how I scroll the screen....

Here:
Check out my apps and other apps on the iOS App Store by searching Double Trouble Studio! Publisher of A-Mazing.

https://itunes.apple.com/us/app/a-mazing!/id542958150?

https://itunes.apple.com/us/app/drag-on/id568944870?mt=8

dtrungle

  • Posts: 1938
I tested your game, as long as I clicked in the region, it spawns and prints to the log. However, when the camera was not at the origin of 0,0 the spawned actor is not at the point of click. To fix this add (+ X/Y of Camera) to X/Y of Mouse.

polarpanda16

  • Posts: 83
For some reason I am still running into the problem, I'm going to have to look at my simulator to see if it is a bug. Is there any change you could give me your original test to see if it differs from mine and if any changes to mine fix the problem?
Check out my apps and other apps on the iOS App Store by searching Double Trouble Studio! Publisher of A-Mazing.

https://itunes.apple.com/us/app/a-mazing!/id542958150?

https://itunes.apple.com/us/app/drag-on/id568944870?mt=8

dtrungle

  • Posts: 1938
I attached your example game with the modified +x/y of camera. The spawning works for me as 'Test Game' and as a swf file.

polarpanda16

  • Posts: 83
 Just tested it on another computer, which only has 2.0, as well as on my computer using 2.0 and noticed it does work on both, just not on 3.0 for me.
Check out my apps and other apps on the iOS App Store by searching Double Trouble Studio! Publisher of A-Mazing.

https://itunes.apple.com/us/app/a-mazing!/id542958150?

https://itunes.apple.com/us/app/drag-on/id568944870?mt=8