Price(FREE or PAID): FREE Node Name: SKRandomColors SKArrayColors Type of Node: look Description: Applying random colours or array colours to the object. Special Instructions: Ability to change colour. Author: @particles Date Uploaded: 10-30-2018 Last Update: 10-30-2018 Apply List of Colors
thank for this I managed to make it work before but how can we make the color change by time or by distance if you can provide that that would be a life-changing. thank you.
@particles Thanks for the node and all the other nodes I've found in the forum. Are your nodes available anywhere without stumbling across them in forum articles?
Can you code a node with color detection? Where if thetcharacter collides with an object the same color as itself one thing happens and if it collides with an object of a different color another thing happens? Like in color switch
@lazerDev Compare the colour values of both by let c1 = character.color(); let c2 = enemy.color(); if(c1.r == c2.r && c1.g == c2.g && c1.b == c2.b){ // Color Match }else{ // Color doesnt Match }
thank you so much! unfotanately i am not experienced in coding and i dont understand how to use the code you wrote maybe you can create a node where i can connect to 1 node (defeat) if color doesnt match and to another (score +1) if it does match?
@particles -> thanks for sharing. Do you have an idea of how to create random color change of certain elements (objects) on a scene after few games played. Like for example to change the color of Ground if game is played 3 times? This is tied to event observer maybe, I am not sure. Can you reproduce such result? This will randomize the colors within the game to avoid boredom and increase retention ;-)
@itzonator You can store a value say PlayCount in Settings and increase by 1 in every play. Once it is crossed 3, you can apply random colors to Ground if(Settings.PlayCount == undefined){ Settings.PlayCount = 0; } Settings.PlayCount += 1; if(Settings.PlayCount % 3) { // Apply New Color }else{ //Keep Old Color }
Hey, I love this so far. I saw the code you had previously when someone asked if character collided with an object x event would happen. "let c1 = character.color(); let c2 = enemy.color(); if(c1.r == c2.r && c1.g == c2.g && c1.b == c2.b){ // Color Match }else{ // Color doesnt Match }" I know the code and I understand how it works. but what would you put in the if statement? Ex; if the color does not match then color.kill? I mean how does that work in buildbox with the code? How could I say if the color matches then +1 score or if the color does not match then the user will die. I guess i'm confused, i'm used to just dragging nodes around and have no idea what to put inside the if statement to make an event happen like example above. How would that work? Love the nodes so far, thank you so much if you've read this far. Seriously thank you. Cheers.
@Jacob Bennett You can add your next action in the if else statement. if(c1.r == c2.r && c1.g == c2.g && c1.b == c2.b){ // Color Match this.scene().addScorePoints(1); // You can add points this.emitSignal('ColorMatch',true);// connect this to an output node to do next step. }else{ // Color doesnt Match this.emitSignal('KillMe', true);//Connect an output node to gameover or whatever you want. }"