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
Script Help Making it so Slime Damage can Kill, need help!
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#3
RE: Making it so Slime Damage can Kill, need help!

I'm guessing that what you want is that when you enter the script area you'll take damage periodically yes?

Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "checkpoint_00", "Restart", true, 1);
AddEntityCollideCallback("Player", "damage_zone01", "GivePlayerDamage", true, 1);
}

void Restart(string &in asParent, string &in asChild, int alState)
{
CheckPoint("FirstCheckpoint", "respawn_001", "Happening", "DeathCategory", "Deathtext");
}

void Happening(string &in asName, int alCount)
{
//
}

void move_top_down(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("top_door", 1.0f);
for (int x; x == 4; x++)
{
GivePlayerDamage("25", "", 0.02, true);
}
}


The script in the spoiler box is made so that the Player's health is taken by 25hu (25 health units) 4 times. 4 times 25 is 100 so the Player dies.

NOTE: I ASSUMED THAT YOU'LL TAKE DAMAGE IF alState IS 1. TELL ME IF THIS IS INCORRECT.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 08-15-2014, 08:38 AM by PutraenusAlivius.)
08-15-2014, 08:36 AM
Find


Messages In This Thread
RE: Making it so Slime Damage can Kill, need help! - by PutraenusAlivius - 08-15-2014, 08:36 AM



Users browsing this thread: 1 Guest(s)