Frictional Games Forum (read-only)

Full Version: How do I spawn a corpse in a closet when i open the door?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
What kind of script?
place it there already, make it unactive and then use script:

SetEntityActive("name", true);
Yeah i tried it but it didnt work.
It has to. Make sure that you dont have static corpse, it has to be entity.
Make the closet bigger, the grunt will just fly out f you don't
1, use a collision callback(Script Area)

even some entities will not work, but i just tested it then. If you goto Entities>Organic>Corpse_male It will work.

make sure you have this

void OnStart()
{
AddEntityCollideCallback("Player", "[AREANAME]", "SpawnBody", true, 1);
}

void SpawnBody(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("corpse_male_1", true);
}

________________________________________________
I can make a quick video if you want, i have alot of free time on my hands.
(01-12-2012, 03:07 AM)Tripication Wrote: [ -> ]1, use a collision callback(Script Area)

even some entities will not work, but i just tested it then. If you goto Entities>Organic>Corpse_male It will work.


Mainly entities that can be picked up don't usually work with SetEntityActive, same as tables and couches ect.
(01-12-2012, 03:46 AM)flamez3 Wrote: [ -> ]
(01-12-2012, 03:07 AM)Tripication Wrote: [ -> ]1, use a collision callback(Script Area)

even some entities will not work, but i just tested it then. If you goto Entities>Organic>Corpse_male It will work.


Mainly entities that can be picked up don't usually work with SetEntityActive, same as tables and couches ect.



Ok, well i've made a tutorial, i will cut it and upload it soon enoug, will be back to post link
____________________________________________________
Ehh, i'll have to do it again, was gonna take too long to render.

Actually, I just noticed he said he wanted to have it when he opens the door himself.


Quote:void OnStart()
{
SetEntityPlayerInteractCallback("name_of_closet", "Spawn_Monster", true);
}

void Spawn_Monster(string &in asEntity)
{
SetEntityActive("Name_of_corpse", true);
}
(01-12-2012, 04:46 AM)flamez3 Wrote: [ -> ]Actually, I just noticed he said he wanted to have it when he opens the door himself.


Quote:void OnStart()
{
SetEntityPlayerInteractCallback("name_of_closet", "Spawn_Monster", true);
}

void Spawn_Monster(string &in asEntity)
{
SetEntityActive("Name_of_corpse", true);
}
Not sure where ur getting the monster idea from...
_____________________________________________________
Ok, im uploading a really quick tutorial now, be dont in 10-15 minutes
http://www.youtube.com/watch?v=Qf9lELUpB...e=youtu.be
Pages: 1 2