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
Make Entities Appear?
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#5
RE: Make Entities Appear?

Ok, this is becoming a mess now. I've just tried my original problem and it hasnt worked out well...

Im going to start from scratch kinda.




Hello, i was wondering why when i make these objects (Bodies and LightBodies) active on collision with this area(BodiesArea), it doesnt work.

Here is my code.
____________________________________________________________________

void OnStart()
{
AddEntityCollideCallback("Player", "BodiesArea", "BodiesAppear", true, 1);
}


void BodiesAppear(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Bodies", true);
SetEntityActive("LightBodies", true);
}
____________________________________________________________________
Im not sure weather it is a stupid mistake or just something that doesnt work together but there it is.

NOTE: The bodies are INACTIVE but when i collide with the area, they STAY INACTIVE and dont become ACTIVE.

Also, i was wondering if i could get the following code updated so that when you start the map, it is on 0% oil.
____________________________________________________________________



void OnStart()
{
AddEntityCollideCallback("Player", "DoorSlam", "CollideDoorSlam", true, 1);
AddEntityCollideCallback("Player", "DoorBang", "CollideDoorSound", true, 1);
}

void CollideDoorSlam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("Door001", true, true);
StartPlayerLookAt("Door001", 20.0f, 20.0f, "");
AddTimer("", 1.0f, "StopLook");
}
void StopLook(string &in asTimer)
{
StopPlayerLookAt();
}

void CollideDoorSound(string &in asParent, string &in asChild, int alState)

{
PlayMusic("19_event_brute.ogg", false, 0.8, 2, 0, true);
if(GetPlayerSanity() < 30) return;
GiveSanityDamage(30, true);
}
____________________________________________________________________


Much Appreciated

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 12-27-2011, 01:37 PM by Tripication.)
12-27-2011, 12:51 PM
Find


Messages In This Thread
Make Entities Appear? - by Tripication - 12-27-2011, 11:50 AM
RE: Make Entities Appear? - by Tanshaydar - 12-27-2011, 11:54 AM
RE: Make Entities Appear? - by Tripication - 12-27-2011, 12:36 PM
RE: Make Entities Appear? - by Unearthlybrutal - 12-27-2011, 12:47 PM
RE: Make Entities Appear? - by Tripication - 12-27-2011, 12:51 PM
RE: Make Entities Appear? - by Tripication - 12-28-2011, 04:34 AM
RE: Make Entities Appear? - by Tripication - 12-28-2011, 05:59 AM



Users browsing this thread: 1 Guest(s)