if (do_name() != 'Home') : ?>
endif ?>
Posted by Melan on Apr 21, 2007
Uh, doesn't seem to work.
Well, i want a circle to grow bigger to certain amount of size (lets say 25) and then get smaller till he reaches 0. Then it should grow bigger again.
How do i create a loop like that ?
Below is wrong, because as from the moment it's counting down, its below the value of 25 and gets stuck between adding 0.4 and substracting 0.4.
if diameter
Posted by Melan on Apr 21, 2007
if diameter
Posted by Melan on Apr 21, 2007
Arghh, code doesn't work here really well.
Posted by tom on Apr 21, 2007
include("util/comment.php"); ?>
Hi Melan,
There was a bug in the forum when you used <= and => but that's hopefully solved now.
As to your question, the trick is to keep a direction variable which is 1 when the loop is going up and -1 when the loop is going down:
# Initialise at the top of your script. direction = 1 diameter = 0
# The actual increment: if diameter < 0 or diameter >= 25: direction = -direction diameter += 0.4 * direction
Bigger then & Smaller Then
Posted by Melan on Apr 21, 2007hi all,
Are these 2 mathematical instructions in NodeBox written like this >= and