rail gun train


(vince829) #1

I want to add a train to my map like rail gun that moves on a track in a direction depending on who controls it. I assume it is like adding a tank but instead making some changes to the script and importing a different model.

The problem though is I can not find the train model from rail gun. I can’t even find the railgun.pk3 but I can play it. So does anyone know how to get the model? Is it possible to make a train from a set of brushes and using that instead of a model (to make it moveable)? When I tried doing that it said my script_mover need a “model”.

Also, can someone just explain the basic script for the train to me, although it is not basic. I already know how to put a tank in the map, so I just need to know how to make the changes to a tank script besides the obvious ones to make it work for a train. Thanks!


(FireFly) #2

Unfortunally the tug MD3 model that was used for the railgun map was never released with the SDK.


(vince829) #3

Damn, well is there anyway I can make a similar one myself? Is it possible to use brushes instead or somehow even make a model to use?


(shagileo) #4

But then again, I knew the model wasn’t in the pk3’s, but how are we able to play it in the railgunmap?
Was always a mistery for me


(vince829) #5

[QUOTE=shagileo;184836]But then again, I knew the model wasn’t in the pk3’s, but how are we able to play it in the railgunmap?
Was always a mistery for me[/QUOTE]

I know I don’t understand it. That is what leads me to believe the tug is not a model because wouldn’t it should up in etmain?


(Wezelkrozum) #6

Also a mistery for me. But i know the md3 is converterted into the bsp file. That’s why they don’t need it in the pk3.


(FireFly) #7

Well, if you want to replicate the tug model my suggestion would be to open up the source map of railgun: Although the MD3 model isn’t displayed in the map, the clip brushes around the tug are still there so could build your own tug model - with brushes - around / inside those clip brushes…

Hold your horses…It’s all explained in here :slight_smile: : http://www.splashdamage.com/forums/showthread.php?t=4894


(vince829) #8

[QUOTE=FireFly;184840]Well, if you want to replicate the tug model my suggestion would be to open up the source map of railgun: Although the MD3 model isn’t displayed in the map, the clip brushes around the tug are still there so could build your own tug model - with brushes - around / inside those clip brushes…

Hold your horses…It’s all explained here :slight_smile: : http://www.splashdamage.com/forums/showthread.php?t=4894[/QUOTE]

Ok, so when I make my brushes, do I have to do it in radiant, convert to ASE, do work in 3dmax then convert to a .md3 then import in GTKradiant? Is there any way I can make the brushes in only GTKradiant. I tried that but when I loaded my map it said script_mover needed a “model”


(th0rn3) #9

Even I have created such topic.
Well 'bout everything from begining: there’s no such thing as ‘railgun.pk3’, it is called ‘pak0.pk3’ - where you can find all etmain, including 6 official map’s bsps.
In source maps you can clearly see that they’ve used a model for tug. Why you cant find it? Becouse it was compiled into the bsp. How can you get it? Convert original bsp into ase, then import it into a 3d program (takes 30 minutes in blender using ase addon, because railgun’s ase takes about 60mb), then delete everything exept tug (you will find few of them, your choise to choose). Work a bit texturing and cleaning model, then export it as md3.
Hope you understand. I wrote this on my mobile!


(FireFly) #10

I’m not sure if this will help you, because I’m a bit rusty when It comes to script_movers…

I don’t know if you are familiar with the tramfight map, but - while in testing phase - I created the tram model with brushes in gtkradiant ( with an origin brush inside it) and turned this into a script_mover…
Now as far as I remember this caused alot of problems while ingame, for example, in corners the tram would stutter, It wouldn’t go smoothly around the corner… So I decided to save the brushwork as an ASE model, import it into 3dmax, added some more details to the tram, and exported to an MD3 file…
With the MD3 model the tram would go smoothly around the corners no stuttering at all…


(vince829) #11

I made a simple brush to test this out.

I am just ripping out an old tank script that I edited for now until I learn what I need to:

tank
{
spawn
{
wait 300

followspline 0 spln0 50000 length 32 wait

trigger self tank_path
}

trigger tank_path
{

stopsound
playsound sound/vehicles/tank/tank_move.wav looping volume 512
followspline 0 spln0 100 wait length 304
followspline 0 spln1 100 wait length 304
followspline 0 spln2 100 wait length 304
followspline 0 spln3 100 wait length 304
}
}
tank_shell
{
spawn
{
wait 400
attachtotag tank tag_tank
}
}

I made a brush (the tank) that I gave a scriptname and targetname a value of “tank_shell”
I then made a separate brush with I gave clipwep_metal, which I added an origin brush to on the bottom, and made them a script_mover grouped together. I gave them a scriptname and targetname of “tank”

When I run the map, I can hear the sound of the tank running along its spines. However the brush I made acting as a dummy tank was not moving. I could hear the sound moving along the splines though. Does anyone have any ideas why my brush is not moving?

Also, besides that how do I make the train move forward only when the allies are on it? I assume adding a trigger…

Thanks!


(-SSF-Sage) #12

The followspline command is supposed to go to the script_mover’s scriptblock (tank_shell). Currently only your clip should move


(vince829) #13

So do you mean I need to put the followspline script part into the tank_shell part of the script? I will try it out in a few hours


(-SSF-Sage) #14

Yes. Put trigger tank_path in tank_shell scriptblock. Also you might need to move the clip separately unless you want to attach to tag it.


(vince829) #15

It works now. It turns out the brush I made in radiant was not a script_mover, only the clip for it was. I still don’t know how to only make it move when allies or axis are on it


(vince829) #16

Does anyone know how to position the train? Right now it is perpendicular to the tracks. I just need to make it parallel on it. Is there a script command or something for that? I have the origin brush in right.


(th0rn3) #17

Train origin follows spline’s origin


(Diego) #18

I have a rail tug in my new map. Since the model didn’t exit, I just reworked the clip brushes from the original, retextured them and added more detail to them to create a new tug similar in style to the model. The rail tug script is quite a bitch to follow and I needed to reverse the scripting so allies are on the offensive not defensive movement. But since I really needed the entire rail and crane scripting, it made more since to modify what splash damage did than to try to recreate it from scratch.

It’s working fine except that I do get the stuttering that firefly mentions. I might try to convert my exisiting brushwork into an ASE file like he suggests. I don’t think I have to ability to go to MD3.

But right now, I’m having lighitng compile issues with my map (too big again). So I’ve been trying to remedy that problem for a while before finishing the entity scripting.


(Tyrlop) #19

nice diego, that tug there remainds me of the tram in halflife 1


(isbowhten) #20

edit: be careful! that ALL brushes of the tug are one only script_mover. and a script mover does not need a model, but it needs anything e.g. brushes… just any visibility, but as such textures like origin textur arent drawn, you maybe forgot to include some brushes into the script_mover when you got the “needs a model” error.
you can also select some brushes , then select one of the brushes of the script_mover and then merge them into 1 only script_mover when you rightclick “move into entity”

the trigger_multiple has team specific spawnflags to check.
and you can give the followspline command a direction.
followspline 0 spln0 100 wait length 304 = forwards
followspline 0 spln0 100 wait length 304 = backwards but !
this is not exatcly what you want…
lemme explain:
s1 -> s2 -> s3 s1 targets s2 etc…
when you write followspline 0 s2 100 wait (i would not put there length 304 to it, never understood why to use that, it works fine without)
it moves from s2 to s3
when you write followspline 1 s2 100 wait
it moves the same spline consisting of s2 and s3 backwards what means it moves from s3 to s2 but NOT from s2 to s1.
so you just have to shift the triggers in the script which are only runned when the value of an accum is correct, here you have to shift it.
try it out in a simple testmap to understand it further.