Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Func_train question...

Page: 1 of 1
 dekerd
10-25-2003, 6:19 AM
#1
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.
 wedge2211
10-25-2003, 4:38 PM
#2
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.
 dekerd
10-25-2003, 9:32 PM
#3
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.
 Red Fury
10-30-2003, 4:23 PM
#4
DEKERD!!!!
 dekerd
10-30-2003, 6:50 PM
#5
HAHA!

Hmm, who could that be?

Snaaaaaaaaaaaaaake!
 WadeV1589
10-30-2003, 8:17 PM
#6
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

affect("func_usable_name", FLUSH)
{
loop(-1)
{
wait(3000);
move($tag("name_of_ref_tag_1",ORIGIN)$, $tag("name_of_ref_tag_2",ORIGIN)$, 1000);
wait(3000);
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.
 Codja X
03-29-2004, 1:43 PM
#7
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
Page: 1 of 1