Author |
Message |
corvey Novice
Joined: Apr 02 2007 Posts: 40 Offline
|
Posted: Mon Apr 02, 2007 1:55 am Post subject: I need info about LVZ and module making. |
|
|
|
|
Hello,
I have a question about a module I'm starting to plan and make. I need to know if this LVZ program is what I need to find the location and a unique assigned address/coordinates of a image.
The scenario: If I had 100 different images that say looked like planets, I would need to be able to touch and land on this planet image and each image would have a unique image address for database purposes to trigger my home brew game module.
Is this tool that I'm going to need to help me implement a trigger to my written module code?
By the little bit I've read about it, it seems like this IS what I need. I sure would like to have a definite answer on this. |
|
Back to top |
|
|
Chambahs Power attack
Joined: Jun 19 2005 Posts: 820 Offline
|
Posted: Mon Apr 02, 2007 11:39 am Post subject: |
|
|
|
|
Yea, all images have their own object ID. If you check out all the LVZ Toolkits that are spread around, as well as integrated with the map editors (CLT, DCME, etc) then you will see that the last number would be corispondent with the Lvz Object ID. I DO believe there is a cap on lvz of 256 was it? Mmm anyway, to trigger it in your module just check out the "Objon/Objoff/Objset/Objmove" stuff. When it asks for ID, the ID in the lvz.ini is the one i was talking about. You can refer to the original LvzToolkit's example.ini if you need help with anything else. |
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:25 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Mon Apr 02, 2007 3:53 pm Post subject: |
|
|
|
|
`you can get 65k object id's and these can be shared among different images. You can have up to 256 images (and image ids), which can also be shared among different image instances.
a region could be used to specify the planet and then the module could take some action when the player enters the region. _________________ SubSpace Discretion: A Third Generation SubSpace Client |
|
Back to top |
|
|
corvey Novice
Joined: Apr 02 2007 Posts: 40 Offline
|
Posted: Wed Apr 04, 2007 2:55 am Post subject: |
|
|
|
|
Chambahs wrote: | Yea, all images have their own object ID. If you check out all the LVZ Toolkits that are spread around, as well as integrated with the map editors (CLT, DCME, etc) then you will see that the last number would be corispondent with the Lvz Object ID. I DO believe there is a cap on lvz of 256 was it? Mmm anyway, to trigger it in your module just check out the "Objon/Objoff/Objset/Objmove" stuff. When it asks for ID, the ID in the lvz.ini is the one i was talking about. You can refer to the original LvzToolkit's example.ini if you need help with anything else. |
I'll try to figure it out
Bak wrote: | `you can get 65k object id's and these can be shared among different images. You can have up to 256 images (and image ids), which can also be shared among different image instances.
a region could be used to specify the planet and then the module could take some action when the player enters the region. |
CLT map editor is what I am using. The editor is great. The images and regions are applied. How can I get to the region? When I write code, I need to know which planetID and playerID the player is in/on (I take it regionID would take the place of planetID) so the planetary function can be activated by chat command.
Thanks |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Wed Apr 04, 2007 6:50 am Post subject: |
|
|
|
|
You can put code in each region directly. I don't know if that's the right way to do it though... never played with ASSS much. I don't know if CLT allows you to do this, but DCME does. _________________ (Insert a bunch of dead links here) |
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:25 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Wed Apr 04, 2007 12:22 pm Post subject: |
|
|
|
|
that region-python scripting isn't implemented in asss yet, as far as I know.
In a module (see http://wiki.minegoboom.com/index.php/Writing_Modules) you need to use the Inregion callback from game.h, which will give you the region* and the player* who's entering / exiting the region:
/** this callback is called when someone enters or leaves a region. */
#define CB_REGION "region-1"
/** the type of CB_REGION
* @param p the player entering/leaving the region
* @param rgn the region being entered or left
* @param x the player's location in pixels, x coordinate
* @param y the player's location in pixels, y coordinate
* @param entering true if entering, false if exiting
*/
typedef void (*RegionFunc)(Player *p, Region *rgn, int x, int y, int entering);
/* NOTYETpycb: player, void, int, int, int */ |
You can then use a mapdata interface to get the region by its name and compare it to the Region* the callback gives you:
/** finds the region with a particular name.
* @param arena the arena that contains the map we want to look for
* the region in.
* @param name the name of the region we want. for now, this is
* case-insensitive.
* @return a handle for the specified region, or NULL if not found.
*/
Region * (*FindRegionByName)(Arena *arena, const char *name);
/* pyint: arena, string -> region */ |
|
|
Back to top |
|
|
corvey Novice
Joined: Apr 02 2007 Posts: 40 Offline
|
Posted: Wed Apr 04, 2007 3:02 pm Post subject: |
|
|
|
|
This is what I'm looking for. The Wiki link you gave is very resourceful. I will probably have some more question about this later, but for now it's enough to put me in the right direction.
Thanks Bak |
|
Back to top |
|
|
|