How do I

Get help using Construct 2

Post » Sun Apr 27, 2014 9:07 am

in my game I catch fish for every catch the score added by 1 but there is two bad fish we mustn't catch if we do that we will loose ...................... I write event do that work but ............ I want another event to do this work : if we don't catch good fish except bad fish the score minus 1 .................. how can i do that please ?
B
4
Posts: 12
Reputation: 224

Post » Sun Apr 27, 2014 11:07 am

Give every fish an instance variable about their scores. Forex you have 3 kind of fish
Gold Fish => variable =5
Ordinary Fish=> variable =1
Bad Fish=> variable = -1

when someone catches a fish add their instance variable to players score adding a negative value will substract that value
with this style you dont need to use conditions, less calculations and ur game has more performance.
Truth shall be your freedom...
B
14
S
2
G
1
Posts: 45
Reputation: 930

Post » Sun Apr 27, 2014 11:45 am

thank you

but my problem is there is no event mean when we not touch object there is only on touch object but , I need minus score when we don't touch good fish
B
4
Posts: 12
Reputation: 224

Post » Mon Apr 28, 2014 7:13 am

@hadeelayadi Can you please explane your game mechanics a bit more?
I may misunderstood what you mean.

According to your reply i understood that you are not calculating score each time a fish has been chought.
you wait for sometime and calculate at the end

if im right theres no way to findout if something not touched in short way. Like a pre made construct 2 condition. You have to manipulate that.

Like, make a global variable forexample "GoodFishChought" default value can be either "false" or "0" or even "no" something you can understand.

Put a "sub event" on each sprite touch event to check if it is a good fish or not. you can do this adding an instance variable to all good fish sprites and using compare instance variabe.
if its a good ship then make this variable "true", "1" or "yes".

at the and of the level before calculating the score check this variable if its "true", "1", or "yes" you will know that player chought at least 1 good fish so score will not be minus.
Truth shall be your freedom...
B
14
S
2
G
1
Posts: 45
Reputation: 930

Post » Mon Apr 28, 2014 10:48 pm

Firstly: Please read this. "How do I" is not a really good Subject. Enter a pithy title.

For your problem:
Just check which fish is catched. And subtract or add a value to a global variable "score".
You can pick a object by uid. So get the fish-typ.
B
13
S
4
G
1
Posts: 107
Reputation: 1,337

Post » Tue Apr 29, 2014 9:58 am

thank you for all notice

my game has good fish and bad fish and high score fish ,,,, when I catch a good fish the score added by one , when I catch bad Fish the player loose and go to game over ,when I catch high score fish the score added by 5 ..... but if the a good fish appear and I don't catch it the score will minus by one ............ I didn't found event do this job (if the a good fish appear and I don't catch it the score will minus by one ) ............ that what I need.................. please if you can help me ,help me please .


hadeel ayadi
B
4
Posts: 12
Reputation: 224

Post » Tue Apr 29, 2014 4:49 pm

ok I will summarize again:
in your game there a fishes. 3 types: Good (1 score), Bad (Lose), Gold (5 score).
Also: You want to check if a fish is not catched.

We need more information about your gameplay!
I think you have a screen like a aquarium. Fish swim from one to the other side.
So just subtract 1 from your score when a fish is outside the screen. Or then the fish can't catched anymore.

This is simple logic. Just try and play with some events.
B
13
S
4
G
1
Posts: 107
Reputation: 1,337

Post » Wed Apr 30, 2014 7:53 am

thank you very much .............. my game is okay now :)
B
4
Posts: 12
Reputation: 224


Return to How do I....?

Who is online

Users browsing this forum: NN81, plinkie, TsubaRu and 9 guests