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
[solved] LanternLit function only inside a room?
Dobbydoo Offline
Member

Posts: 50
Threads: 6
Joined: Aug 2011
Reputation: 0
#3
RE: [need help] LanternLit function only inside a room?

I get it working when I enter the room, but not when I'm actually inside the room. By that I mean that I can walk into the area with my lantern lit, and explode, but if I go inside the area with my lantern unlit and light it inside the room, nothing happens.
Here's my script.
void OnStart()

{
AddEntityCollideCallback("Player", "PoisonArea_1", "cbExplodeAreaPlayerCollision", false, 1);
SetLanternLitCallback("LanternLit");
}

//Explosion Death

void LanternLit(bool abLit)
{
   if(GetEntitiesCollide("PoisonArea_1","Player") && abLit) Explosion();
}

void cbExplodeAreaPlayerCollision(string &in asParent, string &in asChild, int alState)
{
  if(GetLanternActive()) Explosion();
}

void Explosion()
{
//StartScreenShake(1, 5, 0, 13);
AddPlayerBodyForce(0, 0, -50000, true);
//SetPlayerActive(false);
SetPlayerCrouching(true);
GivePlayerDamage(90000000000000000000000000.0f, "BloodSplat", true, true);
PlaySoundAtEntity("explosion", "explosion_rock_large.snt", "Player", 5, true);
PlaySoundAtEntity("explosion", "explosion_rock_large.snt", "Player", 5, true);
PlaySoundAtEntity("explosion", "explosion_rock_large.snt", "Player", 5, true);
FadeRadialBlurTo(1, 1);
StartEffectFlash(0, 1, 1);
}

And where should I post when I need help? I've gotten my posts moved twice, but I don't know where they where moved to... And also, thanks for helping me Smile
11-25-2011, 09:25 PM
Find


Messages In This Thread
RE: [need help] LanternLit function only inside a room? - by Dobbydoo - 11-25-2011, 09:25 PM



Users browsing this thread: 1 Guest(s)