Another tank topic!


(Malverik) #1

Im trying to get exactly how the tank works in goldrush and there are some stuff that facinates me :bash:

  1. In the .map, the tank starts off being 90 degrees off it’s starting position. At spawn we move it to the first spline. How does it know what end of the tank is the front so it can follow the spline correctly?? Am I missing an entity or key?

  2. This is the script for the trigger_multiple around the tank

tank_trigger
{
spawn
{
wait 500

  attachtotag tank_shell tag_turret

  trigger tank_trigger bot_goal_loop

}

trigger bot_goal_loop
{
wait 4000 // check every 4 seconds
trigger tank bot_active_check
trigger tank_trigger bot_goal_loop
}
}

notice it calls “tank bot_active_check” but there is no such trigger defined in the script. So what happens in bot_active_check and does it relate to the tank_enabler?

  1. In the command “followspline 0 spln1 50000 length 32 wait” what does “lenght 32” do and could I need to change it?

Thanks a lot!


(dark-tim) #2
  1. In the .map, the tank starts off being 90 degrees off it’s starting position. At spawn we move it to the first spline. How does it know what end of the tank is the front so it can follow the spline correctly?? Am I missing an entity or key?

i don;t know but i think that it has something to do with the game engine


(Ifurita) #3

Did you check the tank construct in Goldrush for an origin entity. In script movers, the origin brush is what orients the _mover from marker to marker


(Malverik) #4

yes i saw the origin for the script_mover underneat the tank but I was expecting something like an “angle” key but there doesnt seem to be anything that says “foward is in that direction”


(No1_sonuk) #5

The origin of the model also contains orientation information.

When the model is made, it is made pointing in a particular direction. When it is exported to the game format, the orientation relative to what the game considers as “North” is stored because each pixel position is recorded relative to the three axes.


(G0-Gerbil) #6

About point 2 - does it generate a script error? I know that some of the official maps weren’t totally debugged.
Try setting, erm… g_scriptdebug (I think) to 1 and store the output then go over it to see what exactly is being done by the script. Might give you a clue.


(Mean Mr. Mustard) #7

To orient script_movers correctly for spline paths, they must point to the ‘right’ in radiant (zero degrees). This way ET knows which is the front/back of the vehicle. Then, the vehicle can be oriented along the path from spline point to spline point. Check the following link.

http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=6250&highlight=scriptmover+angle

In goldrush, when the tank is spawned it executes followspline spln1 with speed 50000 (very fast - so that a player doesn’t see it). This sets up the orientation of the tank. You could also use faceangles but then you might geta ‘glitch’ when the tank moved if the faceangels weren’t exactly along the spline path - so much ‘easier’ to have it follow a spline point quickly.

If you had a test map that had a vehicle facing 0 deg in radiant, but your spline path went at 90 degrees, and executed an initial followspline like goldrush 9but did it slowly) you see the vehicle spawn facing right but then rotate to face ‘down’