How to change actors from one to another (cannot find the right behavior) + how to hide one of them?
hegert
Member Posts: 11
So, I'm just trying different ideas for games.
I want to make a game where you have to "turn the light on". At first the game screen is totally black. You have to find the switch by tapping the screen.
I have 3 actors: Lights on, off and switch
First question: How to hide the switch from the player but still have it there, so when he taps, it works?
The second: How to change the actor from Light Off to Light On, when switch has been touched?
Third: How to make the switch change its place every time you don't tap on the right place?
Screenshots:
http://www.upload.ee/image/3917657/Screen_Shot_2014-03-02_at_12.11.02_AM.png
http://www.upload.ee/image/3917659/Screen_Shot_2014-03-02_at_12.11.10_AM.png
http://www.upload.ee/image/3917661/Screen_Shot_2014-03-02_at_12.11.14_AM.png
http://www.upload.ee/image/3917662/Screen_Shot_2014-03-02_at_12.11.46_AM.png
Thanks for your help!
I want to make a game where you have to "turn the light on". At first the game screen is totally black. You have to find the switch by tapping the screen.
I have 3 actors: Lights on, off and switch
First question: How to hide the switch from the player but still have it there, so when he taps, it works?
The second: How to change the actor from Light Off to Light On, when switch has been touched?
Third: How to make the switch change its place every time you don't tap on the right place?
Screenshots:
http://www.upload.ee/image/3917657/Screen_Shot_2014-03-02_at_12.11.02_AM.png
http://www.upload.ee/image/3917659/Screen_Shot_2014-03-02_at_12.11.10_AM.png
http://www.upload.ee/image/3917661/Screen_Shot_2014-03-02_at_12.11.14_AM.png
http://www.upload.ee/image/3917662/Screen_Shot_2014-03-02_at_12.11.46_AM.png
Thanks for your help!
Comments
2. Okay, I re-read what you said and saw I missed a screenshot Will throw together a quick example.
3. For this you probably want a "When actor receives event touch is outside, move to (random x), (random y)". You could presumably use a Move To, Interpolates or Change Attributes depending on how you want it to move.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Right now I have a question about the first answer - where can I find self.alpha? I was clicking different menus, but did not find it.
EDIT: Is it scene.color.alpha?
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
I did it a little different with these alpa values, it should work.
Screenshot: http://www.upload.ee/image/3917772/Screen_Shot_2014-03-02_at_1.14.23_AM.png
Now three things:
1. I think my dimensions are messed up? I don't want to switch to go outside the screen. What are the dimensions and how to avoid going outside the screen?
2. When I click the switch, the "LightOn" picture comes up (just a white screen for now), but not full screen (Although I changed it, I think. Manually, and that might be the problem).
3. Do I have to make another actor to make a message "The light is on" come up on the screen and end the game?
Thank you so much for your help. I love the community here already!
2. Just make the LightOn actor be the same dimensions as your scene (presumably 568x320) and place it at 50% of those dimensions (presumably x=284 and y=160). That'll make it fill the screen and be centred.
3. No, you can use a Display Text behaviour to achieve this. Stick it in with the rule you use to make the light visible.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
1. It still goes off the screen sometimes, but I think that's good. Makes it harder :P
2. These X's and Y's did not work. They still had a little bit of black screen, but I changed it randomly for bigger numbers and now I have full screen white, when needed. Is it OK? I mean, do I have to have correct numbers or I can just change them as big as I want (like I did right now)?! Might it make the app working slow?
2. Making the actor bigger than the scene is no problem, especially in a small game like this. If you were doing it with many actors in a complicated and intensive game it might start to slow it down a tiny bit, but realistically there will be no noticeable different.
To check your scene size, check the image attached. (Sorry if this is obvious to you, but might be helpful to someone else and is easy than trying to explain it )
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Well, basically my game is ready.
Went outside, had an idea, after 1.5hrs basically done (I've never used GameSalad before). Have to design now and it will be awesome, I think.
Also have to add timer to count how fast the player found the switch (Or might it be better to count taps?). Also, I should put the "Record/Best" into the game. And menu + couple of other small things.
Might not be the right place, but what do you think of this idea with a nice design? Finding the switch in the dark to turn the light on. Might be addictive? Would you play it?
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
As I can see, I'm not the only one who has that problem. Anyone knows how to fix it?
Plus, how to make it run as long as the player finds the switch? How to save player's record and show it?
I'll get to the questions you PM'd me as soon as I can
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support