Call of Duty: Black Ops 3 => Help Desk => Scripting => Topic started by: divinefury5 on December 05, 2016, 10:33:51 am
Title: Minecart
Post by: divinefury5 on December 05, 2016, 10:33:51 am
Hey can someone help me with a script for a moveable minecart when you purchase you will be riding from A to B ? Like in the map Minecraft v1.2 with the boat. Thanks for helping
Title: Re: Minecart
Post by: MakeCents on December 06, 2016, 09:06:35 pm
Hey can someone help me with a script for a moveable minecart when you purchase you will be riding from A to B ? Like in the map Minecraft v1.2 with the boat. Thanks for helping
Setup a trigger multiple and target the cart model. Then target a struct where the cart will end up. Then target a script_brushmodel from the cart. Then cut that brushmodel and wrap your cart with it. Place the trigger multiple in the base of the cart, just above the script_brushmodel.
Title: Re: Minecart
Post by: Blink-420 on December 07, 2016, 01:56:54 pm
Setup a trigger multiple and target the cart model. Then target a struct where the cart will end up. Then target a script_brushmodel from the cart. Then cut that brushmodel and wrap your cart with it. Place the trigger multiple in the base of the cart, just above the script_brushmodel.
Awesome :) Question though. Is there a way to make this go say in a circle. For example, go half around a city block, stop then when used again going back to the beginning?
Title: Re: Minecart
Post by: MakeCents on December 07, 2016, 02:05:29 pm
It's a very simple script and is only setup currently to go from one point to the next, then back, in a straight line.
If your going to make turns I'd recommend learning more about vehicle nodes. I've used structs before, and it is possible. If it is the better solution for you to use structs, I would set them up as the target of each, turning them as it goes around the track. Then in script turn the cart to the next structs angle over the time it takes the cart to get there, continuing this until you have defined a kvp that says to stop. In the end you would have a loop of structs as each the target of the previous, with two of them having kvps to stop it. MoveToNext function would be edited to make this happen. I would suggest a while loop, that checks for that kvp. When defined and equal to stop, it would stop. In the while loop I would get the distance to the next struct, which would be the target of the current struct, and the angle of the next struct. Rotate to that angle and move to that struct, track the last struct, and wait the time it takes.
Title: Re: Minecart
Post by: Snprym on December 10, 2016, 01:41:04 pm
as a noob, how do i " target" a model? Do i make a new kvp target?
Title: Re: Minecart
Post by: Blink-420 on December 10, 2016, 08:17:43 pm
Setup a trigger multiple and target the cart model. Then target a struct where the cart will end up. Then target a script_brushmodel from the cart. Then cut that brushmodel and wrap your cart with it. Place the trigger multiple in the base of the cart, just above the script_brushmodel.
Also, I cant get this to work. I know I've set it up just like you said. I dont know if you forgot but I gave the script_multiple a targetname of carts like it says in the script and still didnt work. Any ideas why?
Title: Re: Minecart
Post by: MakeCents on December 10, 2016, 11:16:40 pm
Also, I cant get this to work. I know I've set it up just like you said. I dont know if you forgot but I gave the script_multiple a targetname of carts like it says in the script and still didnt work. Any ideas why?