The Dink Network

Reply to Re: Resizing sprite

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
June 4th 2016, 09:21 PM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
I always just use the sp() function.

That also only works well in (free)dinkedit, AFAIK, because WDE doesn't give you the sprite number? I've never used WDE, so I could be wrong. In my editor, I actually give names to sprites and pass those to sp(); the preprocessor turns the names into whatever number gets assigned to the sprite and it all works.

The other popular approach, aside from the brain trick, is to assign current_sprite to a global in the sprite's main function, but I think you were referring to that originally.

For cut scenes, you can also create the sprites in the script, using create_sprite. That returns a number (just like get_sprite_with_this_brain() and sp() do), which you can then use in move(), say(), etc.