The Dink Network

Reply to Re: I love photoshop.

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:
 
 
April 2nd 2013, 09:26 AM
wizardg.gif
Leprochaun
Peasant He/Him Japan bloop
Responsible for making things not look like ass 
How do I script a chest with 100 gold in it, and a longsword? No tutorial I found has anything about a chest.

You'll want to do several things for this.

void hit(void)
{
freeze(1);
wait(20);

//play the chest animation by changing the brain, base_walk, and speed of the sprite.
wait(20);
//create the gold sprite and use sp_script on it.
//add the sword to the inventory.
say_stop("LOOK AT THE SIZE OF THIS POKING STICK!", 1);
wait(50);
unfreeze(1);

//if you're using a global declare it now.
}

For the script you make to assign to the gold:

void main(void)
{
sp_touch_damage(&current_sprite, -1);
//make it hard(giggity)
}

void touch(void)
{
&gold += 100;
// then use a nodraw and an sp_active

}

So your scripts should be something like those. I'd suggest playing around with each thing step by step. Like just start by trying to make sure the animation will play.

Good Luck.