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!
DaPurpleHippo Offline
Junior Member

Posts: 9
Threads: 2
Joined: Aug 2014
Reputation: 0
#4
RE: Making it so Slime Damage can Kill, need help!

Thanks for explaining the script Rom. And Captain is right, I want it so that when the player is in the area, they take damage. Think of it as a simple Slime Area, but it can actually kill. I did some experimentation and came up with this code that does not crash the map:
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.0f, "blood", false, true);
}
}
}

but it also does not work :/ if you enter the area where you should be taking damage, nothing happens at all. The issue may be related to the map editor as well, but I'm not sure :/


EDIT: I'm adding a screenshot of the room in the editor mode so the situation is clearer.

Spoiler below!
In the upper right corner is the section where the poison is supposed to be. The player pulls the right lever on the left side and the door will open for a short time. If the rest of the puzzle is not completed by the time the door closes, the player is trapped. That is where the poison comes in and will kill the player. The respawn point is at the entrance to the room.
[Image: ihyZB76.png]
(This post was last modified: 08-15-2014, 09:11 AM by DaPurpleHippo.)
08-15-2014, 08:59 AM
Find


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



Users browsing this thread: 1 Guest(s)