Hello wiremod users, i would like to show you something i made awhile ago and finally decided to post about it. i call it Holo Cube Invasion. pictures below. basically its just a bunch of rolling cubes, but i find it oddly satisfying. note that it uses quite a lot of ops for 25 cubes because it needs 2 holos per cube because of ranger issues


Code:
@name Holo Cube Invasion!
@inputs
@outputs
@persist R:ranger V:vector A:angle Z N Ar:array
@trigger
interval(25)
timer("A",100)
if(N<25&clk("A")) {
N++
holoCreate(N)
holoCreate(N*100)
holoAlpha(N*100,0)
holoColor(N,randvec()*255)
Ar[N,vector]=entity():pos()+(randvec()*100):setZ(0)
Ar[N*1000,number]=random(1,3)
}
for(I=1,25) {
rangerHitWater(1)
R = rangerOffset(12,holoEntity(I*100):pos()+vec(0,0,6),vec(0,0,-1))
Ar[I,vector]=Ar[I,vector]+vec(0.71*Ar[I*1000,number],0,0)
Ar[I+100,angle]=Ar[I+100,angle]+ang(4*Ar[I*1000,number],0,0)
holoAng(I,Ar[I+100,angle])
Z = cos(Ar[I+100,angle]:pitch()*4+180)*0.9+8
holoPos(I,Ar[I,vector]:setZ(Z+R:position():z()))
holoPos(I*100,Ar[I,vector]:setZ(R:position():z()))
}
Bookmarks