Blowing doors with tank?


(ayatollah) #1

I can’t do it! My tank moves into position and stops. The turret is meant to turn and blow the doors. I think it is a prob with my

trigger tank_turret turn
but I have checked my script against goldrush.script and seems to be fine. Any ideas?


(Ifurita) #2

Any ideas?

Not without seeing your script. Check the scripting in Fuel Dump. I think that should be pretty easy to follow and see how they blow up the two doors


(ayatollah) #3

Well what would you like to see? I can post my turret script, final tank run script, blow_door script? I have checked the Fueldump script to no avail.


(Ifurita) #4

Well, look at it from our perspective. You tell us you have a problem, you make a hypothesis of where the problem might be, then leave us to guess at all the details. What do you expect. It’s like posting, “I have a car, there’s a problem, it’s an Audi. Can anyone guess what’s wrong”.

I would post your tank_turret turn script along with all relevent portions of your script that interacts with tank_turret turn, much in the same way I posted 5 sections of the goldrush script to help explain how the tank barrier stopped the tank from driving thru it.

Golden rule #2, help us help you.


(ayatollah) #5

Sorry man I was just wondering if there was a tut for it. But here is all I can find…

trigger run_64
{
trigger self tracks_forward

  accum 1 bitset 2
            followspline 0 spl_00 500 wait length 32
  accum 1 bitreset 2

            trigger self script_lockout

  trigger self 		tracks_stop
  trigger tank_sound 	stop

  wm_objective_status 2 0 2
  wm_objective_status 2 1 1

  startanimation 45 10 15 nolerp norandom
  wait 666
  startanimation 0 1 15 nolerp norandom

  wait 900

  trigger tank_turret turn

  accum 3 inc 1

}

This is in my tank script and it follows the final spline point, performs tracks_stop and tank_sound stop and thats it.

tank_turret
{
spawn
{
wait 500

  attachtotag tank_shell tag_turret

}

trigger turn
{
wait 1000

  playsound sound/vehicles/tank/turret_spin.wav looping
  faceangles 0 45 0 4000
  stopsound
  playsound sound/vehicles/tank/turret_end.wav

  wait 500

  trigger tank startfire
  playsound sound/vehicles/tank/tank_fire.wav
  trigger boomtrigger boom_all		// triggers the hurts around bank explosions (each has its own wait for timing)
  trigger tank_flash run

}

trigger blow_doors
{
setstate tank_flash invisible

  wait 200
  trigger tank stopfire

  alertentity bank_door1

  wm_announce "Allied team has destroyed the Bar Doors!"

  wm_objective_status 3 0 2
  wm_objective_status 3 1 1

  wm_set_main_objective		4	0
  wm_set_main_objective		4	1


  playsound sound/vehicles/tank/turret_spin.wav looping
  faceangles 0 0 0 3000
  stopsound
  playsound sound/vehicles/tank/turret_end.wav
  trigger tank sound_death
  trigger tank script_lockout_stop

}
}

This is my tank_turret script with what should be the turn trigger.

tank_flash
{
spawn
{
setstate tank_flash invisible
}

trigger run
{
setstate tank_flash default
attachtotag tank_turret tag_flash
faceangles 0 90 0 50

  wait 50

  trigger tank_turret blow_doors

}
}

This is my tank_flash, calling the tank_turret trigger blow_doors.

BTW sorry for the inconvenience Iffy I just wanted to know what part of the script would apply…I am grateful for any help, esp with the tank barrier stuff…


(Ifurita) #6

NP. It’s not an inconvenience. We just need to have the right information before someone can help you with your problem, that’s all.


(Ifurita) #7

Here’s the scripting from Fuel Dump which destroys the cave door, where is the relevent portion of your script?


// ----------------------------------------------------------------------------
// Cave door on Allied side of map
// ----------------------------------------------------------------------------
cavedoor_solid
{
	spawn
	{
		wait 200
		setstate cavedoor_solid default
		setstate cavedoor_dmg invisible
	}

	trigger switch
	{
		alertentity cavedoor_explo
		trigger hurt_cavedoorblast boom
		setstate cavedoor_solid invisible
		setstate cavedoor_dmg default
		alertentity cavedoor_rubble1
	}
}

hurt_cavedoorblast
{
	spawn
	{
		wait 200
		setstate hurt_cavedoorblast invisible
	}

	trigger boom
	{
		setstate hurt_cavedoorblast default
		wait 100
		remove
	}
}


(ayatollah) #8
boomtrigger
{
	trigger boom_all		// this is called from the tank to trigger all hurts
	{
		trigger hurt_barrelblast boom
		trigger hurt_bankblast boom
		wait 450
		setstate bankdoors_toi invisible
		setstate bankdoors_cm_marker invisible
	}
}


hurt_barrelblast
{
	spawn
	{
		wait 200
		setstate hurt_barrelblast invisible
	}

	trigger boom
	{
		setstate hurt_barrelblast default
		wait 100
		remove
	}
}


hurt_bankblast
{
	spawn
	{
		wait 200
		setstate hurt_bankblast invisible

		setstate hurt_barrelblast2 invisible
		setstate hurt_barrelblast3 invisible
	}

	trigger boom
	{
		wait 400
		setstate hurt_bankblast default
		wait 100
		remove
	}
}

But this isn’t the part that there is a prob with. The tank stops and doesnt turn or shoot. This is called:

trigger tank startfire 
playsound sound/vehicles/tank/tank_fire.wav 
trigger boomtrigger boom_all // triggers the hurts around bank explosions (each has its own wait for timing)
trigger tank_flash run

(Ifurita) #9

So, to go back to baseline, what I understand is that the tank moves along, stops, the doors blow up, and the tank keeps going (or stays there if it isn’t supposed to move on). The part where the turret turns is the only thing that isn’t happening?


(ayatollah) #10

Sorry no the tank moves, goes to proper position and stops. It is then meant to turn the turret, shoot and blow doors.


(ayatollah) #11

Please don’t forget this thread. I am sure thre are others with the same problem as me. I really need this sorted. Its the last thing before finishing my script.


(ayatollah) #12

Come on, I don’t want to spam the forum here but I thought I was gonna get somewhere. Please help me finish this map it is the last thing I have to do…


(WeblionX) #13

Do you have the door entities set up with the proper scriptname / targetname?


(ayatollah) #14

door entities aren’t the prob, they’re fine. Its the

trigger tank_turret turn

that doesn’t seem to work.


(EB) #15

use the command “g_scriptdebug 1” in the console, then as you run through the map, the scripting will be displayed in the console, you can find the problem there…most likely.

Post the STARTFIRE part of the scripting.
how big is the file ? can you zip it up .map, .bsp and script then host it somewhere ?


(ayatollah) #16

The zip is about 1MB…Get it here


(EB) #17

I wish I knew how to let you know this easily…

You should scrap that scripting entirely and rewrite it all or cut and paste it from anaother script as there is too much for me to go through to fix for you. I had thought you had it 98% done and you needed the turret to fire. When in actuality you need it to recognize that a player is not present for it to stop idle’ing, once it is running, it won’t stop moving the tracks even when it does stop…needless to say there is more wrong with it than that too. Tank scripting is not easy for loads of people. You are using the goldrush scripting, but you have also chopped it up slightly. All you can do is start again, follow guidelines and be very careful with what you choose to do.


(ayatollah) #18

You see I did cut and paste it from Goldrush, all I did was change the scriptnames to suit. That didn’t work. So then I tried amending the script to fit with the Fuel Dump script as Iffy sugested and that didn’t work.

Are you saying I need to get rid of all my tank script? Or what parts?

EDIT: It does stop the tracks moving…It moves into position, stops tracks and the turret should turn and shoot but doesn’t. The tank works fine otherwise. Is there an easy way I can just get the doors to blow so I can show the map to my mates then get back to doing it properly?


(Loffy) #19

when tank reaches a end point, make it trigger a script section. This section activates a func_explosive (bam!) and set the doors invisible. The func_explosive is placed where the doors are. The doors need to be made into script_mover (dont forget to include a origin brush).
In sum, the explosion creates a nice effect and the doors disappear.
//Loffy


(Ifurita) #20

you could just setstate the doors invisible in their spawn subsection.