Random Power-up effect like in mario kart

Dont you know how in mario kart, when you get an item, it plays an animation where it does the little slot machine thing, and then it slows down and stops then you get that power-up? how do i do that?

maybe you can help @JR01? if you can.

Maybe if you play the animation and then randomly generate an item with the Random behavior?

i thought of that, but idk how i could connect them together.

who says you need to? nobody will notice if it’s fast enough

im talking about the code.

what do you mean

wait now i know. So you play the animation, when it stops you put an item in the box.

hold on, i think i got it, thanks though :smiley:

I have a possible solution to this problem when you making the animation make each frame a different power, then make the code that randomly generates a number for each power, each power will be numbered by the order in which they fall in the frames in the animation, then make the random generated number into the “go to” on the animation block and use filters and switches for the actual powers. I’m honestly not sure if this will work I’m just thinking while I’m typing.

Sorry, I guess I didn’t see that you already figured this one out.

i didn’t figure it out yet, but im trying to.

If you give me the link I can try and apply my idea and see if it works.

1 Like

okay, hold on just a sec, and thanks! :smiley:

1 Like
1 Like

Can you make an animation for the item box select with each power on a different frame of the animation?

i made it with all of the power-ups in one animation so what do i do now?

I can’t see the animation, is it in the item box object?

its not in the item box, its in the item holder.

1 Like

Use this code it seemed to work for me, but you’ll have to delete all the other code in that object.

[copy]

{“data”:{“behavior”:{“v”:“2”,“nodes”:[{“inputCount”:0,“outputCount”:1,“name”:“Mailbox”,“behaviorType”:“logic.components.Mailbox”,“x”:-630,“y”:-64,“group”:“3e7022cfedc5ba4e”,“id”:“3e78b3d8158cc64c”,“msg”:“Slot”},{“inputCount”:3,“outputCount”:2,“name”:“Animation”,“behaviorType”:“logic.properties.Animation”,“x”:-450,“y”:-64,“group”:“3e7022cfedc5ba4e”,“id”:“3e78e715a983c644”,“animationName”:“All Power-Ups”,“loop”:true,“playAll”:null,“priority”:0,“lastFrameSticky”:null},{“delay”:20,“count”:1,“inputCount”:3,“outputCount”:1,“name”:“Timer”,“behaviorType”:“logic.triggers.Timer”,“x”:-630,“y”:64,“group”:“3e7022cfedc5ba4e”,“id”:“3e7908c6d9d9bb47”},{“inputCount”:3,“outputCount”:1,“name”:“Random”,“behaviorType”:“logic.logic.Random”,“x”:-450,“y”:64,“group”:“3e7022cfedc5ba4e”,“id”:“3e794b9729c20c43”,“min”:1,“max”:15}],“links”:[{“input_id”:“3e78e715a983c644i0”,“output_id”:“3e78b3d8158cc64co0”},{“input_id”:“3e78e715a983c644i2”,“output_id”:“3e794b9729c20c43o0”},{“input_id”:“3e7908c6d9d9bb47i0”,“output_id”:“3e78e715a983c644o0”},{“input_id”:“3e7908c6d9d9bb47i0”,“output_id”:“3e78e715a983c644o0”},{“input_id”:“3e794b9729c20c43i0”,“output_id”:“3e7908c6d9d9bb47o0”},{“input_id”:“3e794b9729c20c43i0”,“output_id”:“3e7908c6d9d9bb47o0”},{“input_id”:“3e78e715a983c644i2”,“output_id”:“3e794b9729c20c43o0”}]}}}

1 Like