The Dink Network

Yet more questions

January 17th 2011, 05:50 AM
pq_rabbit.gif
1. can you create sprites in scripts example:
void main(void)
{
if (&story == 5)
{
create_sprite(dont knowe this part)
}
}

2. need slow step by step instructions to get graphics into d-mod(just not working for some reason)

3.
last one
i have followed exact staps from robjs tutoril of windinkedit to get midis into a d-mod and its just not working.
(i even used same song/number/file
January 17th 2011, 06:02 AM
boncag.gif
jugglingdink
Peasant He/Him United Kingdom
Streetfish 
Yes, this is possible and can be extremely handy depending on what your DMOD needs to do.

this is an example:

int &example;
&example = create_sprite(100, 150, 0, 50, 1);
//The first number (100) is the sprite's X position
//The second number (150) is the sprite's Y position
//The third number (0) is the sprite's brain
//The fourth number (50) is the sprite's sequence
//And the fifth number (1) is the frame

//You could then make it talk
say("`4My text is orange", &example);

//Or you could add a script to that sprite by using
sp_script(&example, "test.c");


Remember to call it &example (or whatever you called it) instead of &current_sprite.

If you don't know a sprites sequence or frame, then you can right-click the sprite and choose 'Properties' in WinDinkEdit. I think all editors have something like this, but I wouldn't know because I always use WinDinkEdit.

And if there's anything I haven't been clear on, feel free to ask me or someone else to try and explain it better

EDIT: Oops, didn't notice the other two questions due to skim-reading
January 17th 2011, 06:21 AM
dinkdead.gif
"need slow step by step instructions to get graphics into d-mod(just not working for some reason)"

1) Get your graphic! It must be a BMP, 24 bit or less. Check colour depth when saving it in an image editor if you're not sure what that is.

2) Name it "name-01" and if there's more in the same sequence "name-02" etc. Try and keep the name below 8 characters, just in case.

3) Put it inside your D-Mod's graphics folder, in a sub-folder is fine.

4) Open the dink.ini file and find a number that isn't already being used for something else, for example 850.

5) Type this:
load_sequence graphics\name- 850
//or, eg,
load_sequence graphics\subfolderifused\etc\name- 850


6) That's it! Your new sprite should show up in the editor. If you want it to animate or want to change the hardbox for a whole sequence you'll need some other numbers after the 850, see the section in the DinkC Reference for more details on that.

"i have followed exact staps from robjs tutoril of windinkedit to get midis into a d-mod and its just not working.
(i even used same song/number/file"


Can you hear midis in other D-Mods? Maybe you have the SW Synth volume turned down in Windows settings.
January 17th 2011, 06:18 PM
pq_rabbit.gif
ok great i got the graphics working and the midis (was just sw hearing thingy)

would i be able to attach a warp and make it invisible with the sprite i create?
January 17th 2011, 06:22 PM
dinkdead.gif
Try it!

Yes, it's exactly the same as any other sprite.
January 17th 2011, 06:36 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Speaking of SW Synth volume, is there a way to adjust that through Dink in-game?
January 17th 2011, 06:38 PM
dinkdead.gif
No, though it would be nice...

You can lower the volume of wavs but that's about it.
January 17th 2011, 07:17 PM
pq_rabbit.gif
with the thing i mean what is the script to make invisible/warp cuz i always just do the cheat way in windinkeditplus where it is tons easier
January 17th 2011, 07:37 PM
anon.gif
Kwahworraps
Ghost They/Them
 
If you look in the Techniques section of the DinkC Ref. (find it in the develop folder, dinkc.chm) it goes through a lot of basic stuff like this nicely.

And I'm pretty sure RobJ or Metatarasal have covered it between them too, take a look at those tutorials, they're good
January 17th 2011, 07:43 PM
pq_rabbit.gif
alas but no those 2 dont show how to make warp/invisibility in a script for a spirte.
January 17th 2011, 07:52 PM
anon.gif
knidsm
Ghost They/Them
 
LOL
...maybe try 'rudiments of scripting' as well bunny avatar person
January 17th 2011, 08:01 PM
anon.gif
elfudge
Ghost They/Them
 
To make a sprite invisible, use this code

Sp_nodraw(&sprite,1);

To warp, do something like this in the touch procedure:

Freeze(1);
Fade_down():
Script_attach(1000);
&player_map = 1;
Load_screen();
Draw_screen();
Fade_up();
Kill_this_task();
January 17th 2011, 08:18 PM
pq_rabbit.gif
thanks il try it