tank woes


(neotic) #1

On my first try last night I stole the Goldrush tank and as far as I am concered it was a success. Only one problem really and it doesn’t seem very big; just not sure why its happening.

  1. The tracks start ahead of the first spline point
  2. The tank_shell (model), gun, and TOI and trigger_multiple all work, they just don’t follow the tracks.

Its quite funny really. I will repair the tank and it will take off. If I follow the tracks I won’t be in the trigger_multiple any longer and it will eventually stop. So to see the tracks run I have to keep running back to the model, gun, TOI, and trigger_multiple that don’t move with the tracks.

I searched the forum for this problem but I guess no one shares this problem.

I figure that it must be just entity problems, since as far as the script is worried its working properly. Here is some info; since I know you all like that.

// entity 774
{
"model2" "models/mapobjects/tanks_sd/jagdpanther_africa_tracks.md3"
"targetname" "tank"
"scriptname" "tank"
"spawnflags" "222"
"classname" "script_mover"
"health" "1200"
"description" "Jagdpanther"
"tagent" "tank_shell"
// entity 767
{
"classname" "func_constructible"
"scriptname" "tank_construct"
"targetname" "tank_construct"
"spawnflags" "5"
"health" "50"
// entity 766
{
"spawnflags" "1"
"scriptname" "tank_trigger"
"targetname" "tank_trigger"
"target" "tank_enabler"
"classname" "trigger_multiple"
// entity 765
{
"objflags" "7"
"shortname" "Jagdpanther"
"override" "The tank has been repaired"
"classname" "trigger_objective_info"
"targetname" "tank_build"
"scriptname" "tank_build"
"spawnflags" "9"
"track" "the Tank"
"target" "tank_construct"
"customalliesimage" "gfx/limbo/cm_jagdpanther"
"customaxisimage" "gfx/limbo/cm_jagdpanther"

All together now!

// entity 762
{
"target" "tank_disabler"
"spawnflags" "1"
"wait" "1"
"origin" "3408 -3256 854"
"classname" "func_timer"
}
// entity 763
{
"targetname" "tank_disabler"
"target" "run"
"scriptname" "tank_disabler"
"classname" "target_script_trigger"
"origin" "3408 -3232 854"
}
// entity 764
{
"scriptname" "tank_enabler"
"target" "run"
"targetname" "tank_enabler"
"origin" "3408 -3280 854"
"classname" "target_script_trigger"
}

If you could help me solve this curiosity that would be marvelous; if you need some more information just ask!

Thanks folks!


(FireFly) #2

I think it’s still a script problem. Do you have these entities attached to a tag ? If not , you have to do so

for example the TOI:

tank_build
{
	spawn
	{
		wait 500

		attachtotag tank_shell tag_turret
	}
}

I had the same trouble with my tank in the v1rocket map :smiley:


(neotic) #3

I do have that already in my script; letter for letter. Mmh, I wonder what else it could be.


(chavo_one) #4

Did you attach the tank_shell to the tank?


tank_shell
{
	spawn
	{
		wait 400
		attachtotag tank tag_tank
	}
}

(FireFly) #5

Atm I can’t think of any reason why it won’t work other than a tag problem. all 4 entities ( The tank_shell (model), gun, TOI and trigger_multiple ) need to be attached to the tank tags in order to move along with the tracks.


(neotic) #6

I got it all working; I just shouldn’t do such stuff without sleep! Hehe, was missing a script or two. The tank spawns ahead of where its suppose to be and then warps as soon as I approach to the correct place. I’m sure thats already been answered around here somewhere… and why my tank disappears at the end of the spline… clicks search :smiley:


(MadJack) #7

#1, that’s because you tell it to followspline when it spawns so it goes to the second spline (probably at 50 000 speed). Put spline 2 next to the first. or insert a new spline #1 wherever so your spline #2 is located where you want the tank to be on spawn.

#2, you shouldn’t have a followspline at the last run_# for your last spline because at the one before last, the followspline told it to go to the last one. So, when it hits the last followspline at the last run_#, there’s no other spline to follow, so it will go to the map’s origine (0 0 0). That last run_# should only contain the stuff you want it to do to set the winner, update objectives, blow whatever and so on.

I hope it all makes sense to you. Maybe I should’ve waited to be fully awake before posting :smiley: