toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Spawning 2 different actors
jfrancis
Member
Posts:
57
March 2011
edited November -1
in
Working with GS (Mac)
How can you spawn 2 different actors in one scene. For example, spawning a red block by tapping screen then how could I switch it so i can spawn a different actor like a blue block?
Comments
quantumsheep
Member
Posts:
8,188
March 2011
This is simple attribute manipulation.
For example:
Make an attribute called 'count' - leave it at 0.
Have a rule that says:
When screen is tapped
Change attribute 'count' to 'count+1'
This basically increases 'count' by 1 every time you tap the screen.
Then have a rule that says:
When screen is tapped AND attribute count =0
Spawn Red Actor
When screen is tapped AND attribute count =1
Spawn Blue Actor
Hope that pushes you in the right direction!
QS
jfrancis
Member
Posts:
57
March 2011
Thanks
Sign In
or
Register
to comment.
Comments
For example:
Make an attribute called 'count' - leave it at 0.
Have a rule that says:
When screen is tapped
Change attribute 'count' to 'count+1'
This basically increases 'count' by 1 every time you tap the screen.
Then have a rule that says:
When screen is tapped AND attribute count =0
Spawn Red Actor
When screen is tapped AND attribute count =1
Spawn Blue Actor
Hope that pushes you in the right direction!
QS