PDA

View Full Version : Getting going total Newbie to this


Donone
11th November 2011, 14:14
I am a programmer and so have some understanding.
I am finding the explanations in tutorials and helps either ambiguous or assuming that I already know.
I therefore need help please.

I have tried experiments with a blank screen and a simple 'shapecode' section to evaluate what happens, one item at a time. I have found it difficult to get clone shapes because when one works an obvious (to me) change doesn't. Example...
...
shapecode_0_x=0.5
shapecode_0_num_inst=4
...
shape_0_per_frame1=y =if(1-equal(instance,0),if(1-equal(instance,1),if(1-equal(instance,2),0.25),0.5),0.75)
...
didn't work
this sort of did giving me 2 objects but I think one of them may have been a default at y=0...

shapecode_0_x=0.5
shapecode_0_num_inst=4
...
shape_0_per_frame1=y=equal(instance,0)*0.25
shape_0_per_frame1=y=equal(instance,1)*0.5

I tried the second item as frame2 but that didn't seem to move the object.

This raises the questions...
1. Is the frame number the frame count from 0-60 or is it simply the instruction number in the frame section?

2. If I leave out y=some number it seems to provide a default of 0.5; correct?

3. Should the 2nd instance appear fainter than the original?
I have a million more questions but maybe an answer to these may prevent the others. I seem to have gone off at a tan.

Amandio C
11th November 2011, 18:02
Hello Donone and welcome.
It seems you are editing the milk file, which is the hard way to work. The presets are edited inside Milkdrop. MD is like a Ferrari, very fast but with a rough interface. Press m while the Md window is focused. then navigate the menus with the arrow keys. Press Ctrl+Enter to validate the changes in code. The changes are not saved in the file though, you need to leave the menus and press S.
Im MD properties check the option "start Md with preset lock on", preventing MD to automatically change preset before you save it.
Check some of my presets to see how to code with shapes, feel free to ask. Good luck.

Donone
12th November 2011, 11:48
Thank you for the advice and welcoming Amandio C.

Nitorami
17th November 2011, 16:50
Hi Donone
hope you'll stay a while, it's rather quiet around here...

As Amandio said, use the MD editor rather than an external editor, which will drive you nuts. Forget the line prefixes such as shape_0_per_frame1 etc.

Note - all shape parameters (x,y,rad,ang etc.) default to those set manually per menu, except if you override them with your own code in the [edit per-frame] section.

The global variable "frame" starts from zero when starting MD and then counts to infinity.

Instead of y=equal(instance,1)*0.5 you may equally use more common constructs such as

if(instance==1,y=0.5,0); or
y = (instance==1)*0.5;

Cheers
Martin