View previous topic :: View next topic |
Author |
Message |
Barley Member
Joined: 05 Feb 2005 Posts: 3 Location: Manchester
|
Posted: Sat Feb 05, 2005 3:45 pm Post subject: Object properties |
|
|
I was wondering if someone could help me. I am currently writing a game in C. I have imported a terrain as a prefab (object = 9), which I detect in my world. I know want to add other prefabs such as towers etc, but they also have the object id of 9. This is causing me a few problems. I could work around this but was wondering if there was a way of changing a prefabs object id from within the DeleD editor without having to edit the file manually. Usually the esiest things are the hardest lol.
By the way, geat tool. |
|
Back to top |
|
|
Barley Member
Joined: 05 Feb 2005 Posts: 3 Location: Manchester
|
Posted: Sat Feb 05, 2005 4:19 pm Post subject: workaround |
|
|
I have managed to work around this problem by just giving the terrain prefab produced using MultiScape and ID of 255 by manually editing the DMF file for my world. I was having problems because my code reacts to the terrain in a certain way when I detect it and reacts differently to other objects in the world, such as cubes. As this is my first 3d game, I may be going about things in totally the wrong direction. If anyone does come up with a better solution that would be great. |
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Sat Feb 05, 2005 4:49 pm Post subject: |
|
|
Hi there Barley, and welcome!
I think you're confusing the object type with the object ID. These are 2 different things. All prefabs are of type = 9 so to DeleD, the terrain and towers are simular types of objects. They do, however, have unique ID values. Just save a few objects (wether prefabs or not) to a file and check their ID values (see fileformat description for more info). Maybe you can use those values for your purpose? Another suggestion would be to use the Tag property of an object. It's there for your own use. |
|
Back to top |
|
|
Barley Member
Joined: 05 Feb 2005 Posts: 3 Location: Manchester
|
Posted: Sat Feb 05, 2005 4:56 pm Post subject: |
|
|
Hi Jeroen,
Thanks very much!. Like I said I am very new to this, so much to do, never sleep anymore lol. I think I just assumed I would use the Object ID, I will use the Tags instead. Thanks for the fast response. Hopefully when it's all working well, I will let people have a look at it. Everyone elses projects on the site look so good!
Regards,
Barley |
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Sat Feb 05, 2005 4:58 pm Post subject: |
|
|
Barley wrote: |
Thanks very much!. Like I said I am very new to this, so much to do, never sleep anymore lol. I think I just assumed I would use the Object ID, I will use the Tags instead. Thanks for the fast response. Hopefully when it's all working well, I will let people have a look at it. Everyone elses projects on the site look so good! |
No problem, just ask any questions you might have and spread the word about DeleD and it's community. Looking forward to any screenshots of your project as well! |
|
Back to top |
|
|
|