The Dink Network

Reply to Re: Bah

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:
 
 
January 23rd 2014, 01:34 PM
goblins.gif
you should just store it in sprite properties like hitpoints, gold, defense, ... You won't be using those properties for their normal purpose anyway

This is a great technique to keep in mind for any DMOD author. For example, say you want to make a chest that gives an exact amount of gold when you open it, but don't want to make a script for each chest. You can instead store the amount of gold the chest gives in it's sp_defense (which you can change in the sprite properties in the editor) in order to make chests that give all sorts of predetermined amounts of gold while using only 1 script to do it. The technique can be used for many other possibilities though, and definitely good to keep in mind at all times.