is there a way to output that data?
Do you mean printing the data? console.log will do that. You should see a âshow data simulatorâ button that appears beneath the simulator when you start calling that function. Clicking that will open the log.
hey @richard im sorry to bother you again⌠but do you know what im doing wrong
//% block="Place $sprite=variables_get(mySprite) at x$X y$Y z$Z"
export function PlaceSprite(sprite: Sprite, X: number, Y: number, Z: number) {
let ID74696C655F7769647468 = 32
let ID785F706978656C = ID74696C655F7769647468 * 2 - (X + Y) * ID74696C655F7769647468 / 2
let ID795F706978656C = (Y - X) * ID74696C655F7769647468 * ID74696C655F726174696F - ID74696C655F7769647468 - 0 + ID74696C655F7769647468 * ID74696C655F726174696F - (ID74696C655F7769647468 * (ID74696C655F726174696F * (1 + 2 * ID74696C655F726174696F)) + (2 + ID74696C655F726174696F)) * Z
sprite.setPosition(ID785F706978656C, ID795F706978656C)
sprite.data[IsometricPlayerX] = X
sprite.data[IsometricPlayerY] = Y
sprite.data[IsometricPlayerZ] = Z
console.logValue("Place Place at x.y.z", X +", " + Y + ", " + Z)
}
this part just doesnât change the data value
sprite.data[IsometricPlayerX] = X
sprite.data[IsometricPlayerY] = Y
sprite.data[IsometricPlayerZ] = Z
how do i change the data value
hey @richard is there a way to attach a list to a enum?
let AlphabetCorversionList = "...".split(" ")
AlphabetCorversionList.push(" ")
let HexedecimalCorversionList = "...".split(" 20 ")
HexedecimalCorversionList.push("20")
let OctalCorversionList = "..".split(" 20 ")
OctalCorversionList.push("...")
let DecimalCorversionList = "...".split(" 20 ")
DecimalCorversionList.push("...")
let BinaryCorversionList = "...".split("0010000")
BinaryCorversionList.push("...")
let MorseCodeCorversionList = "...".split(" ")
MorseCodeCorversionList.push("...")
enum CorversionLists {
Text = AlphabetCorversionList,
Hexedecimal = HexedecimalCorversionList,
MorseCode = MorseCodeCorversionList,
Octal = OctalCorversionList,
Binary = BinaryCorversionList
}
@YuHayate you canât assign lists to enums, but you can map them using either a function or an object
let AList = [1,2,3]
let BList = [4,5,6]
enum Foo {
A,
B,
}
// For this type of thing I typically use a function with a switch
// statement
function getList(arg: Foo): number[] {
switch (arg) {
case Foo.A:
return AList;
case Foo.B:
return BList;
}
}
let myValue1 = getList(Foo.A)
// But you can also use an object like this
let listMap = {
[Foo.A]: AList,
[Foo.B]: BList
}
let myValue2 = listMap[Foo.B];
hey @richard im making a racing game https://makecode.com/_MaJfUED37U6Y
but whenever i want to turn the car disappear it use to work but not anymore