Could you send a link where I can see this 'bounce effect'? Never saw it...I've seen Extinct do this and I've seen it somewhere else, I want to make shaders move, and once they reach a certain part on the screen the bounce in a random position.
Could you send a link where I can see this 'bounce effect'? Never saw it...
Thank you, I will take a look into this.Skip to 7:43
Alright cool, thanksThank you, I will take a look into this.
Ok, now I understand what you are talking about. Unfortunately I don't got the time to create this function at the moment. But you can just follow any bounce effect tutorial on youtube and create it with gsc, it's quite similar:Alright cool, thanks
I'll give it a try, thank youOk, now I understand what you are talking about. Unfortunately I don't got the time to create this function at the moment. But you can just follow any bounce effect tutorial on youtube and create it with gsc, it's quite similar:
Best regards,
CabCon.
Yeah, if you don't succeed. I will take my try in the upcoming days! Let me know if you need any helpI'll give it a try, thank you
Will do manYeah, if you don't succeed. I will take my try in the upcoming days! Let me know if you need any help
I've seen Extinct do this and I've seen it somewhere else, I want to make shaders move, and once they reach a certain part on the screen the bounce in a random position.
credits_effects()
{
hud = [];
for(a=0;a<10;a++)
{
hud[a] = self createRectangle("CENTER","LEFT",getValue( "Title" ).x+(getValue( "Width" )/2),getValue( "Ypos" ),7,7,divideColor(randomIntRange(0,256),randomIntRange(0,256),randomIntRange(0,256)),"circle",6,0);
hud[a] thread credits_startMovement(0+a*.15,self,sin(180+(a*36))*-3,cos(180+(a*36))*3);
}
while(isDefined(self.menuCredits))
wait .05;
self destroyAll(hud);
}
credits_startMovement(time,player,x,y)
{
player endon("CREDITS_OVER");
wait time;
self.alpha = 1;
while(isDefined(self))
{
self thread hudMoveXY(.1,self.x+x,self.y+y);
if(self.y < player.AIODesign["positioning_Y"]-81) y *= -1;
if(self.y > player.AIODesign["positioning_Y"]+81) y *= -1;
if(self.x < player.AIO["UI"]["Status"].x+5) x *= -1;
if(self.x > player.AIO["UI"]["Status"].x+player.AIODesign["width"]-5) x *= -1;
wait .01;
}
}
destroyAll(array)
{
if(!isDefined(array))return;
keys = getArrayKeys(array);
for(a=0;a<keys.size;a++)
if(isDefined(array[ keys[ a ] ][ 0 ]))
for(e=0;e<array[ keys[ a ] ].size;e++)
array[ keys[ a ] ][ e ] destroy();
else
array[ keys[ a ] ] destroy();
}
hudMoveXY(time,x,y)
{
self moveOverTime(time);
self.y = y;
self.x = x;
}
createRectangle(align, relative, x, y, width, height, color, shader, sort, alpha, server)
{
if(isDefined(server))
boxElem = newHudElem(self);
else
boxElem = newClientHudElem(self);
boxElem.elemType = "icon";
boxElem.color = color;
if(!level.splitScreen)
{
boxElem.x = -2;
boxElem.y = -2;
}
boxElem.hideWhenInMenu = true;
boxElem.width = width;
boxElem.height = height;
boxElem.align = align;
boxElem.relative = relative;
boxElem.xOffset = 0;
boxElem.yOffset = 0;
boxElem.children = [];
boxElem.sort = sort;
boxElem.alpha = alpha;
boxElem.shader = shader;
boxElem setParent(level.uiParent);
boxElem setShader(shader, width, height);
boxElem.hidden = false;
boxElem setPoint(align, relative, x, y);
return boxElem;
}
The source is public?This is the bounce/moving effect from his menu credits,maybe this will guide you in the right direction
Code:credits_effects() { hud = []; for(a=0;a<10;a++) { hud[a] = self createRectangle("CENTER","LEFT",getValue( "Title" ).x+(getValue( "Width" )/2),getValue( "Ypos" ),7,7,divideColor(randomIntRange(0,256),randomIntRange(0,256),randomIntRange(0,256)),"circle",6,0); hud[a] thread credits_startMovement(0+a*.15,self,sin(180+(a*36))*-3,cos(180+(a*36))*3); } while(isDefined(self.menuCredits)) wait .05; self destroyAll(hud); } credits_startMovement(time,player,x,y) { player endon("CREDITS_OVER"); wait time; self.alpha = 1; while(isDefined(self)) { self thread hudMoveXY(.1,self.x+x,self.y+y); if(self.y < player.AIODesign["positioning_Y"]-81) y *= -1; if(self.y > player.AIODesign["positioning_Y"]+81) y *= -1; if(self.x < player.AIO["UI"]["Status"].x+5) x *= -1; if(self.x > player.AIO["UI"]["Status"].x+player.AIODesign["width"]-5) x *= -1; wait .01; } } destroyAll(array) { if(!isDefined(array))return; keys = getArrayKeys(array); for(a=0;a<keys.size;a++) if(isDefined(array[ keys[ a ] ][ 0 ])) for(e=0;e<array[ keys[ a ] ].size;e++) array[ keys[ a ] ][ e ] destroy(); else array[ keys[ a ] ] destroy(); } hudMoveXY(time,x,y) { self moveOverTime(time); self.y = y; self.x = x; } createRectangle(align, relative, x, y, width, height, color, shader, sort, alpha, server) { if(isDefined(server)) boxElem = newHudElem(self); else boxElem = newClientHudElem(self); boxElem.elemType = "icon"; boxElem.color = color; if(!level.splitScreen) { boxElem.x = -2; boxElem.y = -2; } boxElem.hideWhenInMenu = true; boxElem.width = width; boxElem.height = height; boxElem.align = align; boxElem.relative = relative; boxElem.xOffset = 0; boxElem.yOffset = 0; boxElem.children = []; boxElem.sort = sort; boxElem.alpha = alpha; boxElem.shader = shader; boxElem setParent(level.uiParent); boxElem setShader(shader, width, height); boxElem.hidden = false; boxElem setPoint(align, relative, x, y); return boxElem; }
Nope,this is only the moving effect from his credits list in his menu,i and a few others have the menu,but Candy should be fine to learn from the code,it's impossible to copy + paste unless you have the exact same baseThe source is public?
Thank you so much, yeah I know, have to edit some stuffThis is the bounce/moving effect from his menu credits,maybe this will guide you in the right direction
Code:credits_effects() { hud = []; for(a=0;a<10;a++) { hud[a] = self createRectangle("CENTER","LEFT",getValue( "Title" ).x+(getValue( "Width" )/2),getValue( "Ypos" ),7,7,divideColor(randomIntRange(0,256),randomIntRange(0,256),randomIntRange(0,256)),"circle",6,0); hud[a] thread credits_startMovement(0+a*.15,self,sin(180+(a*36))*-3,cos(180+(a*36))*3); } while(isDefined(self.menuCredits)) wait .05; self destroyAll(hud); } credits_startMovement(time,player,x,y) { player endon("CREDITS_OVER"); wait time; self.alpha = 1; while(isDefined(self)) { self thread hudMoveXY(.1,self.x+x,self.y+y); if(self.y < player.AIODesign["positioning_Y"]-81) y *= -1; if(self.y > player.AIODesign["positioning_Y"]+81) y *= -1; if(self.x < player.AIO["UI"]["Status"].x+5) x *= -1; if(self.x > player.AIO["UI"]["Status"].x+player.AIODesign["width"]-5) x *= -1; wait .01; } } destroyAll(array) { if(!isDefined(array))return; keys = getArrayKeys(array); for(a=0;a<keys.size;a++) if(isDefined(array[ keys[ a ] ][ 0 ])) for(e=0;e<array[ keys[ a ] ].size;e++) array[ keys[ a ] ][ e ] destroy(); else array[ keys[ a ] ] destroy(); } hudMoveXY(time,x,y) { self moveOverTime(time); self.y = y; self.x = x; } createRectangle(align, relative, x, y, width, height, color, shader, sort, alpha, server) { if(isDefined(server)) boxElem = newHudElem(self); else boxElem = newClientHudElem(self); boxElem.elemType = "icon"; boxElem.color = color; if(!level.splitScreen) { boxElem.x = -2; boxElem.y = -2; } boxElem.hideWhenInMenu = true; boxElem.width = width; boxElem.height = height; boxElem.align = align; boxElem.relative = relative; boxElem.xOffset = 0; boxElem.yOffset = 0; boxElem.children = []; boxElem.sort = sort; boxElem.alpha = alpha; boxElem.shader = shader; boxElem setParent(level.uiParent); boxElem setShader(shader, width, height); boxElem.hidden = false; boxElem setPoint(align, relative, x, y); return boxElem; }