Exploding Tanks not disappearing!

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

User avatar
GI Morpheus
Corporal
Posts: 28
Joined: Mon Jun 30, 2003 1:27 am

Exploding Tanks not disappearing!

Post by GI Morpheus »

I'm having a problem with my tanks not disappearing. After setting up a tank to blowup, the original non-destroyed tank is not disappearing, after being replaced by the destroyed version. I get both versions in the same location. Everything works fine for BMX bikes or Opel trucks, but those darn panzers just won't go away. Here is the info for each entity:

classname=vehicle_german_panzer-tank-europe
model=vehicles/panzer_tank_europe.tik
targetname=exploder
testanim=idle
scale=1.0
#set=1
origin=-5494.00 -2236.00 64.00
angles=0 90 0

classname=vehicle_german_panzer_iv_european_destroyed
model=vehicles/panzer_iv_eud.tik
targetname=explodersmashed
testanim=idle
scale=1.0
#set=1
origin=-5482.00 -2214.00 58.00
angles=0 90 0

classname=fx_explosion_tank
model=emitters/explosion_tank.tik
targetname=exploderfire
testanim=idle
scale=1.0
#set=1
origin=-5496.00 -2120.00 160.00

classname=trigger_multiple
health=200
targetname=explodertrigger
spawnflags=128 (damage)
#set=1

"exec global/exploder.scr" is in the map.scr file

Can anyone shed some light on this?
Last edited by GI Morpheus on Sat Jul 05, 2003 7:35 pm, edited 1 time in total.
- GI Morpheus

-------------------------
"Most of these people are not ready to be unplugged..."
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

explode

Post by tltrude »

How are you setting off the explosion?

exec global/exploder.scr::explode 1

Search your .map file with wordpad for the targetname "exploder". You may have a hidden extra one. A lot of thing will stop an exploder from working. Sometimes it is other scripts that overwrite a variable in the exploder script. So, try stopping the other scripts from loading, or move the exploder script loading line so it loads last.
Tom Trude,

Image
User avatar
GI Morpheus
Corporal
Posts: 28
Joined: Mon Jun 30, 2003 1:27 am

Umm... Like this?

Post by GI Morpheus »

tlTrude,

Umm.. I'm using this:

exec global/exploder.scr

and that's it. I have other #set numbers working fine (like an opel truck at #3 and a BMW bike at #4). It just seems to be the tanks. I don't think it's a scripting issue, since I'm only using the line above. I'm not using "::explode 1" in the above line. Why do I need to? Isn't each explosion set off by it's own trigger? I followed the "Nemesis" tutorial at:
http://users.1st.net/kimberly/Tutorial/blowup.htm

Did I miss something?
- GI Morpheus

-------------------------
"Most of these people are not ready to be unplugged..."
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

trigger

Post by tltrude »

Ok, you are using a trigger and that's fine. The line I put will set it off in the script if you, for example, wanted it to be bombed by a plane.

For your non-disappearing tank you need to check the targetnames again. Anything with the name "exploder" and #set 1 should vanish when the #set 1 exploder is triggered. Your trigger has to be targetnamed explodertrigger and have #set 1 as well.

It probably wouldn't hurt to review the text at the top of the exploder.scr file. Here is a tutorial map on bombers and it has lots of exploders you can study.

http://pages.sbcglobal.net/tltrude/Temp/test_bomber.zip

Image
Tom Trude,

Image
User avatar
GI Morpheus
Corporal
Posts: 28
Joined: Mon Jun 30, 2003 1:27 am

Trigger

Post by GI Morpheus »

tltrude,

Here's what I don't get (after looking at your test bomb file). The sherman tank is just one piece (tank and cannon). But the german tanks seem to have 2 pieces the tank and the cannon. However when I drop a german (panzer or tiger) without the cannon, it seems to have a cannon on top during the game. I noticed that you had a seperate cannon on top of yours in the test bomb file.

Image

How is this supposed to work?
- GI Morpheus

-------------------------
"Most of these people are not ready to be unplugged..."
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

The reason you see the turret in the game is because of this line in panzer_tank.tik
// Spawn and attach the parts
spawnturret 0 "vehicles/panzer_cannon.tik"
//spawnturret 1 "vehicles/panzer_smgun.tik"
if you need to script the tank to fire the animations are in the Panzer_cannon.tik and you will do something like this

$mypanzer thread fireme

fireme:
local.gun = self QueryTurretSlotEntity 0
local.gun anim fire
end
User avatar
GI Morpheus
Corporal
Posts: 28
Joined: Mon Jun 30, 2003 1:27 am

This HAS to be simple!

Post by GI Morpheus »

Look guys, I don't need an animated tank. I just want to be able to blowup a static german tank. Since I don't add a cannon to the tank in the first place, I don't have a cannon to call as an exploder object. Does this mean that I HAVE to add a cannon to every german tank and call it as an exploder object just to make it disappear? I don't get this, It has to be simple. How is everybody else doing this? Here's an example:

Image
- GI Morpheus

-------------------------
"Most of these people are not ready to be unplugged..."
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

you have to do this to the original tank.

$brandnewtank.cannon = $brandnewtank queryturretslotentity 0

if ($brandnewtank.cannon) //if the cannon exists
{
$brandnewtank.cannon remove
}


remember, the cannon is a seperate entity attached to the tank. when you remove the chasis, you have to remove the cannon too. the commands up above return the cannon, so you can remove it.
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

also, if you were wondering, the sherman tank is only used as a static model, it doesnt drive or have animating treads or shoots or anything, thats why the turret is already there.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Tiki

Post by tltrude »

You may need to make a new tiki file/shader file just for your tanks. I also had a hard time finding a static german tank. Either the wheels were moving or the thing is in two parts. So, your best bet is to just spawn the two parts and them give them both the exploder name and set number. Making the wheels stop could be a problem. Maybe you can put the panzer skin on a tank that has wheels that can be stopped--using a new tiki.
Tom Trude,

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

The global/exploder.scr usually asks you to use script_objects but in this case you are useing models so maybe you need to use a script_model for the tanks with a Key:model and Value:vehicles/panzer_tank_europe.tik
In your original post you said the classname=vehicle_german_panzer-tank-europe maybe it should be classname=script_model
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

and as for brushes, we use script_objects for exploders/explodersmashed
Live to map, not map to live.
-mohaa_rox, .map
moderator
User avatar
GI Morpheus
Corporal
Posts: 28
Joined: Mon Jun 30, 2003 1:27 am

Tanks

Post by GI Morpheus »

OK Guys,

I used the script objects, and they work fine. The only problem is the tank treads are animated and moving. Using "testanim=idle" doesn't have anything to do with the treads. Since the tanks are sitting on rail cars, I can't have them animating. Is there a way to stop the animation, or is there a way to create a new model skin, or tiki, or shader to stop the animation? Hasn't anyone else done this before?
- GI Morpheus

-------------------------
"Most of these people are not ready to be unplugged..."
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

tik

Post by tltrude »

A new tik file is the way to go. But, you will probably need to make new shaders for the wheels--ones that don't move. Which tank is it?

surface treads shader tiger_treads
surface wheelfront shader frontwheel
surface innerwheel shader innerwheel
surface outerwheel shader outerwheel
surface wheelback shader backwheel

Here is one of the shaders for a tigertank wheel:

Code: Select all

backwheel
{
	qer_editorimage	textures/models/vehicles/tigertank/backwheel.tga
	{
		map textures/models/vehicles/tigertank/backwheel.tga
		rgbGen lightingSpherical
		//tcmod rotate fromEntity 0 2 0 -20
		tcmod rotate 5 0 20  // <--this line is why it rotates
	}
}
There may be wheel shaders that don't move already, but they were not used in a tiki file. So, all you would have to do is change the shader name in the new tik file.
Tom Trude,

Image
LT.BARNES
Major
Posts: 288
Joined: Mon Dec 30, 2002 4:37 pm
Location: london

Post by LT.BARNES »

dude jus add this to it like i think above the tank remove or wateva...jus add this to it

$bomb4 remove
$bomb4 thread global/vehicles_thinkers.scr::tank_killed


$bomb is jus the targetname of me bomb.

put your targetname here... and add this

thread global/vehicles_thinkers.scr::tank_killed
...prepare for your finest hour...
Post Reply