This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-04-10 02:46:57

Imaginos
New Scratcher
Registered: 2013-03-06
Posts: 56

Costume selection

I'm currently working on an isometric game. I have set up a variable named "Di" (direction) which can be numbered 1 to 8 and I have created a sprite costume for each of the 8 possible directions of my main character. I am having difficulty telling my script which costume to show for each direction. It should be simple enough... If Di=1 show costume#1, If Di =4 show costume#4 etc... I just can't figure out how to do this.

Can any of you good Scratchers help me?

Offline

 

#2 2013-04-10 07:10:13

OverPowered
Scratcher
Registered: 2012-07-27
Posts: 100+

Re: Costume selection

Erm... Make your sprite "non-turning" and add this:

when green flag clicked
forever
set [Di v] to (((direction) + (180)) / (45))
switch to costume (Di)


Newest project: Tunnel TEST ~http://blocks.scratchr.org/API.php?user=OverPowered&action=onlineStatus~ On my mind: Unicameralism

Offline

 

Board footer