In the sixth and final week of our casework, we were to make an enemy that would follow our character wherever he goes. The pirate is supposed to fight different versions of policemen. The first policeman the pirate is supposed to meet, is a nicely dressed fbi looking guy. So I had to make a completely new animation, which now turned out to be a whole lot easier than the first animations I made. This time, e drew a quick sketch first, then I drew the first frame with pen tool. I cut the arms and legs in two and made the body and the head separate symbols as well. Then, with a bit of free transform and copy and paste, i needed only draw that one frame with pen tool. Why did I not think of this before? Anyway, the time sucking part was of course the scripting part. The enemy starts in the top of the stage, the wall the furthest away from the "camera" . As he moves, his y-value decreases along with an increasing of size. There are three rows of desks in the first background, which makes two paths for the enemy to walk in. If the enemy hittests against a invisible box that is where the horizontal paths, which there also is two of, and the pirate is on the opposite side from the pirate, the enemy with the nice suit will change his path. This is per definition to follow the pirate. Or at least I hope so. Or else I'm pretty much fucked. Then if the evil FBI police enemy reaches the bottom, a big go sign with a sign blinks to the left, not unlike this:
<=go!
If you follow it and go as far as you can to the left of the screen, the pirate turns around and faces a whole other wall, the cozy place of the office where everything is made to look like it's a jungle.
fredag 26. november 2010
torsdag 25. november 2010
Case 5, Hills and Pistols and somthing called sprite
This week I will not only make a hill for my pirate to walk up and down, I will not only make a hill for my pirate to walk up and down AND a pistol that he can pick up if he feels like it, I will also make a sprite. After confusing moments with lots of stupid questions, I have now figured out what a sprite is. A sprite is a movieclip in flash that contains other movieclips, sort of like a car with people in it. You have to open the door in case to get the people inside and you have to know which door to open in order to get the right person from the car. You do not, as an example, want to drag the driver out of the car on a highway in the middle of a turn while the man in the passengerseat is paralyzed from the waist and up and will not be able to grab hold of the wheel. To be honest I just made that up, but I must admit it sounds kind of reasonable. If I am wrong, the clock IS 07.12 AM in the time of writing. And not in the morning, in the night. Anyways, I put my 5 character animations in the same movieclip, and found myself using a great deal of time understanding how to get these people out from the car. In no way do I find this efficient, but I believe it is absolutely necesseray to maintain a little pit of structure in the script. I have, by the way, not yet been very structured in my use of scripts, but this is something that later will be applied when my understandig for the script increases. The pistol i so carefully has drawn to make it look lik a magnum now dissapears when I touch it. The pirates anchorpoint hittests against its filling. If it hits, then the pistol removechilds. Easy peasy. When someone sits next to you and tells you how to do it. And as for the levitation in the terrain, I also used a hittest. Every time it hits, the pirate's y-value raises by one. I also added som gravity, since it can't really hittest against a little mountain, when he is on top of it and he is walking down. So I solved this case in a most satisfying way for my own sake. Not a whole lot of expectations to my programming skills yet but it will only get better in time.
Case 4, Scripts and shit
We shall now make our interactive experience interactive. I will during this week make my pirate walk, both to the left, AND to the right. And also will he not go awat from the stage even if you try to. I've been present at all the lectures concerning this matter, still I fail to understand anything of how I'm going to make such a event happen. Luckily, our teacher has uploaded a recipe for this for us to use as guidance. Rather than use it for guidance, I ended up with it. I have absolutely no supposition to do anything other than following it to the letter. So i changed a bit of words here and there, made no other modifications whatsoever, and than I was finished. Good job Sondre!
Abonner på:
Kommentarer (Atom)