Can I get a refill?

Kristin
2 min readDec 4, 2020

The focus today has been on finishing the code to my “refills”: the shields, health and ammo. For the shield, I had to change color depending on how many times the enemy collided with the player. My main hurdle was figuring out how to call a variable from outside it’s “home” script. It was reinforced that local variables are only called/used within a method, and also a local variable if it is named as a parameter in a method, can be attached to an outside variable, as long as the data type is compatible (i.e. int with int, float with float). Most importantly, today reinforced the value of using the tool tip in Visual Studio to call these things as quickly as possible. I learned this through trying to list my player script’s ammo count in a text box on my UI Manager script.

So far I have completed five out of the eight requirements of the 2D Phase I requirements: Thrusters, Shield Strength, Health Collectible, Ammo Collectible and Ammo limit. I had been working with my enemy lasers off today to be able to see if my code was working- I forgot to test the code with the enemy lasers set active….and found that they aren’t causing player damage anymore. I have to find out if this is declared properly or if something is overriding the script…will work on this tomorrow. This is a glimpse of these things so far:

Ammo Refill

Also, special Thank You of the Day🙂 goes out to Dan (late mention), Al, Ryan, Troy, Clyde and for helping me today- especially you guys that burn the midnight oil and still volunteer your help. I recognize that you don’t have to do that and I really really appreciate it🙏.

Stay well friends,

Kristin

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Kristin
Kristin

Written by Kristin

Astrologer turned Software Developer who is aiming for the stars to land on the moon. Kristin the Developer is the Celestial Sleuth.

No responses yet

Write a response