Boothand Posted October 15, 2013 Posted October 15, 2013 1. As some may have noticed, func_trains in JK2 are very bugged. If you want them to be togglable (using a trigger), you cannot connect the last waypoint back to the first one, or else it will always run (using a trigger then will make it bug and teleport between the points). To make it togglable, the setup looks like this: trigger_multiple > func_train > point1 > point2. This will cause the train to spawn in the (0 0 0) center of the map. It will work once you use the trigger, but it will move from point1 to point2. The train has no origin brush, but having one causes even more problems. Workaround: A trigger_always (runs targets on worldspawn) connected to a target_relay which triggers the func_train. So when the map starts, the train starts moving, so that it's not stuck in the center of the map. However, I need to make it (almost) immediately be triggered a second time, so that it moves back towards point1. During testing, it works using a trigger manually with use button (it does not need to reach point2 before going back to point1, but has a 500 ms delay between triggerings or so). What I've tried: Trigger_always > > target_relay & target_delay (target_delay has wait value of 2000) > > func_train > point1 > point2. Target_delays seem not to work at all, not even when triggered manually. Unless there is a way to set a delay for the relay (rhymes not indenday), I don't know how I should make the func_train go back to point1. Ultimately what I want to achieve is just to get the train to spawn in its starting position as it's supposed to. _______________________________________________________________________________________________________________________________ 2. I have made a plant, with alpha channels. It looks good in-game, but when putting two next to each other, one of them keep flipping "infront" of the others, in a way. Here's the shader: textures/Bootland/sapling1 { qer_editorimage textures/Bootland/sapling1.tga cull disable surfaceparm nonsolid q3map_nolightmap // <div> <func> <base> <amplitude> <phase> <freq> deformVertexes wave 10 sin 0 0.8 0.5 0.4 { map textures/Bootland/sapling1.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA alphafunc GT0 } } Removing the blendfunc altogether makes it cellshaded and looks messy on a distance (however fixes the fighting issue).Here's a video showing the problem: http://no.twitch.tv/boothand/c/3087720 (what I said about there being a problem on my other computer, about the hanging sign - was incorrect. The problem has solved itself. I do however still need help with the bugging sprites (the chains) above the sign - which I have another thread for). Any ideas?
mrwonko Posted October 15, 2013 Posted October 15, 2013 If you have two questions, I suggest making two topics so it doesn't get confusing. Is the func_train question for SP? In that case I recommend just scripting it instead. As for the plant, yeah, JK2 has no alpha sorting. You can do all-or-nothing transparency, which solves the issue or use additive blending (blendfunc GL_ONE GL_ONE), which works around the issue but is an inferior kind of transparency.
Bystrzy Posted October 15, 2013 Posted October 15, 2013 1. Func_train ,One of the most important thing is making func_train origin brush. You actually made it by creating square brush with system/origin shader on your func_train center. You must have all func_train brushes, patches etc +origin brush created as one entity to work properly. You have to create func_train paths with path_corner entity, just create your paths by connecting multiple path_corner entities with ctrl+k shortcut. Func_train------>path_corner--->path_corner---->path_corner etc. etc.2. Try this shader it should work correctly.textures/Foldername/shadername{qer_editorimage textures/Foldername/texturenamesurfaceparm noimpactsurfaceparm nomarkssurfaceparm nonsolidq3map_nolightmapcull twosideddeformVertexes wave 10 sin 0 0.8 0.5 0.4{map textures/Foldername/texturenamealphaFunc GE192depthWrite}}
Boothand Posted October 15, 2013 Author Posted October 15, 2013 If you have two questions, I suggest making two topics so it doesn't get confusing. Is the func_train question for SP? In that case I recommend just scripting it instead. Yeah, I'm sorry about that I have already posted so many topics lying around, and it feels a bit uncomfortable pushing all my questions (they are many) onto the forums. The mapping section in lucasforums is just a wasteland of old unresolved threads of mine, as an example... Yeah, I forgot to specify I'm mapping for multiplayer. Everything would have been so much easier in singleplayer... 1. Func_train ,One of the most important thing is making func_train origin brush. You actually made it by creating square brush with system/origin shader on your func_train center. You must have all func_train brushes, patches etc +origin brush created as one entity to work properly. You have to create func_train paths with path_corner entity, just create your paths by connecting multiple path_corner entities with ctrl+k shortcut. Func_train------>path_corner--->path_corner---->path_corner etc. etc. 2. Try this shader it should work correctly. textures/Foldername/shadername{qer_editorimage textures/Foldername/texturenamesurfaceparm noimpactsurfaceparm nomarkssurfaceparm nonsolidq3map_nolightmapcull twosideddeformVertexes wave 10 sin 0 0.8 0.5 0.4{map textures/Foldername/texturenamealphaFunc GE192depthWrite}} You resolved my shader problem! Thank you! I wasn't aware you could use 192. I thought 128 was max. Now that I try with 128, that works equally well though. As for the train - with or without the origin, the problem remains the same. It spawns at the center of the map (at least in multiplayer). Step by step:1. https://dl.dropboxusercontent.com/u/58757568/train1.jpg (door + origin becomes a train)2. https://dl.dropboxusercontent.com/u/58757568/train2.jpg (I make the path corners and connect them - train > path > path)3. https://dl.dropboxusercontent.com/u/58757568/train3.jpg (I make a trigger to toggle the train going up and down)4. https://dl.dropboxusercontent.com/u/58757568/train4.jpg (I compile, and train spawns at center coords of map)5. https://dl.dropboxusercontent.com/u/58757568/train5.jpg (I click the trigger and train goes from path1 to path2 and is now ready to be toggled by the trigger). This is why I'm trying to work around it - all I need is a way to make two valid triggerings from worldspawn. That would set the door to its correct position. Hope that clears it up!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now