Hi we are working on a game and need to trigger a sequence of events when the play collects 25 points how will we go about doing this? @TreySmith @NikRudenko @Josh (Tekanology) @heathclose @Andy @AaroArts @trudnai @ OneHitGamer @playsgames6666 @jcalle @AndyG @wesam_badr @phil Mason
Hi, You can go to character => Advanced => Global Counter, you can adjust what triggers the global counter and after the set count is reached it will throw an action you desire.
Please check the attachment, you need to add the script according to what you need the action to be. I believe it will work like that.
You can set a counter to increase depending on how you are setting the rewarding points, and after that you set a color change. You can set as much colors as possible and make it be triggered depending on the counter value.
Ok, well I've been working on the issue for a while, unfortunately I couldn't get to change the color as we can't until now add a color attribute and connect it with an if - else statement. I was able to add a counter for distance and points upon the character movments, jump or what ever you want it to do. Step 1: will note the distance traveled by the character Step 2: will add score to the game Note: in my case I linked the distance to the score, you can just replace (Math.round(dit/60)) with any value you like.
Ok thanks a lot and to make it do points collected do we change distance string to something like point and when it gets to that amount it will send signal ok and to change to points we change the string from distance and it should execute signal?
In my game, I have linked the signal of my counter to the platform on which the character collides with. Every collision will make the script check distance and the position of the character. If the position of the character changes the points if statement will be enabled and will calculate the value. if you want just to include points without distance you can write something like that: if(value){ let pos = this.entity().position(); _rounded = Math.round(pos.y); if(_rounded < -5 && _rounded != _covered ) { _covered = _rounded this.scene().addScorePoint(10); _distance = _rounded; } This will add 10 points everytime the position changes.
Thanks a lot for your help you have done more than enough but if you can can you send us a bBDOC our email is playpixelstudios@gmail.com