How do I make a caring game?

Get help using Construct 2

Post » Fri Dec 23, 2016 5:20 am

Hi, it's me again. I wanted to make a caring game but I don't know how, if you don't know what do I mean. I meant that there is a character on the middle of screen with all of it's stats on top (for example, water, happiness, hunger, sickness, etc..), and whenever the character grow up the character's sprite changed to another sprite (Is it possible?). When one of the stats go low, the character goes sick and if all the stats go low, the character goes dead and start all over again.

?
B
5
Posts: 15
Reputation: 255

Post » Fri Dec 23, 2016 9:18 am

Posible and quite easy. 2 ways.

When any stat change call function, and this function check player stats and diplay correct animation.
B
21
S
3
Posts: 73
Reputation: 1,488

Post » Fri Dec 23, 2016 9:24 am

hobibit wrote:Posible and quite easy. 2 ways.

When any stat change call function, and this function check player stats and diplay correct animation.


I'm not that good at Construct 2 so I don't understand... Can you explain this like easy way?
B
5
Posts: 15
Reputation: 255

Post » Fri Dec 23, 2016 6:19 pm

Do a google search for Construct 2 virtual pet. There are some video and HTML5 tutorials on how to make the type of game. There's also some virtual pet game assets in the scirra store when/if you need them.
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Fri Dec 23, 2016 6:55 pm

Things in games are called objects, two objects of the same type are called instances.

Everything happening to an "instance" can be check using conditions in the event sheet. If you want a pet crying, make an "instance variable" like a boolean (true/false) and change it as desired.

E.g. your pet, after 10 seconds of the layout starts, will become hungry, so, check the condition time > 10 seconds and do the action "set instance variable boolean hungry" to true.

Now you're able to check if the pet is hungry and set its animation to correspond the new behavior.
Condition: pet instance variable boolean hungry is true?
And if this condition is meet, trigger the action: Change pet animation to "animation_name_for_hungry_behavior".

With this in mind you'll be able to make the whole game, dealing with conditions and actions, so, finally you can call it as Events.
Image
B
104
S
23
G
17
Posts: 1,350
Reputation: 22,028


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests