forums

TNT Basic Forums > Programming Q&A
Object parameters
< Last Thread     Next Thread >
Author
Thread        Post A Reply

06-20-2003 03:02

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

I'm trying to assign values to objects. Two ways I came up with are:
1) Putting the values in the objects' names
2) Making an array in which I can store values for each object

In order to be able do these, it would be very helpful to:
1) Be able to view an object's index in hieroglyph's map editor
or
2) Be able to access an object's name in the code

Is one of these possible? Or are there better ways to assign values to objects?

Thanks in advance
Eric

06-20-2003 12:51

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Currently, there is NO way to set values to objcts. There are some workarounds:

1- There is a little tip with polygons ( won't work if you them for collision detection thought ) . For example, if an enemy starts in a green polygon, it goes very fast, in a yellow it goes at normal speed and in red very slowly.
2- You can set value per ID
3- You can create you own objects and editor

e.g: String objects="<spider,5x6,speed=6><bonus,10x6,value=5>"

06-20-2003 16:12

Posted by:
puffin

Click Here to Email puffin   Find more posts by puffin

you could set values of variables in the condition that something happened involving the object.

06-20-2003 18:02

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Thanks for the help!

>1- There is a little tip with polygons ( won't work if you them for collision detection thought ) . For example, if an enemy starts in a green polygon, it goes very fast, in a yellow it goes at normal speed and in red very slowly.

Is there a way for the code to read the color of an object, or is this just for your own info?

>3- You can create you own objects and editor

Yeah that would work too...it never crossed my mind, actually :)

>you could set values of variables in the condition that something happened involving the object.

I'll keep this one in mind

Thanks again!
Eric

06-21-2003 13:21

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

> Is there a way for the code to read
> the color of an object, or is this
> just for your own info?

No,but you can read the ID. The color is there so that they don't look all the same.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.