Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Amnesia - The UNKNOWN Descent Project - NEW THREAD
zionifl Offline
Junior Member

Posts: 25
Threads: 10
Joined: Feb 2017
Reputation: 1
#6
RE: Amnesia - The UNKNOWN Descent Project - NEW THREAD

(04-24-2017, 07:38 PM)FlawlessHappiness Wrote: Piggybacking on that question.

Spoiler below!

You could easily track health by using the enemy's name as part of a LocalVarInt or LocalVarFloat.

Simply by writing
PHP Code: (Select All)
GetLocalVarInt(enemyName "_health"); 

For damage the easiest solution would be to create your own adjustment of damage, and damage checks.
You would also need to keep track of collisions with a certain weapon, such as a sword
PHP Code: (Select All)
void AdjustHealth(string enemyint amount)
{
    
AddLocalVarInt(enemy+"_health"amount);
    
CheckHealth(enemy)

PHP Code: (Select All)
int GetHealth(string enemy)
{
    return 
GetLocalVarInt(enemy+"_health");

PHP Code: (Select All)
void CheckHealth(string enemy)
{
    if(
GetHealth(enemy)) <= 0)
    {
       
//Make enemy dead
    
}

PHP Code: (Select All)
void DamageCollision(string &in asParentstring &in asChildint alState)
{
    if(
alState == 1)
    {
        
AdjustHealth(enemy, -25);
    }




Sorry about being off-topic

No problems about being off-topic, it is kinda helpfull. Maybe i will try to use it if i make an update to the project Smile
04-24-2017, 09:55 PM
Find


Messages In This Thread
RE: Amnesia - The UNKNOWN Descent Project - NEW THREAD - by zionifl - 04-24-2017, 09:55 PM



Users browsing this thread: 1 Guest(s)