0 Favourites

How do I

  • 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 ?

  • 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.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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

  • 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.

  • 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.

  • 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

  • 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.

  • thank you very much .............. my game is okay now

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)