The Dink Network

Reply to Re: D-Modding tips 'n tricks

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:
 
 
May 3rd 2010, 04:19 AM
dinkdead.gif
&return returns the value of the last thing you did, basically... eg, these are identical:
int &sprite = create_sprite(123, 456, 3, 21, 1);
sp_script(&sprite, "duck");

create_sprite(123, 456, 3, 21, 1);
sp_script(&return, "duck");


Useful for things like that but keep in mind it will change for just about anything, so this will not work:
create_sprite(123, 456, 3, 21, 1);
sp_script(&return, "duck");
sp_size(&return, 150);

Because the &return in sp_size is now the script number of duck.c, not any more the sprite number. It would be like this:
int &sprite = create_sprite(123, 456, 3, 21, 1);
&sprite = sp_script(&sprite, "duck");
sp_size(&sprite, 150);


And about the brains, yes what Toasty said. I went up to brain 72 I think, doesn't affect the behaviour. You'd have to use normal brain 9 or something if you needed it to move around etc properly though I'd imagine, not sure.