How Can i Spawn and drag actors into scene?

DarkUndeadSpawnDarkUndeadSpawn Member Posts: 64
edited July 2012 in Working with GS (PC)
Hello,
I would like to ask?

How Can i Spawn a actor then drag it anywhere i want?

Then Highlight the actor when it becomes selected. And Everytime its selected i press another button to rotate that actor in 90 degree angle. And to also have a spawn limit of how much you want to spawn.. Im on the windows version of gamesalad so i can't download any type of templates for gamesalad if it was made on the mac version. I also want it to display the number of items you have to spawn..

I know its such a rookie question to ask.

Sincerly,
DarkUndeadSpawn

Best Answers

  • gyroscopegyroscope I am here.Posts: 6,598
    edited October 2013 Accepted Answer
    Hi @DarkUndeadSpawn


    I know its such a rookie question to ask.
    No, it's not that..... because you didn't ask 1 question but 6… ;-)

    I'll answer your first 2 questions, then other members will hopefully give you their time and experience to answer the others...


    How Can i Spawn a actor then drag it anywhere i want?

    Put the following in the rules of the actor you want spawned (the prototype in the Inspector):

    When touch is pressed
    Constrain attribute self.SpawnedActor.Position.X to game.Touch1.Position.X
    Constrain attribute self.SpawnedActor.Position.Y to game.Touch1.Position.Y

    To spawn the actor:

    put in your button you want to press to Spawn:

    When touch is pressed
    Spawn Behaviour SpawnedActor ---- don't forget to set its initial position on-screen with its X and Y coordinates; plus set the position relative to scene.

    Hope you get some help there; best of luck with learning GSC. :-)

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

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,922
    Accepted Answer
    There are videos on YouTube just search for gamesalad cookbook on there and you will find a host of video that show you how to do just what you asked. Although the interface is different the techniques are the same.
  • gyroscopegyroscope I am here.Posts: 6,598
    edited July 2012 Accepted Answer

    I also asked.

    How will i highlight the character when it is selected?
    I got another question.

    I know you also asked. I also mentioned about the problems of asking too many questions in the one thread! ;-)

    Anyhow, to answer your "also asked" question, there's a couple of ways, depending on how you want the character highlighted.

    If you want it highlighted by changing its colour completely, then add this into your When touched rules:

    Change Attribute self.character.Color.R to ----
    Change Attribute self.character.Color.G to ----
    Change Attribute self.character.Color.B to ----

    and add another rule:
    When touch is released
    Change Attribute self.character.Color.R to 1
    Change Attribute self.character.Color.G to 1
    Change Attribute self.character.Color.B to 1

    ---------

    If you want an outline to the character, you'll have to make a separate image for this; then add into your When touched rule:

    Change Image to CharacterOutlined

    and another rule:
    When touch is released
    Change Image to Character ------ i.e your original image

    hope that helps.

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

Answers

  • DarkUndeadSpawnDarkUndeadSpawn Member Posts: 64
    @gyroscope

    Put the following in the rules of the actor you want spawned (the prototype in the Inspector):

    When touch is pressed
    Constrain attribute self.SpawnedActor.Position.X to game.Touch1.Position.X
    Constrain attribute self.SpawnedActor.Position.Y to game.Touch1.Position.Y

    To spawn the actor:

    put in your button you want to press to Spawn:

    When touch is pressed
    Spawn Behaviour SpawnedActor ---- don't forget to set its initial position on-screen with its X and Y coordinates; plus set the position relative to scene.

    Hope you get some help there; best of luck with learning GSC. :-)

    I also asked.

    How will i highlight the character when it is selected?

    And also To rotate the actor whenever you choose by using another button when it is of course selected.

    But the idea of knowing what you selected is have it highlighted when touched.


    Sincerly
    DarkUndeadSpawn
  • DarkUndeadSpawnDarkUndeadSpawn Member Posts: 64
    edited July 2012
    I got another question.

    Well when i click on the actor to spawn it it wont spawn with the touch.pressed but when i press it when i use the game.touch.count = 1
    It spawns the actor.

    But when i click the actor that is spawned it just keeps spawning more actors into scene and i cant find a way to fix that?

    Also i can either use the integer for self.spawnedactor or self.position.x i cannot seem to find self.spawnedactor.position.x on windows..

    I have windows version btw

    Thankyou

    Sincerly,
    DarkUndeadSpawn
  • DarkUndeadSpawnDarkUndeadSpawn Member Posts: 64
    Thanky

    I also asked.

    How will i highlight the character when it is selected?
    I got another question.

    I know you also asked. I also mentioned about the problems of asking too many questions in the one thread! ;-)

    Anyhow, to answer your "also asked" question, there's a couple of ways, depending on how you want the character highlighted.

    If you want it highlighted by changing its colour completely, then add this into your When touched rules:

    Change Attribute self.character.Color.R to ----
    Change Attribute self.character.Color.G to ----
    Change Attribute self.character.Color.B to ----

    and add another rule:
    When touch is released
    Change Attribute self.character.Color.R to 1
    Change Attribute self.character.Color.G to 1
    Change Attribute self.character.Color.B to 1

    ---------

    If you want an outline to the character, you'll have to make a separate image for this; then add into your When touched rule:

    Change Image to CharacterOutlined

    and another rule:
    When touch is released
    Change Image to Character ------ i.e your original image

    hope that helps.
    Thankyou sir that really helped me out big time..

    I have got to keep learning more and more i will get use to this and soon wont need to find any help..

    Thankyou and have a nice day..

    Sincerly,
    DarkUndeadSpawn
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited July 2012

    Hiya @DarkUndeadSpawn

    You're welcome. :-) Keep at it, it'll all drop into place for you, I'm certain. Hope I haven't put you off asking questions! :-) Fire away, (ideally one question/problem per thread ;-) ) and we'll all try to help out where we can.

    I don't think we ever stop learning, especially as GSC evolves with new features, etc; anyhow, you have a good day too.

    :-)

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

Sign In or Register to comment.