Author |
Message |
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Tue Apr 10, 2007 5:58 pm Post subject: regiontriggers |
|
|
|
|
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:
[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 |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Tue Apr 10, 2007 6:38 pm Post subject: |
|
|
|
|
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 |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Tue Apr 10, 2007 6:47 pm Post subject: |
|
|
|
|
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 |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Tue Apr 10, 2007 7:27 pm Post subject: |
|
|
|
|
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
|
|
Back to top |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Tue Apr 10, 2007 8:14 pm Post subject: |
|
|
|
|
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 |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Wed Apr 11, 2007 9:33 pm Post subject: |
|
|
|
|
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 |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Thu Apr 12, 2007 2:46 pm Post subject: |
|
|
|
|
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 |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Thu Apr 12, 2007 6:56 pm Post subject: |
|
|
|
|
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 |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Thu Apr 12, 2007 7:35 pm Post subject: |
|
|
|
|
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 |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Thu Apr 12, 2007 9:03 pm Post subject: |
|
|
|
|
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 |
|
|
Animate Dreams Gotta buy them all! (Consumer whore)
Age:37 Gender: Joined: May 01 2004 Posts: 821 Location: Middle Tennessee Offline
|
Posted: Thu Apr 12, 2007 11:18 pm Post subject: |
|
|
|
|
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 |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Fri Apr 13, 2007 7:49 am Post subject: |
|
|
|
|
Don't confuse him! One step at a time.
|
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sat Apr 14, 2007 12:44 am Post subject: |
|
|
|
|
i get it
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 |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
|
Back to top |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Sat Apr 14, 2007 9:45 am Post subject: |
|
|
|
|
Ok here's an update with SetShip and IncShip actions.
; 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 |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sat Apr 14, 2007 10:33 am Post subject: |
|
|
|
|
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 |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Sat Apr 14, 2007 2:11 pm Post subject: |
|
|
|
|
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 |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sat Apr 14, 2007 2:23 pm Post subject: |
|
|
|
|
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 |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sat Apr 14, 2007 3:31 pm Post subject: |
|
|
|
|
I found an improvement . 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 |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sat Apr 14, 2007 4:11 pm Post subject: |
|
|
|
|
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 |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Sat Apr 14, 2007 4:12 pm Post subject: |
|
|
|
|
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 |
|
|
Bak ?ls -s 0 in
Age:25 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
|
Back to top |
|
|
Animate Dreams Gotta buy them all! (Consumer whore)
Age:37 Gender: Joined: May 01 2004 Posts: 821 Location: Middle Tennessee Offline
|
Posted: Sat Apr 14, 2007 8:37 pm Post subject: |
|
|
|
|
tcsoccerman wrote: | I found an improvement . 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:
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 |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sat Apr 14, 2007 9:29 pm Post subject: |
|
|
|
|
what file are those values under?
|
|
Back to top |
|
|
Animate Dreams Gotta buy them all! (Consumer whore)
Age:37 Gender: Joined: May 01 2004 Posts: 821 Location: Middle Tennessee Offline
|
Posted: Sat Apr 14, 2007 10:00 pm Post subject: |
|
|
|
|
Animate Dreams wrote: |
Lol, just check defs.h(in with the other includes), |
|
|
Back to top |
|
|
|