![]() ![]() set this variable type to the class that your rings are, so in your case gold_rings and make it a object reference. now select the variable you just created and go to the details panel, there you will see variable type. to do this click the + sign next to where it says variable on the bottom left of your screen. Now on to the next issue you need to create a variable that is an array. think of it like this your probably going to have some rings that arent part of a dash set right, so you dont want the script in the rings. it runs the script as many times as it can until the index is equal to the last index of the array.Īlright let me see if i can explain, the script your creating doe not go in the ring bp, you need to make another actor for the dash script that ive been showing. the last thing we need to do is to increment the value of index and run the loop again, this is the script off of the finished pin. the timeline gets updated rapidly possible on tick so it looks like smooth movement. a lerp will give a value between a and b based on the alpha, this is therefor based on the timeline. we then lerp vector and set the location. to get the location to move between we just use the index to get the ring where we are currently located from the array then for the target location we do the same thing but we add one to the index so we get the next ring in the array. the timeline i used in the example is just a float track that goes from a value of 0 to 1 over 1 second. this section basically just moves the player from point A to point B over a specified time via a timeline. ![]() if the index is less than the last index that mean that there is still rings to move to so we move on to the next part of the script where we move the player character. we then compare the index to the last index, if the index is greater than or equal to the last index then we stop the loop, this would be the true pin on the branch node. ![]() we then need to get our array and get its last index (this is important since we want the dash to stop at the last ring). to do this we need a variable named index of type int. next we need some code that will control if the loop should be run, this basically tells the loop when to stop running actually. to start off we need a custom event, i named this speed rush. Now on for the main loop of the script, see the below picture for an example. Let me know if you want me to go into more detail on this, or if you think you could take it from there. It wouldn’t be the exact implementation- as I think you could light-speed dash off of a single idle ring in that game, and it would only work for one direction, but it would create a very fast, highly controllable chain of movement that gets you something that looks a lot like the light-speed dash. It would then supply the next ring to the function, and if that was valid as well, it would also be lerped to. What you’d do next is have the ring either perform a process, or supply the variables needed for a process in Sonic that is needed for a very short-lived function that lerps Sonic from his position to the position of the ring (if it hasn’t already been collected). (It was B for SA2B on the Gamecube, if I recall correctly. The simplest solution I can think of off hand would be to have some sort of blueprint function tied to your rings that gets triggered when you do the input in front of a ring.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |