Day 24- Power Ranger

Day 24- Power Ranger

Quote of the Day: A lot of Pho jokes. You can guess the type. Most of them from Danh.

Music of the Day: Ghost.

Today I started working on making powerups modular, so that they could handle their own effects without having a massive script on the player that handled every single possible powerup. To give you an example of what I mean, this is how it was originally: poweruporiginal

And that’s only about 50 lines of the ~530 in that script. But after I modularized the health powerup, that specific powerup has a script that looks like this:

newpowerups

That’s the whole thing. Much cleaner, huh? health was the simplest of the bunch, the “meat” of the script if you will is just one line, a call to add health. You can see it towards the bottom there. I then started working on making the shield powerup modular in a similar way, however this one was much more complicated. Because each bot has a different-color shield, to match their color schemes, I had to make sure I was giving them the correct shield, along with making sure that the actual mechanics were functioning correctly (having a shield makes you invulnerable for a few seconds). I got the basics set up (the invulnerability mechanic), and then took a break for lunch. It happened to be Danh’s birthday, so we got Vietnamese from a local restaurant. I had some very delicious Pho (hence the aforementioned Pho jokes) Here it is:IMG_0568.JPG

We all sat in the conference room eating Vietnamese food and cupcakes, and watched more of the NCAA basketball tournament.

Then it was back to working on the shield powerup, and I got it very very close to working. gameplay-wise, it is completely functional. Triggers correctly, shield works as it should, every bot gets the correct shield and all of that stuff. There are however a couple of visual bugs: mainly that the powerup itself doesn’t disappear when you walk over it, only after the timer is up. If you remember way back to when i was creating teleporters on top of teleporters (day 10ish I want to say), this is a similar issue. Since the powerup tracks the timer for the shield, rather than the player who is shielded, I can’t get rid of the powerup until the timer is over, otherwise the player will just get a permanent shield. The soluion is to do some fancy finagling and basically copy the script onto the player when the powerup is triggered. unfortunately, the logic for that is super complicated and I didn’t have time to do it today. Instead I did the much simple but more forced “make it invisible” method, which is functional but causes problems since the object is still actually there, just not able to be seen. But that is something to look at on Monday, along with the super attack powerup. Until next time.

If you’ve made it this far, a happy Saint Patty’s day to ye Lad (or Lassy)!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s