Author |
Message |
z.baront+ Guest
Offline
|
Posted: Wed Oct 04, 2006 10:25 am Post subject: ?doormode |
 |
|
|
|
can anyone give me some pointers on ?doormode |
|
Back to top |
|
 |
Maverick

Age:41 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
|
Back to top |
|
 |
xsp0rtsfanx Seasoned Helper

Age:36 Gender: Joined: Dec 27 2004 Posts: 168 Location: California Offline
|
Posted: Wed Oct 04, 2006 4:10 pm Post subject: |
 |
|
|
|
if you're using a command to change the doors i think you use ?seta door:doormode=0 for open doors and ?seta door:doormode=255 for closed doors |
|
Back to top |
|
 |
z.baront+ Guest
Offline
|
Posted: Wed Oct 04, 2006 4:34 pm Post subject: |
 |
|
|
|
i've seen all that information, but what i want to do is open and close specific gates on command.
i guess i don't have enough knowledge with what is going to to do this... hehe
how do i specificy which doors to close and which doors to open.
thanks |
|
Back to top |
|
 |
Chambahs Power attack

Joined: Jun 19 2005 Posts: 820 Offline
|
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Wed Oct 04, 2006 9:58 pm Post subject: |
 |
|
|
|
ugg... it's a bitfield, so doormode =
0 in decimel = 0000 0000 in binary = all doors open
255 in decimel = 1111 1111 in binary = all doors closed
31 in decimel = 0000 1111 in binary = doors 1-4 open and dooers 5-8 closed.
It doesn't take long to see how you can get all the combinations by converting binary to decimel _________________ SubSpace Discretion: A Third Generation SubSpace Client |
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Thu Oct 05, 2006 9:04 am Post subject: |
 |
|
|
|
I wonder why it's decimal and not hex, because everyone can convert from hex to binary in their head. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
 |
z.baron+ Guest
Offline
|
Posted: Thu Oct 05, 2006 10:36 am Post subject: |
 |
|
|
|
sorry i'm such an asss noob, but i had all these great zone ideas (don't we all) and thought it would be fun to program some zone mods.
did i mention i've never programed in c before, although i have years of programming experience....
i've never made a map before either, so i figure my question was more how do i know which door to indicate in the bitfield, but my real problem was when i issued the command nothing would happen to the gates. now i have this setting overwrite code i'm going to try messing with this, and hopefully have more instant success.
i have plenty more questions if you guys don't mind me asking . i wont post them here, but try to start a new thread so as to stay on topic and maybe help anyone else in the future that might see them.
examples are always key, i find they are the biggest help to figuring out new syntax/commands in a forgien language.
once again, thanks for the support! |
|
Back to top |
|
 |
z.baron+ Guest
Offline
|
Posted: Fri Oct 06, 2006 11:03 am Post subject: |
 |
|
|
|
I have a map with 70+ doors on it. The mod i'm attempting to write relies on issuing commands to specific doors and having the door open and close on command.
Here are all the possible one door open combinations and the results I obtain upon issuing ?seta door:doormode=<mode>
128 = All doors open
64 = half of one gate closed (??? !!!! ???)
32 = closed majority of all doors
16 = close a few doors
8 = closed a few doors
4 = all open
2 = all open
1 = all open
i thought i saw something somewhere that 1-4 bitfields were for vertical doors and the 5-8 bitfields were for horizontial doors.
if the maximum number of doors i can control is 8, this is an ineffective solution. i'm not even sure how the doors in the lvl files relates to this bitfields even.
is there another solution to have a blocked passage. such as toggling a tile object on and off? It doesn't have to be a gate, just as long as it blocks the passage and i can turn it on and off on command.
also, if that doesn't work might it be possible to drop a brick in that location and remove it on command? i'm not so much concerned with the freq allowing people to pass through, as i could create special freq that players are not allowed to be on and make the brick under that freq, but i don't know how feasible the "brick" solution is, and figure you guys would know best before i spend to much time working down a solution that is in fact ineffective.
i've examined the brickwriter module, but i would much rather use a tilest object so i don't have to worry about frequency information , etc.
thanks, |
|
Back to top |
|
 |
Chambahs Power attack

Joined: Jun 19 2005 Posts: 820 Offline
|
Posted: Fri Oct 06, 2006 11:08 am Post subject: |
 |
|
|
|
Quote: | also, if that doesn't work might it be possible to drop a brick in that location and remove it on command? i'm not so much concerned with the freq allowing people to pass through, as i could create special freq that players are not allowed to be on and make the brick under that freq |
Quote: | i've examined the brickwriter module, but i would much rather use a tilest object so i don't have to worry about frequency information , etc. |
Good job contradicting yourself, there isnt another way of doing this unless you use bricks. Stop being lazy and put the bricks freq on spec freq and then you can be done. |
|
Back to top |
|
 |
z.baron+ Guest
Offline
|
Posted: Fri Oct 06, 2006 12:46 pm Post subject: |
 |
|
|
|
i'm going to ignore your negative comment for now and thank you for helping me on this.
reading this forumn i realize that you have been doing this for awhile and are very learned on ASSS coding, I however no nothing, please keep that in mind.
however, the brick solution is proving to be ineffective as is because bricks expire.
Is there a way to set a brick that doesn't expire?
Perhaps if i set the brickdata bricktime to 0? -1? (bd->bricktime=0)
it looks as though if i make a change to the bricks.c file i will have to recompile the core, is this correct?
are you sure there isnt another way of doing this unless you use bricks? |
|
Back to top |
|
 |
z.baron+ Guest
Offline
|
Posted: Fri Oct 06, 2006 12:59 pm Post subject: |
 |
|
|
|
/* call with mutex */
local void expire_bricks(Arena *arena)
{
brickdata *bd = P_ARENA_DATA(arena, brickkey);
LinkedList *list = &bd->list;
ticks_t gtc = current_ticks(), timeout = bd->bricktime;
Link *l, *next;
for (l = LLGetHead(list); l; l = next)
{
struct S2CBrickPacket *pkt = l->data;
next = l->next;
if (TICK_GT(gtc, pkt->starttime + timeout))
{
if (bd->countbricksaswalls)
mapdata->DoBrick(arena, 0, pkt->x1, pkt->y1, pkt->x2, pkt->y2);
LLRemove(list, pkt);
afree(pkt);
}
}
}
|
if i change the TICK_GT && timeout !=0 i could make it were the duration of zero bricks never expire, correct?
but that would require me recompiling the core , correct?[/code] |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Fri Oct 06, 2006 1:06 pm Post subject: |
 |
|
|
|
Using an lvz along with a region that warps players might effectively block players |
|
Back to top |
|
 |
z.baron+ Guest
Offline
|
Posted: Fri Oct 06, 2006 1:14 pm Post subject: |
 |
|
|
|
i've though about the region idea, and the warping. but i really want the object to disappear from the screen.
here is how i see your solution working.
have a region the size of the gate.
have a lvz image object over the region that looks likes a tile.
the region will warp the player outside of the gate.
when the users activates the gate command, the lvz object is removed and the region is "deactivated" from warping.
i don't like how this would visually look however. i want the user to hit the gate and bounce, like a normal wall. that's not even going into weapons and objects going through that region.
in the end i would be programming a region to behave like a tileset that could enabled / disabled. is there not a more elegant solution
(the brick idea is close) |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Fri Oct 06, 2006 7:51 pm Post subject: |
 |
|
|
|
Continuum only supports eight doors, sorry. |
|
Back to top |
|
 |
Chambahs Power attack

Joined: Jun 19 2005 Posts: 820 Offline
|
Posted: Fri Oct 06, 2006 9:47 pm Post subject: |
 |
|
|
|
You could set bricktime to an extremely high value and/or have bricks being dropped immediately after they expire. |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Fri Oct 06, 2006 11:05 pm Post subject: |
 |
|
|
|
and how would he open the bricks? drop flags on them? |
|
Back to top |
|
 |
z.baron+ Guest
Offline
|
Posted: Sat Oct 07, 2006 1:26 pm Post subject: |
 |
|
|
|
after some critical thinking on this, the answer to the doors was very apparent. the eight doors represent the eight tiles on the tiles set.
if you look there are four veritcal tiles and four horizontal tiles, and one resounding DUH!
someone told me that alpha west was creating an arena were you could maniuplate tilesets by setting a value in the conf file. they use subgame i'm pretty sure, but does anyone have more information on this? (for instance, they have a duel circle that warps you, and someone told me they were building a system were you could issue a command to make the duel circle place a tile set over the warp regions and therefore not warp you)
this is all heresay of course, but none the less, it would be the perfect solution. |
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Sat Oct 07, 2006 2:49 pm Post subject: |
 |
|
|
|
You are limited to 8 doors unless you use bricks. Regions is not the answer since they are currently not very precise due to the nature of the protocol.
I suggest leaving the core files such as bricks.c alone unless you really know what you are doing. I recommend writing an add-in module that uses the brick interface to repeatedly drop bricks. To see an example of this look at my autobrick module.
z.baron+ wrote: | someone told me they were building a system were you could issue a command to make the duel circle place a tile set over the warp regions and therefore not warp you | If this were true I suspect they would use a special tile that has a similar effect to a warp green and place door tiles adjacent to it to "toggle" them. Or maybe just using a bot for warping. _________________ ss news  |
|
Back to top |
|
 |
z.baron+ Guest
Offline
|
Posted: Sat Oct 07, 2006 8:22 pm Post subject: |
 |
|
|
|
your autobrick module calls for #include "region.h"
is region.h a core ASSS File? i don't see it in my directory structure anywhere.
thanks |
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Sun Oct 08, 2006 6:35 am Post subject: |
 |
|
|
|
I think you can safely delete that line (I wrote the module when asss did have a region.h). Also line 92 controls the maximum amount of bricks.
Edit: Updated the zip to a known working version (143). You may have to clear your browser's cache to download the new one. |
|
Back to top |
|
 |
z.baron+ Guest
Offline
|
Posted: Sun Oct 08, 2006 6:03 pm Post subject: |
 |
|
|
|
everytime i try to compile this i get
.objs\CodeBlocks\ASSS\auto_brick\autobrick.o:autobrick.c:(.text+0x2e3): undefined reference to `afree'
and yes, i have included the directory of the stdio.h file. |
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:42 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Sun Oct 08, 2006 6:07 pm Post subject: |
 |
|
|
|
afree is defined in util.h. You'll also need to compile in util.c with your project. |
|
Back to top |
|
 |
z.barton+ Guest
Offline
|
Posted: Sun Oct 08, 2006 10:40 pm Post subject: |
 |
|
|
|
adding the util.c removes the amalooc and afree errors, but now i have a while slew of
_imp__pthread_[*] errors
i've inclued the pthread.h header, but continue to get compilation errors. |
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:42 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Sun Oct 08, 2006 10:59 pm Post subject: |
 |
|
|
|
In your compiling line, also add -lpthread to the argument list. This will include the pthreads library. If using Windows, Project->Settings, look for a section for included libraries, and add pthread.lib to the line. Make sure a file named pthread.lib is in the same directory as all your other files. |
|
Back to top |
|
 |
|