| Author |
Message |
Geoffrey S Gamorrean
Joined: 29 Jan 2005
|
|
Nottheking Kell Dragon
Joined: 29 Sep 2003
|
Posted: Mar 18, 2005 18:35 Post subject: Re: The "set_bits" command |
|
|
Geoffrey S wrote:
I'm trying to make a forcefield using this command.
| Code: | | message: 1 pad1(0) set_bits ? |
What would I have to replace the question mark with if I want to prevent the player from moving through the wall, firing through the wall, and want to display a transparent texture?
You'd need a seperate command for each of those flags you want changed. For the question mark, you'll want two numbers, seperated by a space. The first number, from 1-3, will determine which flag is to be changed. (flag 1 being the most commonly used flag, flag 2 being for port-ins from Doom only, and flag three noting the cross-ability parameters)
The next number is the specific bits you want to be set, or cleared. (if you're using clear_bits)Since flags are sets of binary digits, the value of the bits can be changed so that a single number can handle ANY and ALL of the bits of that flag at once.
In this case, if you want the adjoined wall section between two sectors to have a texture there, (the texture ITSELF will have the data on whether it is transparent or not) you'll want flag 1, bit 1.
For the third flag, This depends on whether you want to prevent enemies as well to walk through the wall. Since this is a "forcefield," I suppose you do. In this case, all are handled through flag three. On that flag, bit 2 stops the player from moving through the wall, bit 4 stops the enemies from walking through the wall, and bit 8 stops shots (fired by either the player or enemies) from going through the wall. Note that all of these blocks are assumed to be in effect at any non-adjoined section, of course. Since these are all binary bits, the numbers can be added together to make a unique combination: set bits 3 14 (2+4+8) will set bits 2, 4, and 8 on flag 3.
In essence, the actual commands you want in your INF are: | Code: | message: 1 pad1(0) set_bits 1 1
message: 1 pad1(0) set_bits 3 14 |
This changes a little if you also want the forcefield to reflect shots. Since the "magnetically sealed" flag is a sector flag, that means you'll have to set the whole sector to have that property. The command would be this: | Code: | | message: 1 pad1 set_bits 1 4 | I hope that was helpful.
_________________ Wake up, George Lucas... The Matrix has you.. |
|
The MAZZTer Death Star

Joined: 25 Sep 2003
|
Posted: Mar 19, 2005 14:58 Post subject: |
|
|
To best use the mag sealed (reflect bullets) property, make a sector of which one side is the force field, and the two other sides are adjoined to other sector(s). The idea is that this makes only the force field surface mag sealed. If you were to set the existing sector, there would be a few unadjoined surfaces for walls which would inherit the mag sealed property, which would be odd.
If the player can be on both sides of the force field you will have to do this for both sides.
_________________ http://www.mzzt.net/ | I am a respectable admin with a respectable sig. |
|
Geoffrey S Gamorrean
Joined: 29 Jan 2005
|
Posted: Mar 19, 2005 19:05 Post subject: |
|
|
Cheers, it worked flawlessly.
|
|
Geoffrey S Gamorrean
Joined: 29 Jan 2005
|
|
Nottheking Kell Dragon
Joined: 29 Sep 2003
|
Posted: Mar 21, 2005 18:29 Post subject: |
|
|
That does sound odd... That item SHOULD make the wall perfectly un-passable to the player... Are you sure that it has been set off correctly? I don't recall getting a trigger to work without setting an Event to the trigger, and an Event_mask to the elevator sector.
I suggest you add something the following two lines, and try it.- To the trigger surface, add the line EVENT: 2048 (special event 1)
- To the elevator sector, add the line Event_mask: 2048
Try that, it might have a good chance of getting the thing working...
And personally, I never use trigger_single. Rather, I prefer trigger_switch1.
_________________ Wake up, George Lucas... The Matrix has you.. |
|
|