Reply to Re: How do i make it so i can pick up gold
If you don't have an account, just leave the password field blank.
Generally this is done via the script emake.
You can put one of these line in a sprites void die() procedure.
external("emake","small"); //for small hearts
external("emake","medium"); //for a low amount of gold, food, small heart or a large heart.
external("emake","large"); //for a high amount of gold, food or a large heart
external("emake","xlarge"); //for a large heart or a really large sum of money
What you get when running one of these procedures is randomly determined.
If you want to manualy determine the amount of money dropped by a sprite try putting this in the void die() procedure:
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
int &golda = create_sprite&save_x,&save_y,0,178,3);
sp_script(&golda,"lgold");
//(you could actually also use mgold, 1gold, gold200 or gold500 for this, but I chose lgold for this example)
If you also want to excactly determine the amount of gold given to the player, copy lgold from the source folder and edit it as you like.
You should probably replace these lines:
int &mcrap = random(25,50);
&gold += &mcrap;
say("I found &mcrap gold.",1);
with:
&gold += *the amount of money you want to give the player*;
say("I found *the amount of money you want to give the player* gold.",1);
You can put one of these line in a sprites void die() procedure.
external("emake","small"); //for small hearts
external("emake","medium"); //for a low amount of gold, food, small heart or a large heart.
external("emake","large"); //for a high amount of gold, food or a large heart
external("emake","xlarge"); //for a large heart or a really large sum of money
What you get when running one of these procedures is randomly determined.
If you want to manualy determine the amount of money dropped by a sprite try putting this in the void die() procedure:
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
int &golda = create_sprite&save_x,&save_y,0,178,3);
sp_script(&golda,"lgold");
//(you could actually also use mgold, 1gold, gold200 or gold500 for this, but I chose lgold for this example)
If you also want to excactly determine the amount of gold given to the player, copy lgold from the source folder and edit it as you like.
You should probably replace these lines:
int &mcrap = random(25,50);
&gold += &mcrap;
say("I found &mcrap gold.",1);
with:
&gold += *the amount of money you want to give the player*;
say("I found *the amount of money you want to give the player* gold.",1);