[quote data-userid="24" data-postid="53759"]
Hi there!
I love the site and I was so impressed with the Emerald Eye game (by user PTeal presumably) that I thought I’d have a crack at making a game myself. I’m only just starting with DizzyAge and I’ve had a look at the doc tutorials but I’m missing something very obvious I’m sure:
How do you assign a name to an item? The first tutorial describes placing a leaf brush object on the map which you can pick up when playing it, but it doesn’t have a name.
Anyway, I’m basically rambling on and on to make this thread seem interesting when really all I need is for someone to tell me how I can give an item the name ‘A leaf’. {yolkfolk}:scratch:
Thanks for any help you can give me!
[/quote]
in objects.gs at the top of the file you will find the function called ObjectsSetNames in the default template it looks like this..
/////////////////////////////////////////////////////////////////////////////////
// Set objects names.
// All pickable objects (CLASS_ITEM) should have valid names.
/////////////////////////////////////////////////////////////////////////////////
func ObjectsSetNames()
{
ObjSetName( ObjFind(200), "BUCKET" );
}
To add an object create a new ObjSetName, in the function. Set the objects id in the ObjFind bit and the name in the quotes.
e.g. you want to set item number 105 to harp you would do the following
ObjSetName( ObjFind(105), "HARP" );