This Is My Very First Animation! ๐Ÿ˜

Iโ€™m trying to create a code where if the square (you) hits another object it will make the number score go up. i type "if (this.hits(that)) {
}
project.score += 1;
score.setText (โ€˜score:โ€™ + project.score);{

}

(idk if the last code works) but I donโ€™t know how to make this=you and that=object

if you select a clip, hit his default button and add some code, this is referred to the clip you selected
To target any other clip you can use
project.targetOtherClipName
where targetOtherClipName is the name you gave to the clip you are going to target

then how do i do the same thing but with objects on the same frame

Have a look at this project. This is one of the ways you can do it
Code in on Update event of square clip
hittest.wick (1.9 KB)

well a glitch happened when i tried putting it in my project, it said " error - line 57684" I donโ€™t even have a line 57684

I think Iโ€™m gonna charge you an hourly rate
upload your project and iโ€™ll check it

what do you mean when you say โ€œi think im gonna charge you an hourly rateโ€

My Project3-25-2021_11-10-40.zip (492.5 KB)

it means you owe me $50

โ€ฆjk :smile:

ok your code is quite messy
on the square obj you have code in mouseclick that does nothing.
on line 1 you check hittest against a clip called apple that I do not see on the canvas
on line 7 and 8 of update you have a {} related to nothing.
on line 7 you are trying to set a text but the name of your text field is wrong.
and lastly if you are incrementing the value of score is a good idea to set its default value at game start somewhere (for example in frame default --> project.score=0;)

this is so embarrassing, i kinda just started putting random code that i thought made sense, i donโ€™t really know anything really

thatโ€™s a learning process
if you are interested read and watch tutorials on wickeditor and javascript
is not that hard
start small and do things by steps. youโ€™ll get it

mkay :smile: