# Sprite overlaps block question

**URL:** <https://forum.makecode.com/t/sprite-overlaps-block-question/1243>\
**Category:** Arcade\
**Created:** [February 20, 2020, 2:10pm UTC](https://forum.makecode.com/t/sprite-overlaps-block-question/1243 "2020-02-20T14:10:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JustinXue](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@JustinXue](https://forum.makecode.com/u/JustinXue)\
**Post date:** [February 20, 2020, 2:10pm UTC](https://forum.makecode.com/t/sprite-overlaps-block-question/1243/1 "2020-02-20T14:10:14Z")

</div>

I have encountered a problem, from last night the _on sprite overlaps otherSprite_ block does not work.

Follow is my sample:

 ![unnamed](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/e10ff6a702951725db0021155f8e99e325a0515a.png)  
The sample’s link is: [https://makecode.com/\_gCw1Lp0CYHbd](https://makecode.com/_gCw1Lp0CYHbd)

When Player sprite overlaps Enemy sprite, the score doesn’t change.

I coded it in [arcade.makecode.com](http://arcade.makecode.com), my web browser is Chrome version 80.0.3987.116 (64-bit).

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [February 20, 2020, 5:21pm UTC](https://forum.makecode.com/t/sprite-overlaps-block-question/1243/2 "2020-02-20T17:21:30Z")

</div>

Hm, somehow you have the old form of sprite kinds in there (as an enum, instead of as constants) - if you go to typescript you’ll see that the overlap event has the new constants (`SpriteKind.Player`, etc), but the sprites themselves are using the old style (`SpriteKindLegacy.Player`). The two things have the same names, but are not the same value - sort of like how there’s a `sprites.create` and an `images.create`

Is this an old project you have, or copied from somewhere? Not sure how that would show up otherwise (and it should have upgraded itself in the first place, though I suppose this might have upgraded then been added on to.)

---

<div class="post-metadata">

**Author:** ![JustinXue](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@JustinXue](https://forum.makecode.com/u/JustinXue)\
**Post date:** [February 21, 2020, 1:58am UTC](https://forum.makecode.com/t/sprite-overlaps-block-question/1243/3 "2020-02-21T01:58:52Z")

</div>

I have saw that the sprites are using the old style (`SpriteKindLegacy.Player`) in typescript.  
After testing, I have found that if I select Simplified Chinese language, when I create a sprite in Blocks, it will use the old style (`SpriteKindLegacy.Player`) in TypeScript. But if I select the other languages, it’s OK.

---

<div class="post-metadata">

**Author:** ![JustinXue](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@JustinXue](https://forum.makecode.com/u/JustinXue)\
**Post date:** [February 21, 2020, 2:03am UTC](https://forum.makecode.com/t/sprite-overlaps-block-question/1243/4 "2020-02-21T02:03:45Z")

</div>

![微信截图_20200221100116](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/e9fc987569cb0250bf83aae560673135e21d0d21.png)

mySprite was created in English.  
mySprite2 was created in Simplified Chinese.

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [February 21, 2020, 6:59am UTC](https://forum.makecode.com/t/sprite-overlaps-block-question/1243/5 "2020-02-21T06:59:24Z")

</div>

Ahhh, that’s an issue with the translation…

The translation had overridden the type of the spritekind, which broke the block as you showed. This has been broken / mismatched for **7** (!!!) months: [https://crowdin.com/translate/kindscript/2958/en-zhcn#q=spritetype](https://crowdin.com/translate/kindscript/2958/en-zhcn#q=spritetype) … started to change them but doing so will potentially cause inconsistencies (e.g. the blocks won’t work together as upgrade rules won’t necessarily be applied) so will see about it in the morning.

Thank you for letting us know, will have to think of a way to to proactively catch this in the future. (@peli maybe something along the lines of a cron job gh action that pulls all target translations and compares the parameter names / shadow blocks  
/ etc to make sure api’s have the right shape after translations? even with the `.shadow` format it’s still very easy for translation mistakes to break blocks without us noticing)

(issue filed [here](https://github.com/microsoft/pxt-arcade/issues/1756))

---

<div class="post-metadata">

**Author:** ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)\
**Post date:** [February 21, 2020, 2:49pm UTC](https://forum.makecode.com/t/sprite-overlaps-block-question/1243/7 "2020-02-21T14:49:52Z")

</div>

The client does validation of translations when loading them (and ignores the ones that look broken). Not enough apparently.
