Trials Evo Track Creator #2 - Breakdown of "Alsmiffy Vision"
Posted 26 August 2012 - 04:17 AM
Since I didn't want to bog the video down with how each of the triggers & events worked, I will do so here, with the aid of imagery!
The Right thumbstick (switching "Alsmiffy Vision" on and off)
So let's start off with how the game camera shifts colour, and the environment changes by pressing the right thumbstick:
Lets break this beast down, starting from the bottom, and working up.
You can place these yellow objects, they all do different things to change the game mechanics.
The first one represents the Right thumbstick. Basically in its properties there's lots of options, but I only want it to do something "on press".
You can see all the red and green lines, those represent a "signal" linking these objects together. When one triggers it sends a signal to the next linked one, and so on.
The one above the Right thumbstick event, is an "Impulse splitter" - i'll need this later to allow the button press to trigger lots of things, not just one thing.
Above that is a "Generic Filter" All it does is compare two numbers, if you look at the icon, it compares the number 0.00 to 19.00.
Basically it's a true or false statement, we'll get back to it, after explaining the objects above it.
Coming off the filter are two "Set number" objects, what they simply do is set a number displayed on it, to whatever it's linked to, in this case, they'll set the number of the yellow object above them, which is called a "Variable number" object. Or something like that...
The one right at the top is the important one, that number is linked directly to the camera, specifically to its "Post Processing" option.
If you own trials, to link the camera to it, go to the camera first, locate the post-processing option and press Y, then select variable number object.
So, how it all works: The player presses the right thumbstick, sends a signal to the splitter above it, that signal goes to the filter.
The filter then compares the number on the left (0.00) which is linked to the number at the very top, to the number "19.00".
If those numbers are not the same, it's false, and the signal goes right, if its true, it goes left. In this case, it's false, so the signal goes to the "Set 19.00" object, which changes the number at the very top to 19.
That's what the thumb press did, change the number at the top from 0 to 19. If you press it again, the signal goes left, and sets the number at the top back to 0. So it toggles between them both.
Why is the number 19 so important? Because the post processing effect on the camera has lots of different options, each one is numbered, from 0-25 or something. Number 19 is the red effect that I wanted, so by linking the top number to the post processing effects of the camera, when it hits 19, the camera shifts to that effect, when you press the right thumbstick again, it switches to 0, which is default.
Remember the impulse splitter? the one directly above the right thumbstick object. That also sends a signal out to the objects on the right, which do different things. The one at the very bottom is a "state" event, it basically enables or disables objects. When I press the right thumbstick, it toggles between on and off, and whatever it links to, turns it on or off.
The two above that look like the play symbol and audio waves, are exactly that. They are sound events. The one on the left basically says "play a sound!" and the one to the right is the actual sound it plays, which in this case is some eerie whispering voices. So when in Alsmiffy vision, it adds some odd ambient noises.
Further right are two "Variation" events. Remember the trees from the video? Lots of objects have different variations, and this event allows you to switch between them. I have two for each toggle, so Alsmiffy vision on and off. One switches the variation to the upright trees, the other turns the trees into the bent ones.
There's another event trigger off screen too, called the "Visibility" event, and that's the one linked to all the objects that are invisible and inactive, to physical and visible. Remember the bridge? The Cliffside at the end? All that fire and blood waterfalls, all of them are linked to that one event, which basically turns them on and off depending on the right thumbstick. You can see the see-through bridge below:
Basically, that see-through bridge isn't visible when you play the game, they appear when you press the thumbstick.
The reason for the image above, is for a different kind of event. As you cross the bridge, I wanted to give a speed boost to the player.
There's an "afterburner" effect, which basically adds a rocket to your bike and propels you for a duration you set. So to make it obvious that this thing is on the bridge, I added a target object. When you ride along the map, you'll see the target, but won't be able to reach it unless you switch to Alsmiffy Vision.
The target and the afterburner effect alone won't do anything, unless you set a trigger. To the left of the target you might see a tiny dotted yellow line, what this actually is, is a thin square.
I've place this, and linked it to a "Hidden" event, which is linked to the target. When the player rides through the trigger, the target will disappear, as if the player "picked up" the Power-up. That hidden event then triggers the Afterburner effect, making the player zoom along for 5 seconds (I set that time in the afterburner properties)
So too much of a good thing can be a bad thing. So far Alsmiffy vision makes the camera red, makes the trees wilt, adds fire, smoke, and a bridge to cross a small dip much faster.
I want the smiffy vision to be faster, but more hazardous, and the image above is a prototype of that. Right after the bridge, are some TNT boxes. They are transparent above, as they only enable in alsmiffy vision. The TNT blocks won't actually explode unless you make a trigger, just like the Afterburner effect. So I put down a rectangle trigger, covering all the blocks. That trigger links to a "Break" event, which is linked to all the explosives; Touch the rectangle and they all explode, killing the rider.
Basically, if you use Alsmiffy Vision to zoom across the bridge and pick up the Afterburner effect, you have to turn it off again just before you hit the TNT. Adds a bit of timing and risk to using Smiffy Vision. I also added a giant cliffside just after the TNT to make it impassable, so you literally have to turn off Alsmiffy Vision to finish the map. In the real map, I doubt i'll make such strict choices, but leave it up to the player to choose whether to risk taking the shortcuts, or take the easier but lengthier route.
Oh you thought that was it? Nope!
Attaching stuff to the Rider
Because you can't just "glue" stuff to the rider and be done with it. You have to set up something ridiculous, like the image above.
I wanted to add an Alsmiffy head to the rider when in alsmiffy vision, I'm not sure why. But here's how to do it:
I need to start from top to bottom this time, because, you know, that's the way I bodged it together. The very top is an impulse. All it does is send a signal every now and again, how fast it is depends on its properties. I set it to the fastest possible time, so whatever it effects will basically be real time. This will make whatever I set up, move.
Below it is the Object Position Event. This is linked to the green box I put on the riders head, and is what will keep it there. If I tested the track now, when the game starts, the green box would just fall to the floor. I need something to constantly update its position, to the exact position of the riders head.
Oh also, you need to remove all physics from the box, otherwise the box will destroy the rider. It's quite funny. Turn the physics to "decorative only", which makes the object have no physical properties, and stuff passes right through it.
So then, I need exact coordinates of the riders head. Skip the top three yellow boxes, and look at the middle row. Those are the X, Y and Z coordinates of the riders head. Those objects are called "Game source data", when linked with the riders head, it displays their coordinates. I could link those coordinates to the top "Object Position Event" and be done with it. It would actually work, but it would be directly on top of the head, and may not look right.
So I need to take the X Y and Z position of the riders head, and slightly offset the numbers to where I want the green box. So what I do is position the green box to where I really want it, then I make another 3 "Game source data" objects, to show the X Y and Z of that green box, you can see them floating far left in the image above.
If you compare those numbers of the green box, to the riders head (2nd row of the 9 objects), they are slightly different, to two decimal places.
I added 3 "Two Integer Operation" events above the Riders X Y and Z. What these do, is take the X Y and Z of the riders head, then add or subtract from it to get another number. I can then link that number to the "Object Position Event" above it, which is linked to the green box, and that will offset it.
Good right? Well not quite. Those events only alter whole numbers, not decimal places. If you look again at the X Y and Z of the green box and compare it to the riders head, they are only slightly different, to two decimal places. Here's the workaround to make that happen:
Copy and paste the "two integer operation" events, I put them below the XYZ of the rider. Change the operation from Add/Subtract to Divide, and set the divide number to 100. This will divide whatever number comes into it by 100, so it will make a number to two decimal places. I then link that back to the top operations, and they can now be changed to the exact coordinates I need. All you need to do is alter the bottom 3 object numbers, and that'll affect the top ones.
So all in all: I took the XYZ of the riders head, and the XYZ of the green box on the riders head. I then had to work out the difference between the coordinates, and link the result to the "Object Position Event", which will constantly move the green box to be in the right position on the riders head.
All of that... for a bloody green box on the rider. Surprisingly, getting my head around it all was quite fun, and if you got this far, well done!
Let me know if these giant novels are of any use to you, i'll keep breaking down the complex stuff in future episodes like this if you want more Trials Evo help. Good day!
- Eternitee likes this
Thank you Pyrowman for the awesome sig <3
Posted 28 August 2012 - 08:10 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users