View Full Version : Func_train question...
10-25-2003, 06:19 AM
Hey guys, is there a way to create a func_train that moves between just two point_corner(s), but in only a one way motion? For example, a train spawning at one point (origin), going to a second point and then respawning at the origin to repeat the process? Any input is greatly appreciated.
10-25-2003, 04:38 PM
You could always build a train that moves up, then "retracts" into a wall, moves (hidden) back to the start, and "extends" again before repeating the cycle.
10-25-2003, 09:32 PM
Yeah, I think I'll have to be creative with. There doesn't seem to be a whole lot of info on func_trains.
I think you're thinking of the same idea I had. Have the train move in a loop, but partially out of view, so that the straight shot I want will be the only viewable part of the loop, and eberything else hidden. I think it's my best bet.
10-30-2003, 04:23 PM
10-30-2003, 06:50 PM
Hmm, who could that be?
10-30-2003, 08:17 PM
You can use icarus to do this, would be something along the lines of making a func_usable and placing two ref_tags in your map. The ref_tag's need targetname's like "moverpos1" and "moverpos2" and the func_usable needs a key of script_targetname and a value of "whatever".
Creating a script that is triggered when the map starts which would be something like
move($tag("name_of_ref_tag_1",ORIGIN)$, $tag("name_of_ref_tag_2",ORIGIN)$, 1000);
move($tag("name_of_ref_tag_2",ORIGIN)$, $tag("name_of_ref_tag_1",ORIGIN)$, 0);
affect("func_usable_name", FLUSH) - what to perform the code on
loop(-1) - loop this forever.
move($tag("name_of_ref_tag_1",ORIGIN)$, $tag("name_of_ref_tag_2",ORIGIN)$, 1000); - take one second (the 1000 is 1000 milliseconds) to move from where ref_tag_1 is to where ref_tag_2 is.
move($tag("name_of_ref_tag_2",ORIGIN)$, $tag("name_of_ref_tag_1",ORIGIN)$, 0); - instantly move to where ref_tag_1 is without visibly moving thru the distance between the 2 points.
The two wait(3000) lines tell it to wait 3 seconds before doing the next command. Something to note though is that it may take 1 second for the func_usable to move from position 1 to position 2 but the script doesn't care, the second it has issued the command to move, it will continue running the script and won't wait that second, you need to keep that in mind with wait(n)'s to make the script wait a while after doing a command like move.
Btw to compile this script just put it in a plain text file and get the JK2 editing tools, find the file named ibize.exe and drag your text file onto it, you should end up with a .ibi file, put this in base\scripts.
03-29-2004, 01:43 PM
In the latest version of radiant there is an "invisible" flag for the path_corner enitity - as soon as the train hits this point it will turn invisible until it gets to another path_corner without this flag set. Hell of a lot easier than scripting, but obviously less versatile
vBulletin®, Copyright ©2000-2016, Jelsoft Enterprises Ltd.