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
How do I spawn a corpse in a closet when i open the door?
kartanonperuna Offline
Posting Freak

Posts: 755
Threads: 44
Joined: Oct 2011
Reputation: 8
#1
How do I spawn a corpse in a closet when i open the door?

What kind of script?
01-11-2012, 06:06 PM
Website Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#2
RE: How do I spawn a corpse in a closet when i open the door?

place it there already, make it unactive and then use script:

SetEntityActive("name", true);

The Interrogation
Chapter 1

My tutorials
01-11-2012, 06:42 PM
Find
kartanonperuna Offline
Posting Freak

Posts: 755
Threads: 44
Joined: Oct 2011
Reputation: 8
#3
RE: How do I spawn a corpse in a closet when i open the door?

Yeah i tried it but it didnt work.
01-11-2012, 06:58 PM
Website Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#4
RE: How do I spawn a corpse in a closet when i open the door?

It has to. Make sure that you dont have static corpse, it has to be entity.

The Interrogation
Chapter 1

My tutorials
01-11-2012, 08:42 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#5
RE: How do I spawn a corpse in a closet when i open the door?

Make the closet bigger, the grunt will just fly out f you don't

01-12-2012, 02:00 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#6
RE: How do I spawn a corpse in a closet when i open the door?

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.

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 01-12-2012, 03:17 AM by Tripication.)
01-12-2012, 03:07 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#7
RE: How do I spawn a corpse in a closet when i open the door?

(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
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#8
RE: How do I spawn a corpse in a closet when i open the door?

(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.

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 01-12-2012, 04:28 AM by Tripication.)
01-12-2012, 04:09 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#9
RE: How do I spawn a corpse in a closet when i open the door?


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
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#10
RE: How do I spawn a corpse in a closet when i open the door?

(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

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 01-12-2012, 05:14 AM by Tripication.)
01-12-2012, 04:49 AM
Find




Users browsing this thread: 2 Guest(s)