kartanonperuna
Posting Freak
Posts: 755
Threads: 44
Joined: Oct 2011
Reputation:
8
|
How do I spawn a corpse in a closet when i open the door?
What kind of script?
|
|
01-11-2012, 06:06 PM |
|
Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
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);
|
|
01-11-2012, 06:42 PM |
|
kartanonperuna
Posting Freak
Posts: 755
Threads: 44
Joined: Oct 2011
Reputation:
8
|
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 |
|
Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
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.
|
|
01-11-2012, 08:42 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
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 |
|
Tripication
Member
Posts: 172
Threads: 19
Joined: Dec 2011
Reputation:
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.
(This post was last modified: 01-12-2012, 03:17 AM by Tripication.)
|
|
01-12-2012, 03:07 AM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
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 |
|
Tripication
Member
Posts: 172
Threads: 19
Joined: Dec 2011
Reputation:
6
|
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.
(This post was last modified: 01-12-2012, 04:28 AM by Tripication.)
|
|
01-12-2012, 04:09 AM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
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 |
|
Tripication
Member
Posts: 172
Threads: 19
Joined: Dec 2011
Reputation:
6
|
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
(This post was last modified: 01-12-2012, 05:14 AM by Tripication.)
|
|
01-12-2012, 04:49 AM |
|
|