hey , i am new . i wanna be able to create games so i started out small with a cookie clicker esque game. basically where i just kill slimes again and again (also , its for 1bit clicker game jam on itch.io) i looked up the tutorial about it. the zip file with the project – i can’t find anything that make the life go down? i only see variables [ life 100 ]
I haven’t seen the project, but by life going down, do you mean some kind of visual representation (e.g. hearts falling off, or etc)?
Otherwise, it’s good enough to have an object variable health, (or a scene variable if only one object is important), then decrease the health if a bullet hits the object.
Then, make a check e.g. if variable health < 1, then [game over].
Where game over can show a special screen, or go to the scene again (restart scene), or many other things as desired.
eyyup! , except i do not know how to have any visual effects / animations going on when i click on it though, help will be appreciated – trying to find that out aswell in the meantime
this EXACTLY what i needed to know! thank you!!!
but how to set it that every 5 clicks a coin comes out?
[code]
Timer click_delay is greater than 0.1s // ← Put whatever value you want here that is sensible, but you will want a timer!
Left mouse or touch is pressed
cursor is on cookie_button
reset the timer click_delay //<-- Remember to reset timers when you use them!
do +1 to Variable(clicks) //<-- When this variable reaches 5, we will increment the score by 1[/code]
Sub event to the above:
clicks >= Variable(clicks)
do -5 to Variable(clicks) //<-- Take off the 5 clicks
do +1 to cookie_score //<--Increment the score (convert 5 clicks to 1 point)
play animation of cookie