~ Issue about constantly spawning an actor ~

FViMaginationFViMagination Member Posts: 89
edited February 2012 in Working with GS (Mac)
Hi everybody,
i jave an issue that i can't solve, but i'm sure its solution will be simple simple...
it'about constantly spawning a platform, i made a Rule that says Platform.PositionX = -240 --> Spawn Platoform to PositionX = 720. in this way the prototype should spawn itself everytime it gets to -240... but it doesn't :(
if I try setting it like Platform.PositionX > -240 (instead of "= -240") the Platform spawns itself, but of course it spawns itself to PositionX = 720 and I always get some space between the platforms.
any help for it? i guess i'm making some mistake in setting the rules/behaviors.
thanks!

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    Hi @francyfranchini

    Try
    When Platform iPad app: End of the Earth –•– http://davidgriffinapps.co.uk/
    ----------------------------------------------------------------------------

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

  • FViMaginationFViMagination Member Posts: 89
    Hi gyroscope, and thanks for your reply!
    i'll give it a try. to be honest, i've tried already that solution out, but i missed the DESTROY behavoir, maybe if i'll insert that behavior too it'll work.
    and yes, platforms are travelling from right to left, landscape mode.
    you can check the issue out on the arcade section, playing Running Bomb game.
  • SAZ_1SAZ_1 Member Posts: 397
    hey man i just had a play with your app on the arcade... i think a simple solution would be to check wrap X on the scene attirbute and have the platform just accelerate to the left... it will automatically pop back in from the right of the screen, that should solve the problem ... also gyro's method should work totally fine, or you could play with a timer and have it spawn so it overlaps as you want it
  • FViMaginationFViMagination Member Posts: 89
    sounds good, SAZ_1, but i'm wondering about all the other actors in the scene that will have to go from right to left and get out of the screen, will they do it if i check Wrap X on the Scene?
  • SAZ_1SAZ_1 Member Posts: 397
    yea they will do it too...umm.. let me think... do you use just one image for the platform?? ... maybe animate the platform to make it look like its moving but its actually not... whats weird is the thing about having it destroy and spawn again should work ..... Fowl Ops has a similar motion going on and i used the exact same rules as in if self.posX is < -240 destroy actor ... if self.posX < 240 spawn actor trees layer at self.posX +478 (this is the exact offset measured by the actor size (which is 320 pixels wide) and it spawns seemless and also your actor is spawned before it destorys itself ... check the video 30secs onwards ...
Sign In or Register to comment.