Two little (noob) questions


(Siemnov) #1

I’ve got two little questions. I’ve been searching and trying for quite some time now and I can’t seem to find the sollution. I’m a noob, so don’t expect anything hard.

I’m making a button in my just started map Castleraid. But it doesn’t do a thing… I’ve never learned to do this, but it’s probably something real stupid. The switch doesn’t open anything yet.

game_manager
{
	spawn
	{
	}
}

cavegateswitchscript
{
	spawn
	{
		accum 0 set 0
		wait 500
	}

	trigger main
	{
		//the cavegateswitchmover starts up
		trigger cavegateswitchscript up
		trigger cavegateswitchscript down
	}

	trigger up
	{
		accum 0 abort_if_not_equal 1
		resetscript

		trigger cavegateswitchmover up
		accum 0 set 0
	}

	trigger down
	{
		accum 0 abort_if_not_equal 0
		resetscript

		trigger cavegateswitchmover down
		accum 0 set 1
	}
}
cavegateswitchmover
{
	spawn
	{
	}

	trigger up
	{
		gotomarker cavegateswitchup 16
	}

	trigger down
	{
		gotomarker cavegateswitchdown 16
	}
}

And the entities:

// entity 7
{
"classname" "script_mover"
"targetname" "cavegateswitchmover"
"scriptname" "cavegateswitchmover"
"spawnflags" "18"
// brush 0
{
( -2296 -3920 372 ) ( -2296 -3888 388 ) ( -2272 -3920 372 ) metal_misc/metal_m04g2-r 0 0 0 0.500000 0.500000 0 0 0
( -2296 -3888 376 ) ( -2296 -3920 360 ) ( -2272 -3920 360 ) metal_misc/metal_m04g2-r 0 0 0 0.500000 0.500000 0 0 0
( -2288 -3888 384 ) ( -2288 -3920 384 ) ( -2288 -3920 320 ) metal_misc/metal_m04g2-r 0 0 0 0.500000 0.500000 0 0 0
( -2268 -3892 388 ) ( -2292 -3892 388 ) ( -2292 -3892 324 ) metal_misc/metal_m04g2-r 0 0 0 0.500000 0.500000 0 0 0
( -2280 -3920 384 ) ( -2280 -3888 384 ) ( -2280 -3888 320 ) metal_misc/metal_m04g2-r 0 0 0 0.500000 0.500000 0 0 0
( -2296 -3900 384 ) ( -2272 -3900 384 ) ( -2272 -3900 320 ) metal_misc/metal_m04g2-r 0 0 0 0.500000 0.500000 0 0 0
}
}
// entity 8
{
"scriptname" "cavegateswitchup"
"classname" "path_corner"
"origin" "-2284 -3896 376"
"targetname" "cavegateswitchup"
}
// entity 9
{
"scriptname" "cavegateswitchdown"
"classname" "path_corner"
"origin" "-2284 -3912 368"
"targetname" "cavegateswitchdown"
}
// entity 40
{
"target" "cavegateswitchscript"
"scriptname" "cavegateswitchuse"
"targetname" "cavegateswitchuse"
"spawnflags" "8"
"cursorhint" "HINT_BUTTON"
"classname" "func_invisible_user"
// brush 0
{
( -2256 -3872 320 ) ( -2304 -3872 320 ) ( -2304 -3936 320 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0
( -2304 -3936 400 ) ( -2304 -3872 400 ) ( -2256 -3872 400 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0
( -2312 -3928 368 ) ( -2264 -3928 368 ) ( -2264 -3928 352 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0
( -2264 -3936 368 ) ( -2264 -3872 368 ) ( -2264 -3872 352 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0
( -2256 -3880 368 ) ( -2304 -3880 368 ) ( -2304 -3880 352 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0
( -2304 -3864 368 ) ( -2304 -3928 368 ) ( -2304 -3928 352 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0
}
}
// entity 41
{
"scriptname" "cavegateswitchscript"
"targetname" "cavegateswitchscript"
"origin" "-2304 -3960 368"
"classname" "target_script_trigger"
"target" "main"
}
// entity 42
{
"spawnflags" "16"
"shortname" "Cavegateswitch"
"track" "Cavegateswitch"
"classname" "trigger_objective_info"
// brush 0
{
( -2232 -3872 320 ) ( -2336 -3872 320 ) ( -2336 -3968 320 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0
( -2336 -3968 400 ) ( -2336 -3872 400 ) ( -2232 -3872 400 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0
( -2336 -3976 400 ) ( -2232 -3976 400 ) ( -2232 -3976 320 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0
( -2232 -3968 400 ) ( -2232 -3872 400 ) ( -2232 -3872 320 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0
( -2232 -3872 400 ) ( -2336 -3872 400 ) ( -2336 -3872 320 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0
( -2336 -3872 400 ) ( -2336 -3968 400 ) ( -2336 -3968 320 ) common/trigger 0 0 0 0.500000 0.500000 0 7 0
}
}

Is there any way on how to make texturetransition without using terrainbrushes? I want to make this cave in my terrain, but it looks like nothing so far.

Thanks greatly in advance…


(Erik-Ftn) #2

For your first question:

  1. To be sure your button moves like it should, you should include an origin brush in the script_mover entity.

  2. To have it trigger anything else, include triggers for those events last in the trigger up and the trigger down functions, (eg trigger door move_open & trigger door move_close). Your door is another script_mover, like the button.

  3. Apart from that, it works nicely.

Erik


(Siemnov) #3

Thanks for the hint on the origin brush! :smiley: I guess that’s my problem… But just what is the difference between an origin brush and a normal brush (curious type…)? And how do I make an origin brush? Is the brush I had just an indicator on the place of the entity and is there supposed to be a brush connected to it or something?


(Erik-Ftn) #4

http://etmapping.andityler.com/rotatingdoor.php
http://www.splashdamage.com/forums/viewtopic.php?t=1710


(Siemnov) #5

Uhmmm, I still don’t get it really… I mean, my script_mover does have a brush. Then what’s an originbrush? Is it a structural brush or something (don’t think so, because my brush is structural allready…)? Or should my script_mover have a brush as its target?
All I did was create a brush, rightclick and select script_mover. Isn’t that enough?


(Siemnov) #6

Ok, new problem
The script_mover now moves fine :smiley: , but it doesn’t get triggered by the scirpt. My question:
How to call the “trigger main” in my cavegateswitchscript entity (script_trigger_multiple) when the button is pressed? At my target_script_trigger entity, i set “target” to “main”, but why does it still not work? Is my target_script_trigger not being triggered?

I mean this part of the script to be triggered:

trigger main 
   { 
      //the cavegateswitchmover starts up 
      trigger cavegateswitchscript up 
      trigger cavegateswitchscript down 
   }

<EDIT>
Ok, I solved the whole thing now. For some reason it doesn’t always get triggered if the hand symbol appears and you press f. You have to be real close… :???: Isn’t the func_invisible_user supposed to create the triggering area with the cursorhint in it? At least not outside of it!