Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
I need info about LVZ and module making.

 
Post new topic   Reply to topic Printable version
 View previous topic  f1 Post :: Post Background help  View next topic  
Author Message
corvey
Novice


Joined: Apr 02 2007
Posts: 40
Offline

PostPosted: Mon Apr 02, 2007 1:55 am    Post subject: I need info about LVZ and module making. Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Chambahs
Power attack
Power attack


Joined: Jun 19 2005
Posts: 820
Offline

PostPosted: Mon Apr 02, 2007 11:39 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Mon Apr 02, 2007 3:53 pm    Post subject: Reply to topic Reply with quote

`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
View users profile Send private message Add User to Ignore List AIM Address
corvey
Novice


Joined: Apr 02 2007
Posts: 40
Offline

PostPosted: Wed Apr 04, 2007 2:55 am    Post subject: Reply to topic Reply with quote

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 icon_eek.gif


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
View users profile Send private message Add User to Ignore List
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Wed Apr 04, 2007 6:50 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Wed Apr 04, 2007 12:22 pm    Post subject: Reply to topic Reply with quote

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:

Code: Show/Hide
/** 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:

Code: Show/Hide
/** 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
View users profile Send private message Add User to Ignore List AIM Address
corvey
Novice


Joined: Apr 02 2007
Posts: 40
Offline

PostPosted: Wed Apr 04, 2007 3:02 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> LVZ/LVL Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 657 page(s) served in previous 5 minutes.

phpBB Created this page in 0.544542 seconds : 32 queries executed (82.4%): GZIP compression disabled