Quote: "For example, it would just stand around, but if the player attacks/shoots it or w/e, it will become hostile."
Keep in mind that all functions/scripts/etc. in programming are 100% "made up" by someone and you can make stuff up too.
You could make a variable called
EnemyState for example, and so while
EnemyState=0 the the enemy is calm, but if attacked the enemy goes into attack mode so you could then say
EnemyState=1 for attacking. If the enemy is killed, you could say that
EnemyState=2 means the enemy is dead and motionless.
As for making the character actually do the things that the variables call for, you will need to come up with your own AI system or get a plugin.