Spawn actor then move to place and spawn another - Help.
mrwenger
Member Posts: 4
Im trying to build a basic game for students in my class with autism which is based around grouping animals.
I have managed to set up a random spawner for my animals but i would like it to spawn one until the animal has been moved into the correct pen/cage, then spawn another.
I have managed to get it to spawn to where i would like it to and I can move the animal by touch.....
So my question is
1) how do i limit my spawner to 1 random animal on screen untill it has been placed in the correct pen/cage
2) I also want to limit the game to 10 animals
Any help or tutorials would be greatly appreciated and apologies if im not using the correct terminology
Reagrds
Comments
Take a look at the attached project.
Essentially you just need to keep two counts - the number of animals that have been spawned, and the number of animals successfully put into their pens. When they are equal, spawn another animal. When the spawn count reaches 10, stop spawning.
The attached project shows this very roughly. If you have any specific questions about what it's doing just ask.
Note that I made no real effort to make the "penning" of the animals work more than vaguely. It wasn't necessary for the purposes of this example.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Thank you for file, its helped me understand how it works apart from a couple of things.
1) When changing the attribute to self.type I cannot find type under the attributes browser?
Also, under animal change attribute self.color.red self.color.green etc there are corresponding numerical values what does all this mean?
I did a screen grab but have no idea how i can post into my reply.
Thanks
self.Type is just a self attribute I made - you do that by going into the actor prototype and clicking the + under the attribute pane.
I didn't have images for the animals, so I just used colours, and these change attributes are setting the colours. If you go to the actor attributes pane there is an option for colour. If you expand that option you'll see Red, Blue, Green and Alpha values that you can set. If you're using graphics for your animals you can ignore that part of the logic.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Armelline what type of attribute should i select, integer etc
Thank you
Dont worry I found it.