ET -Shooter (Mortar)


(mortis) #41

This may be relevant:

Make a shooter_mortar, and give it a scriptname and targetname.
Setup your spawnflags appropriately…

Now just add this code whereever you want it to fire:

alertentity targetname (where targetname is the name of your entity).

From here: http://logicgamers.com/loungev2/viewtopic.php?f=1&t=3237&start=0&st=0&sk=t&sd=a

Skybox is a problem with mortars:

http://www.splashdamage.com/forums/showthread.php?t=17098&highlight=mortars

Try putting the mortar and the impact at the same origin (or else make a tracemap):

http://www.splashdamage.com/forums/showthread.php?t=16792&highlight=mortars

No scripting needed:

http://www.splashdamage.com/forums/showthread.php?t=16078&highlight=mortars


(Darkix) #42

Well it would be nice to figure out how.


(Darkix) #43

None of those worked. MY ceiling is high enough, it’s not that. I put them on the same origin, not that. Did the one with no scripting, didn’t work.

Going to try the scripting one now, but it doesn’t look like it’ll work.


(Darkix) #44

None worked, so I tried shooter_rocket instead, and it worked good. But, the panzer tube falls down too. Is there a way I can remove that so it looks like a rocket from the sky?


(stealth6) #45

WAIT

working on it…

EDIT: ok saw your stuggling, I thought hmm… shouldn’t be too hard so I have quickly made this test map:



// entity 0
{
"classname" "worldspawn"
// brush 0
{
( 3072 3072 512 ) ( 3072 0 512 ) ( 0 3072 512 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3584 3584 256 ) ( 512 3584 256 ) ( 3584 3584 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3584 3584 256 ) ( 3584 3584 0 ) ( 3584 512 256 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 0 0 256 ) ( 3072 0 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 0 3072 0 ) ( 0 0 256 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 3072 496 ) ( 3072 0 496 ) ( 3072 3072 496 ) skies_sd/sd_siwasky 0 0 0 0.5 0.5 0 0 0
}
// brush 1
{
( 3072 3072 512 ) ( 3072 0 512 ) ( 0 3072 512 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3584 3584 256 ) ( 512 3584 256 ) ( 3584 3584 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3584 3584 256 ) ( 3584 3584 0 ) ( 3584 512 256 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 3072 0 0 ) ( 0 3072 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 0 3072 0 ) ( 0 0 256 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3584 3568 0 ) ( 512 3568 256 ) ( 3584 3568 256 ) battery_wall/wall03_mid 0 0 0 0.5 0.5 0 0 0
}
// brush 2
{
( 3072 3072 512 ) ( 3072 0 512 ) ( 0 3072 512 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3584 3584 256 ) ( 512 3584 256 ) ( 3584 3584 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3584 3584 256 ) ( 3584 3584 0 ) ( 3584 512 256 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 3072 0 0 ) ( 0 3072 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 0 0 256 ) ( 3072 0 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3568 512 256 ) ( 3568 3584 0 ) ( 3568 3584 256 ) battery_wall/wall03_mid 0 0 0 0.5 0.5 0 0 0
}
// brush 3
{
( 3584 3584 256 ) ( 512 3584 256 ) ( 3584 3584 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3584 3584 256 ) ( 3584 3584 0 ) ( 3584 512 256 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 3072 0 0 ) ( 0 3072 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 0 0 256 ) ( 3072 0 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 0 3072 0 ) ( 0 0 256 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 3072 16 ) ( 3072 0 16 ) ( 0 0 16 ) temperate_sd/grass_dense1 0 0 0 0.5 0.5 0 0 0
}
// brush 4
{
( 3072 3072 512 ) ( 3072 0 512 ) ( 0 3072 512 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3584 3584 256 ) ( 3584 3584 0 ) ( 3584 512 256 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 3072 0 0 ) ( 0 3072 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 0 0 256 ) ( 3072 0 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 0 3072 0 ) ( 0 0 256 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3072 16 0 ) ( 0 16 256 ) ( 0 16 0 ) battery_wall/wall03_mid 0 0 0 0.5 0.5 0 0 0
}
// brush 5
{
( 3072 3072 512 ) ( 3072 0 512 ) ( 0 3072 512 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 3584 3584 256 ) ( 512 3584 256 ) ( 3584 3584 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 3072 0 0 ) ( 0 3072 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 0 0 256 ) ( 3072 0 0 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 0 0 0 ) ( 0 3072 0 ) ( 0 0 256 ) common/caulk 0 0 0 0.5 0.5 0 0 0
( 16 0 256 ) ( 16 3072 0 ) ( 16 0 0 ) battery_wall/wall03_mid 0 0 0 0.5 0.5 0 0 0
}
// brush 6
{
( 976 640 32 ) ( 976 624 32 ) ( 912 640 32 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 960 640 128 ) ( 896 640 128 ) ( 960 640 16 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 960 640 128 ) ( 960 640 16 ) ( 960 624 128 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 896 624 16 ) ( 960 624 16 ) ( 896 640 16 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 896 576 16 ) ( 896 576 128 ) ( 960 576 16 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 896 624 16 ) ( 896 640 16 ) ( 896 624 128 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
}
// brush 7
{
( 1424 624 32 ) ( 1424 608 32 ) ( 1392 624 32 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1424 624 32 ) ( 1392 624 32 ) ( 1424 624 16 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1424 624 32 ) ( 1424 624 16 ) ( 1424 608 32 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1392 608 16 ) ( 1424 608 16 ) ( 1392 624 16 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1392 592 16 ) ( 1392 592 32 ) ( 1424 592 16 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1392 608 16 ) ( 1392 624 16 ) ( 1392 608 32 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
}
// brush 8
{
( 1168 624 32 ) ( 1168 608 32 ) ( 1136 624 32 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1168 624 32 ) ( 1136 624 32 ) ( 1168 624 16 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1168 624 32 ) ( 1168 624 16 ) ( 1168 608 32 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1136 608 16 ) ( 1168 608 16 ) ( 1136 624 16 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1136 592 16 ) ( 1136 592 32 ) ( 1168 592 16 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1136 608 16 ) ( 1136 624 16 ) ( 1136 608 32 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
}
// brush 9
{
( 1296 624 32 ) ( 1296 608 32 ) ( 1264 624 32 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1296 624 32 ) ( 1264 624 32 ) ( 1296 624 16 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1296 624 32 ) ( 1296 624 16 ) ( 1296 608 32 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1264 608 16 ) ( 1296 608 16 ) ( 1264 624 16 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1264 592 16 ) ( 1264 592 32 ) ( 1296 592 16 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
( 1264 608 16 ) ( 1264 624 16 ) ( 1264 608 32 ) assault/atool_m02 0 0 0 0.5 0.5 0 0 0
}
}
// entity 1
{
"classname" "script_multiplayer"
"scriptname" "game_manager"
"origin" "210.000000 208.000000 192.000000"
}
// entity 2
{
"classname" "info_player_deathmatch"
"origin" "210.000000 208.000000 56.000000"
}
// entity 3
{
"classname" "team_WOLF_objective"
"spawnflags" "1"
"origin" "208.000000 288.000000 208.000000"
"description" "Axis Spawn"
"targetname" "Axis_wobj1"
}
// entity 4
{
"classname" "team_WOLF_objective"
"origin" "208.000000 128.000000 208.000000"
"spawnflags" "2"
"description" "Allied Spawn"
"targetname" "Allied_wobj1"
}
// entity 5
{
"classname" "team_CTF_bluespawn"
"spawnflags" "3"
"origin" "210.000000 130.000000 56.000000"
}
// entity 6
{
"classname" "team_CTF_redspawn"
"origin" "210.000000 286.000000 56.000000"
"spawnflags" "3"
}
// entity 7
{
"classname" "shooter_mortar"
"origin" "1152.000000 608.000000 64.000000"
"targetname" "shooter_mortar1"
"target" "info_notnull1"
}
// entity 8
{
"classname" "trigger_multiple"
"target" "shooter_mortar1"
// brush 0
{
( 992 640 160 ) ( 992 624 160 ) ( 928 640 160 ) common/trigger 0 0 0 0.5 0.5 0 0 0
( 960 640 144 ) ( 896 640 144 ) ( 960 640 32 ) common/trigger 0 0 0 0.5 0.5 0 0 0
( 960 640 144 ) ( 960 640 32 ) ( 960 624 144 ) common/trigger 0 0 0 0.5 0.5 0 0 0
( 896 624 32 ) ( 960 624 32 ) ( 896 640 32 ) common/trigger 0 0 0 0.5 0.5 0 0 0
( 896 576 32 ) ( 896 576 144 ) ( 960 576 32 ) common/trigger 0 0 0 0.5 0.5 0 0 0
( 896 624 32 ) ( 896 640 32 ) ( 896 624 144 ) common/trigger 0 0 0 0.5 0.5 0 0 0
}
}
// entity 9
{
"classname" "info_notnull"
"origin" "1280.000000 608.000000 192.000000"
"targetname" "info_notnull1"
}
// entity 10
{
"classname" "shooter_mortar"
"origin" "1152.000000 448.000000 64.000000"
"target" "info_notnull2"
"targetname" "shooter_mortar2"
}
// entity 11
{
"classname" "info_notnull"
"origin" "1280.000000 448.000000 192.000000"
"targetname" "info_notnull2"
}
// entity 12
{
"classname" "func_timer"
"origin" "1088.000000 448.000000 64.000000"
"wait" "1"
"target" "shooter_mortar2"
"spawnflags" "1"
}

Copy and paste that into notepad and save it as <namehere>.map

it contains 2 examples, 1 were player player walks onto a trigger to launch a mortar and 1 which is automatically fired every second.

Some things you may have done wrong:
-The info_notnull is the peak of the mortar, not it’s destination (unless you fire it straight down)
-The func_timer needs spawnflag start_on, otherwise it doesn’t work

Btw if you want to randomize it then add a longer wait value :smiley: and add a random value. But this is explained in GTK

-------- KEYS --------
wait : Base time between triggering all targets, default is 1
random : Wait variance, default is 0
-------- SPAWNFLAGS --------
START_ON : Starts enabled
-------- NOTES --------
This should be renamed trigger_timer…
Repeatedly fires its targets.
Can be turned on or off by using.
So, the basic time between firing is a random time between (wait - random) and (wait + random)


(Darkix) #46

“-The info_notnull is the peak of the mortar, not it’s destination (unless you fire it straight down)”

That’s what I had wrong. I put it as the destination. Everything works perfectly in this map, thank you A LOT!