2v2 mapscript for radar.

Discussions about ET modding (sdk code, player/weapon modeling)

Moderators: Forum moderators, developers

Dee
Posts: 20
Joined: Fri Jun 01, 2007 2:36 pm

2v2 mapscript for radar.

Post by Dee »

I'm creating a 2v2 mapscript for radar.. removed the east radar completely and only west radar is available..

the next thing i am trying to do is disable dyno at side entrance

I tried a couple of things but all leads to errors:

Code: Select all

sidedoor1 // Side door of complex
{
	spawn
	{
		constructible_class     1
		constructible_health    999999
		set {
			// don't allow dynamite
			spawnflags 139 
		}
	}
}
this will make it breakable with normal weapons and I raised the health to a very high number ..

but I'm not happy with this solution..

note that removing the constrictible_* lines will end up having the wall not dynomitable but it can be broken with few bullets.

any ideas?


here's the new script: http://khbclan.com/radar.script
Last edited by Dee on Sat Jun 16, 2007 5:45 am, edited 3 times in total.
Dersaidin
Posts: 197
Joined: Fri Aug 06, 2004 1:55 pm
Location: Australia

Post by Dersaidin »

http://bani.anime.net/banimod/forums/vi ... 5462#65462

Use a script_mover with the side door's brush.

Make sure you use spawnflags 2 for solid.
Origin would be "0 0 0", since its in same position as the brushes.
Dee
Posts: 20
Joined: Fri Jun 01, 2007 2:36 pm

Post by Dee »

more on this:

the idea of 2v2 is to have the side entrances disabled.. many of our players has been suggesting preventing people from going to the side.

I've managed to create a fake brush at the right position.. check out the screenshots.


Image


Image


now the problem is, how to i make this wall prevent players from passing thru?

both:

contents 65536 // CONTENTS_PLAYERCLIP
contents 1 // SOLID

doesn't seem to work..

i also tried spawnflags 2 and nothing happens when the player jumps thru..
Dee
Posts: 20
Joined: Fri Jun 01, 2007 2:36 pm

Post by Dee »

Dersaidin wrote:http://bani.anime.net/banimod/forums/vi ... 5462#65462

Use a script_mover with the side door's brush.

Make sure you use spawnflags 2 for solid.
Origin would be "0 0 0", since its in same position as the brushes.
thank you, I'll check that out
Dersaidin
Posts: 197
Joined: Fri Aug 06, 2004 1:55 pm
Location: Australia

Post by Dersaidin »

You'll need to post the script.

And it looks like you should extend the wall closer to allied spawn.
Alternatively you could block off that entrance to the bunker with a fakebrush and a model. That'd look much/feel much better than an invisible wall.
Dee
Posts: 20
Joined: Fri Jun 01, 2007 2:36 pm

Post by Dee »

Alternatively you could block off that entrance to the bunker with a fakebrush and a model. That'd look much/feel much better than an invisible wall.
I loved this idea, I guess you're right.. I've removed the big hidden wall and I've managed to put fake brushes on both doors.. the side entrance and the bunker door:

Here's the bunker door:
Image

Here's the side entrance:
Image

Note that the side entrance still have the above problem.. it still shows the breakable hint to the user... but for gameplay.. the health too high to be breached..

The script is fully playable now, however, its still a hidden wall.. just wondering, is there any way to bind a texture to that? I've tried adding a model, but I couldn't find a good model to put in there that's gonna look good. so i need suggestions for models.. its pain in the ass browsing thru the models in the pk3 file.

You can get the script here.
Dersaidin
Posts: 197
Joined: Fri Aug 06, 2004 1:55 pm
Location: Australia

Post by Dersaidin »

http://dersaidin.ath.cx/configs/radar2v2.zip

I removed the side door and spawned it as a script_mover, like I was suggesting for you to do.

I also spawned a model to block off that other door. It would be possible to use the same door as side to block it, but it'd take ages to position it right, so I didn't bother.
Dee
Posts: 20
Joined: Fri Jun 01, 2007 2:36 pm

Post by Dee »

Dersaidin wrote:It would be possible to use the same door as side to block it, but it'd take ages to position it right, so I didn't bother.
i don't mind take my time to position it.. if i know what classname and properties to use.. would something like this work if i select the right origin?
Dee
Posts: 20
Joined: Fri Jun 01, 2007 2:36 pm

Post by Dee »

I've edited the log at the begining and added few comments..

here's a stable playable version:

http://khbclan.com/downloads/radar-2v2.zip

mapscripthash 771d129681323171144ae872e6ca71a308a066b1
User avatar
mortis
Posts: 360
Joined: Tue Jul 06, 2004 11:57 pm
Location: at the center of the e-universe
Contact:

Post by mortis »

If a playerclip brush is too thin, players can get past it if they hurl themselves at it. Whenever possible I use contents_solid instead. Make thick playerclips and they should work fine.
Dersaidin
Posts: 197
Joined: Fri Aug 06, 2004 1:55 pm
Location: Australia

Post by Dersaidin »

Dee wrote:
Dersaidin wrote:It would be possible to use the same door as side to block it, but it'd take ages to position it right, so I didn't bother.
i don't mind take my time to position it.. if i know what classname and properties to use.. would something like this work if i select the right origin?

Code: Select all

create
        {   
            scriptName "sidedoor_sm"
            targetname "sidedoor_sm"
            classname  "script_mover"
            origin     "0 0 0"
            model      "*75"
            spawnflags 2
        }
Thats the one for the side door.
Copy it, change the scriptname and target name (put a 2 on the end or something)

To rotate it, down in the scriptblock

Code: Select all

sidedoor_sm2
{
spawn
{
wait 50
faceangles 0 90 0 1
}
}
Note, this will not rotate it on the spot, it will ROTATE ABOUT THE ORIGIN OF THE MAP. You'll have to go searching for it once you rotate it.

Then go back to the create{} and adjust the origin.
Dee
Posts: 20
Joined: Fri Jun 01, 2007 2:36 pm

Post by Dee »

ok, here's the outer bunker door:


Image


it had a problem, flickers from the inside so I wanted to disable that side by the MG... so I made this inner bunker door:


Image




BUTTTTT... there's a problem... when i use only one of them it works fine, and looks really nice in-game... but for some reason I can't use them both .. the result is that the server crashes.

i tested, i comment one ... the other works... i comment the other ... the first one works... both = crash.. it would've been perfect if we can get rid of this crash.


get the script here
Dersaidin
Posts: 197
Joined: Fri Aug 06, 2004 1:55 pm
Location: Australia

Post by Dersaidin »

Thats odd, the script looks fine for both, and you say they work seperately, so that would suggest that the script is fine. I wonder if theres a limit to how many times you can clone brushwork?

What error message does the server console give you?

If you only use one door, you might be able to fix the vis problems by spawning a misc_vis_dummy. Thats an entity which makes another entity be visibel when it is.

Code: Select all

create 
	{    
		scriptName "bunkerdoor_sm1v" 
		target "bunkerdoor_sm1" 
		classname  "misc_vis_dummy"
		origin     "480 1445 1459" 
	}
Note, that origin should be in the doorway, or near where you CANT see the door when it should be visible.

Notice it targets the script_mover.

If that fixes the vis problems on one door you shouldn't need the second, thus avoiding that odd bug.
User avatar
Ragnar_40k
Posts: 394
Joined: Thu Mar 18, 2004 5:18 pm
Location: Berlin, birthplace of the Döner
Contact:

Post by Ragnar_40k »

I guess the cloned model somehow inherits the vis calculation from the original, so you should use the cloned model in similar viewing circumstances (e.g. when a model has wall in the back, then the cloned model should have a wall in the back too, so you can't view it from this position). Maybe you should even avoid moving the cloned model too far away from the original model.

For the func_constructibles I found a little workaround: Just clone a func_constructible when it only has invisible brushes attached (usually with "common/clipweap" shaders, you can check this in the decompiled bsp) and only clone func_static models - it seems they don't have those vis issues. When you still need models you should use "create" to spawn models from md3 files.

PS: About rotating cloned models: some models have a origin key assigned (check the bsp), but when there is no origin key, then the origin defaults to (0,0,0) - the map origin (check radiant where with the decompiled map where the map origin is). Cloned models are always rotated around this origin. When you give a cloned model a origin key in the map script and you add. rotate the cloned model then the model is rotated first (around its origin) and afterwards translated as given in the orgin key from the map script.

PPS: For misc_vis_dummy entities see my comment here: http://bani.anime.net/banimod/forums/vi ... 5486#65486
The Emperor watch over you.
Dee
Posts: 20
Joined: Fri Jun 01, 2007 2:36 pm

Post by Dee »

It was some weird overflow error, and it got fixed when I removed the old fake brushes... doesn't make much sense but I'm a programmer and I know shit happens lol...

in the last version i got, both doors are positioned correctly and they both work just fine except for the vis problem! misc_vis_dummy didn't fix it.. I set the origin according to world coords, or should it be in script_mover's coords? if thats the case, then i don't think we can figure out the right coordinates since we can't rotate the vis object, can we?


I'm on #etpro if anybody wants to take a look at it on the server..

get the script here
Post Reply