Random spawn actor issue

kajutokajuto Member Posts: 314
edited February 2012 in Miscellaneous
Hi there.! Thanks in advance ! I follow the tutorial of create random spawn actor by tshirtbooth but when I put the actor in the scene it won't start spawning, why? I check everything

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    do you have a Timer?
    did you copy/paste the expressions? … it is better to select the expressions …

    to copy/paste both the expressionEditor for the one you are copying and the expressionEditor for the one you are pasting-in, must be open to do so.

    @};- MH
  • kajutokajuto Member Posts: 314
    I already check them, I just retype in the expression I didn't do the copy/paste.

    I check if all the expression is the same, it is...
  • MotherHooseMotherHoose Member Posts: 2,456
    what causes the spawn to happen? … keyboard key press? … mouse down? … touch is pressed? … timer?

    does it spawn one time? or not?

    @};- MH
  • kajutokajuto Member Posts: 314
    Timer every 0.5 second to start spawning between the expression random (125,1000) my scene wide is 1,440 thats why I put 1000 in Max ..
  • MotherHooseMotherHoose Member Posts: 2,456
    To test things out … I would try with lower numbers in the random (EX: 120.440)

    if you are in iPhone platform, they maybe spawning off-screen …
    also have a textDisplay actor that displays the random number …

    @};- MH
  • kajutokajuto Member Posts: 314
    i did it MotherHoose, but they just appear not like the video, falling from the top side, why??
    how can i control how much the spawn actor show off ? let say...i only want 10 coin to fall only not continuing falling automatically..
  • MotherHooseMotherHoose Member Posts: 2,456
    edited February 2012
    Hooray you got the coins spawning! … now control how many coins on-scene:

    gameAttribute Index Type name coinsSpawned … leave it 0

    spawnActor:
    Rule: when
    Attribute: game.coinsSpawned < 10
    --Timer
    ----do spawn
    ----changeAttribute: game.coinsSpawned To: game.coinsSpawned+1

    if the coin is destroyed … then just before the Destroy behavior
    --changeAttribute: game.coinsSpawned To: game.coinsSpawned-1

    @};- MH
  • kajutokajuto Member Posts: 314
    i did it!! jajajajjaj thanks your are the best! can i bother u a bit more?
  • MotherHooseMotherHoose Member Posts: 2,456
    edited February 2012
    seeing your progress is a joy to me!
    asking for help, is not "bothering" on this forum!

    @};- MH
  • kajutokajuto Member Posts: 314
    How can i create a button that called let say..Start , when the player press it the whole scene start animate, falling object, ect.?? if you need any help or something let me know sweet heart thanks in advance
  • MotherHooseMotherHoose Member Posts: 2,456
    ah … @kajuto … so many ways!

    you might try this …

    -add a scene named PauseScene
    -put Start button there … with behavior Unpause Game

    in the playScene
    -have a controlActor (>Graphics:Visible unchecked) with the Pause Game behavior

    that way your playScene will show … but nothing will be active until player taps Start

    @};- MH
  • kajutokajuto Member Posts: 314
    thanks i did it again thanks to u!


    btw do you know why when the actor spawn fell in the floor the actor somehow follow my main character when he (main character) walk forward...????
Sign In or Register to comment.