I cant seem to make a 3d game. I tried making it so if up arrow pressed, change size, right arrow change x, blah blah blah. Everything I try has a glitch. Can anyone help?
Offline
can you also show me, too?
you can use scratchblocks also
-streamline4
Offline
i'm new to this and to scratchblocks, but this is what i would do. uses WASD keys for movement.
***It has a bug I don't know how to fix though: if i press two keys at once one of the keys will remain locked down until you press it again, not sure why.
when gf clicked set size to (100)% set [depth v] to (0) set x to (0) set y to (-200) forever set size to ((100) - ((depth)/(4))) % set y to (((10) * ([sqrt v] of ((1)+(depth)))) - (100)) if <key [w v] pressed?> change [depth v] by (3) if <(depth) > (200)> set [depth v] to (200) end end if <key [s v] pressed?> change [depth v] by (-3) if < (depth) < (0)> set [depth v] to (0) end end if < key [a v] pressed?> change x by (-3) end if <key [d v] pressed?> change x by (3) endyou'll have to define a variable "depth" for your sprite.
Offline
Hey Everyone check out my game it's 3D u can check the scripts to help you I still can't understand how It worked. but u can check it. it's here:-
http://scratch.mit.edu/projects/Aqibaslam123/3206807
Offline
cauzality wrote:
i'm new to this and to scratchblocks, but this is what i would do. uses WASD keys for movement.
***It has a bug I don't know how to fix though: if i press two keys at once one of the keys will remain locked down until you press it again, not sure why.when gf clicked set size to (100)% set [depth v] to (0) set x to (0) set y to (-200) forever set size to ((100) - ((depth)/(4))) % set y to (((10) * ([sqrt v] of ((1)+(depth)))) - (100)) if <key [w v] pressed?> change [depth v] by (3) if <(depth) > (200)> set [depth v] to (200) end end if <key [s v] pressed?> change [depth v] by (-3) if < (depth) < (0)> set [depth v] to (0) end end if < key [a v] pressed?> change x by (-3) end if <key [d v] pressed?> change x by (3) endyou'll have to define a variable "depth" for your sprite.
You can also do it with arrow keys
when gf clicked set size to (100)% set [depth v] to (0) set x to (0) set y to (-200) forever set size to ((100) - ((depth)/(4))) % set y to (((10) * ([sqrt v] of ((1)+(depth)))) - (100)) if <key [up arrow v] pressed?> change [depth v] by (3) if <(depth) > (200)> set [depth v] to (200) end end if <key [down arrow v] pressed?> change [depth v] by (-3) if < (depth) < (0)> set [depth v] to (0) end end if < key [left arrow v] pressed?> change x by (-3) end if <key [right arrow v] pressed?> change x by (3) endAnd i have to admit, that was an epic first try on the scratchblocks and it worked i'm proud of that
Offline
Aqibaslam123 wrote:
Hey Everyone check out my game it's 3D u can check the scripts to help you I still can't understand how It worked. but u can check it. it's here:-
http://scratch.mit.edu/projects/Aqibaslam123/3206807
Please go to the Show and Tell area of the Forums to advertise your projects
Offline
7734f wrote:
Aqibaslam123 wrote:
Hey Everyone check out my game it's 3D u can check the scripts to help you I still can't understand how It worked. but u can check it. it's here:-
http://scratch.mit.edu/projects/Aqibaslam123/3206807Please go to the Show and Tell area of the Forums to advertise your projects
They were trying to help hrscratch with 3D by showing an example project.
Offline