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
regiontriggers
Goto page 1, 2  Next
 
Post new topic   Reply to topic Printable version
 View previous topic  Quick Links to Projects Post :: Post web stats  View next topic  
Author Message
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Tue Apr 10, 2007 5:58 pm    Post subject: regiontriggers Reply to topic Reply with quote

Latest version 1.1a: asss-regiontriggers-1.1a.zip

I've made a new trigger module using regions (old one).

This module will perform certain actions when players enter and leave regions. Actions include: messages, sounds, shipreset, prizing, warping and object toggling. Actions can be targeted at: player, arena, player team, enemy teams.

There is also an option to toggle objects on when players enter the arena, this can be used to initialise "roof lvz" to be on or for something as simple as a newsbox/help.

Some of you may notice this sort of module will become redundant when asss supports python embedded in maps.

Settings:
Code: Show/Hide
[Misc]
; set this as low as 20 to get better response times
RegionCheckInterval = 50

[regiontriggers]
TriggerN-RegionName = regionname

; the following are all optional
TriggerN-EnterMessage = enter
TriggerN-LeaveMessage = leave
TriggerN-EnterSound = 0
TriggerN-LeaveSound = 0
TriggerN-EnterShipReset = 0
TriggerN-LeaveShipReset = 0
TriggerN-EnterPrize = prize [, count]
TriggerN-LeavePrize = prize [, count]
TriggerN-EnterWarpTo = x, y
TriggerN-LeaveWarpTo = x, y
TriggerN-EnterObjon = 0
TriggerN-LeaveObjon = 0
TriggerN-EnterObjoff = 0
TriggerN-LeaveObjoff = 0
TriggerN-Target = 0 (0=player, 1=arena, 2=player team, 3=enemy teams)

; use this to toggle ServerControlled objects on when a player enters an arena
; this is useful if you are simulating roofs of buildings
InitialN-Objon = 0

There is a sample arena in the package.

It would be nice to expand on this and also provide a GUI to make editing the settings easier. Something like the starcraft triggers explained here:
http://forums.minegoboom.com/viewtopic.php?p=69362#69362
_________________
ss news




v1 1.4.3 doc dll src arena

asss-regiontriggers-1.0.zip - 32.35 KB
File downloaded or viewed 106 time(s)


Last edited by Smong on Sat Apr 14, 2007 2:12 pm, edited 3 times in total
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Tue Apr 10, 2007 6:38 pm    Post subject: Reply to topic Reply with quote

For some reason it isn't working for me, it being the aexample arena...

It loads the map, but not any lvz..
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Tue Apr 10, 2007 6:47 pm    Post subject: Reply to topic Reply with quote

Ok, to test the arena copy the folder called "arena" to asss's arenas directory. Then rename it to something like "demo". Then copy the dll to the bin directory, add "regiontriggers:regiontriggers" to the bottom of modules.conf and restart the server.

Assuming you've done all that when you enter the arena you should see 1 lvz saying "can't touch this". This lvz disappears when you fly into a certain box. Another lvz will only appear if fly into another certain box.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Tue Apr 10, 2007 7:27 pm    Post subject: Reply to topic Reply with quote

i got the sounds and prize and warp working at least...lvz aren't showing up though. that's nothing i have to worry about, cause i can do lvz right anyways. great , great, great, great, module icon_smile.gif
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Tue Apr 10, 2007 8:14 pm    Post subject: Reply to topic Reply with quote

I just remembered, the objects module isn't listed in modules.conf by default. You need to add it in. My module should have printed a warning message that it couldn't find the objects module.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Wed Apr 11, 2007 9:33 pm    Post subject: Reply to topic Reply with quote

When using this module, can the regions you use be made through dcme? or must they be custom? i know it's working because on asss.exe(or asss.bat, what ever it is), it says


W <regiontriggers> {0} region missing: sound
D <regiontriggers> {0} 1 triggers read

but i made a region in dcme called sound. any ideas?
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Thu Apr 12, 2007 2:46 pm    Post subject: Reply to topic Reply with quote

Interesting, I actually used DCME 3.1.1 to make the demo map so it should work.

- Either you edited the wrong file (easy mistake in dcme with all those autosave options).
- You saved it to the maps folder, but asss is still using the one in arenas/demo folder.
- You forgot to copy the edited file back to the arena's folder (only happens if you save your maps to a different directory before editing them).
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Thu Apr 12, 2007 6:56 pm    Post subject: Reply to topic Reply with quote

i didn't do any of the above. i also made a new map, maybe the elvl in the map was corrupt. still got that problem. i am using 3.1.3..... i'll try to find 3.1.1, but be best if it was compatible with .3 too..

--------------------------------
Edit: ok, i attemted to make "setship" trigger. Here i'll post it.[/i]




regiontriggers.c - 12.22 KB
File downloaded or viewed 91 time(s)
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Thu Apr 12, 2007 7:35 pm    Post subject: Reply to topic Reply with quote

I don't think 3.1.1 and 3.1.3 are any different eLVL-wise... To know if your elvl data is corrupt, just save it, close the map, reopen it, everything should still be in place
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Thu Apr 12, 2007 9:03 pm    Post subject: Reply to topic Reply with quote

That's an amazing attempt at editing my module, only thing you need to do is add "short setship;" to the end of "struct action_t" which is near the top of the file. After that fix your compile errors and it might just work.

Hint: game->SetShip uses 0-7, but in the .conf file they will be 1-8 so you need to add -1 somewhere.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:37
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Thu Apr 12, 2007 11:18 pm    Post subject: Reply to topic Reply with quote

Actually, doesn't SetShip use 0-8, 8 being the spec ship?

And instead of using the actual number, I suggest checking out defs.h(in include), and looking at the enums. You just use something like SHIP_WARBIRD in place of the actual ship number.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Fri Apr 13, 2007 7:49 am    Post subject: Reply to topic Reply with quote

Don't confuse him! One step at a time.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sat Apr 14, 2007 12:44 am    Post subject: Reply to topic Reply with quote

i get it icon_surprised.gif

smong:can you fix my "amazing attempt" with what you said. it seems like you could do that easily, and i can't.

_____________________________-
btw, my elvl isn't corrupt. so, none of you help has worked yet :\.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sat Apr 14, 2007 1:04 am    Post subject: Reply to topic Reply with quote

Code: Show/Hide
[Misc]
RegionCheckInterval = 20

[regiontriggers]
Trigger0-RegionName = ship
Trigger0-EnterMessage = You now are in the shark!
Trigger0-EnterSound = 34
Trigger0-EnterSetShip = 7
Trigger0-Target = 0



there's some more to work with..not nothing i see though. added target thing because it wasn't working normally. i'm guesing default is 0 but you never know.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sat Apr 14, 2007 9:45 am    Post subject: Reply to topic Reply with quote

Ok here's an update with SetShip and IncShip actions.
Code: Show/Hide
; SetShip: use 1-8 (wb-shark), 9=spec
TriggerN-EnterSetShip = 0
TriggerN-LeaveSetShip = 0
; IncShip: if positive, ship will be incremented
; example: IncShip=1, warbird enters and gets set to javelin, javelin enters and gets set to spider, etc
; example2: IncShip=2, warbird -> spider, javelin -> leviathan, etc
; if negative ship is decremented, shark -> lancaster, etc
; this will not spec players and you can't decrement less than warbird
TriggerN-EnterIncShip = 0
TriggerN-LeaveIncShip= 0




v1.1 (1.4.3 doc dll src arena)

asss-regiontriggers-1.1.zip - 34.18 KB
File downloaded or viewed 84 time(s)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sat Apr 14, 2007 10:33 am    Post subject: Reply to topic Reply with quote

Since i can't get it to work, see if you can. I'll post the map and you just make a region, and a region trigger.conf data, and give it back. plz of course.



rt_test.lvl - 161.4 KB
LVL Preview: Full Size - Half Size
File downloaded or viewed 79 time(s)
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sat Apr 14, 2007 2:11 pm    Post subject: Reply to topic Reply with quote

Ah ok I think the problem may be because you have a 24bit tileset. The public version of asss doesn't support that yet. I'm uploading a fixed version of the mapdata module so you can continue to use your tileset.

Update regiontriggers.dll then look for "mapdata" in modules.conf and change it to "regiontriggers:mapdata".

Edit: Yes 0 is the default target, it doesn't matter if you write it into the conf or not.




1.1a (1.4.3 doc dll src arena)

asss-regiontriggers-1.1a.zip - 48.76 KB
File downloaded or viewed 107 time(s)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sat Apr 14, 2007 2:23 pm    Post subject: Reply to topic Reply with quote

Bravo!BRavo!did you make that mapdata.c thing? it looks complicated. anyway, last problem. have them change ships, but keep their position, or maybe be able to change position. nvm, i can do this with autowarp thing. ty gj. no more problems.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sat Apr 14, 2007 3:31 pm    Post subject: Reply to topic Reply with quote

I found an improvement icon_smile.gif. lol, anyways, a way to record what ship they have, the enter a region and change ships, they leave the region and get back in the ship they wre in before. possible?
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sat Apr 14, 2007 4:11 pm    Post subject: Reply to topic Reply with quote

when you have you're prizing triggers, with #'s, what is that going by, what does each # correspond with(what prize) ty.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sat Apr 14, 2007 4:12 pm    Post subject: Reply to topic Reply with quote

Putting players in the ship they last used, hmm. I think this might be taking a general module too far. It can still be done but you might want to think about making a module just for what you want to do.

And I didn't write the mapdata module, it comes with asss.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Bak
?ls -s
0 in


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

PostPosted: Sat Apr 14, 2007 4:25 pm    Post subject: Reply to topic Reply with quote

prize numbers are here: http://www.minegoboom.com/server/commands.html
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:37
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Sat Apr 14, 2007 8:37 pm    Post subject: Reply to topic Reply with quote

tcsoccerman wrote:
I found an improvement icon_smile.gif. lol, anyways, a way to record what ship they have, the enter a region and change ships, they leave the region and get back in the ship they wre in before. possible?


I'd suggest using playerdata. Here's an example:
Code: Show/Hide
typedef struct ShipData
{
    int previousShip;
    int currentShip;
} ShipData;

local int playerKey;

When they enter the region, you just take previousShip, and set it equal to currentShip. Then you change their ship, and whatever ship you change it to, you put that value in currentShip. When they leave, change their ship to previousShip, put previousShip equal to currentShip, then update currentShip to whatever you changed their ship to.

tcsoccerman wrote:
when you have you're prizing triggers, with #'s, what is that going by, what does each # correspond with(what prize) ty.


Lol, just check defs.h(in with the other includes), you don't even have to use prize numbers. just use PRIZE_ROCKET or stuff like that. It's very simple. ^^
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
tcsoccerman
Server Help Squatter


Age:32
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sat Apr 14, 2007 9:29 pm    Post subject: Reply to topic Reply with quote

what file are those values under?
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:37
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Sat Apr 14, 2007 10:00 pm    Post subject: Reply to topic Reply with quote

Animate Dreams wrote:

Lol, just check defs.h(in with the other includes),
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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: 159 page(s) served in previous 5 minutes.

phpBB Created this page in 0.786558 seconds : 53 queries executed (92.8%): GZIP compression disabled