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
Simple if -problem
Sazureth Offline
Junior Member

Posts: 20
Threads: 8
Joined: Jan 2012
Reputation: 0
#3
RE: Simple if -problem

void OnStart ()
{
    SetPlayerHealth(20.0f);
    GiveItemFromFile("tinderbox_", "tinderbox.ent");
    GiveItemFromFile("lantern", "lantern.ent");
    GiveItemFromFile("potion_oil_", "potion_oil.ent");
    SetPlayerLampOil(80.0f);
    //void AddPlayerLampOil(float afOil);
    //float GetPlayerLampOil();
    AddEntityCollideCallback("Player", "test1", "GiveHealth", true, 1);
}

void GiveHealth(string &in asParent, string &in asChild, int alState)
{
    if(alState == 1)
    {
        SetPlayerHealth(100.0f);
    }
}

//everything above is random testing

if (GetPlayerHealth() < 80.0f)
{
    FadeEnemyToSmoke("servant_grunt", true);
}
01-02-2012, 02:14 AM
Find


Messages In This Thread
Simple if -problem - by Sazureth - 01-02-2012, 01:28 AM
RE: Simple if -problem - by Linus Ågren - 01-02-2012, 01:40 AM
RE: Simple if -problem - by Sazureth - 01-02-2012, 02:14 AM
RE: Simple if -problem - by Linus Ågren - 01-02-2012, 02:19 AM
RE: Simple if -problem - by Sazureth - 01-02-2012, 02:22 AM
RE: Simple if -problem - by Linus Ågren - 01-02-2012, 02:27 AM
RE: Simple if -problem - by Sazureth - 01-02-2012, 02:33 AM



Users browsing this thread: 1 Guest(s)