Many people want to make an Augmented reality game, nowadays Spark Ar is very Hot in augmented reality or filter making. Here I will help you in making Filters. Today we discuss
How to Add Score Counter In Instagram/Facebook Game in SparkAR
so we can do this in Steps, follow these steps
STEP 1:
STEP 1:
Make a new project in SparkAr
STEP 2:
STEP 3:
Click on +Add Asset and Click on Script, now change the name to score if you want as shown in picture
STEP 4:
Click on Script in Asset panel and press '+', then click on Number, now change the name to score later we use this name in Script, Now click on Three Dot ... and click on Reveal path now open script in any editor
Change The Name Of Text Box to number later we use this name in Script
Write the script as shown in the pic
Keep 'number' and 'score' same at line 17and 18, as mention above
Keep 'number' and 'score' same at line 17and 18, as mention above
STEP 5:
Click on the arrow (->) on the right panel of beside score to produce a patch in the patch editor
Now click on Facetracker on left pannel click on Blink or Mouth Open or etc on which you want scoring
Add Counter and link as in the picture
FINAL STEP:
Now you can see that score is visible on the screen, in this case, it count number of blink and shows on the screen
Summary:
By this tutorial, you can make easily any game which is trigger on blink and mouth open, etc make logic of game, count the score by using a counter patch, save in text and show on Screen, direct showing the count number is not possible by patch but possible by scripting
VIDEO TUTORIAL:
watch the video for better understanding
if you like this post share it with your friends and do subscribe my channel
Comments
Post a Comment