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
why wont this work :<
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#1
why wont this work :<

PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("Player""area1""func_slam"true1);
}

void func_slam(string &in asParentstring &in asChildint alState)
{
SetPropHealth("door1"0.0f);
PlaySoundAtEntity("""react_breath_slow.snt""Player"0false);
PlaySoundAtEntity("""react_scare""Player"0false);


i want that the player enters an area wich makes the door explode (not interacting with any entetie)
(This post was last modified: 01-10-2012, 11:14 AM by Quotentote.)
01-10-2012, 10:05 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: why wont this work :<

Is it giving you an error?

01-10-2012, 10:16 AM
Find
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#3
RE: why wont this work :<

no^^ i can hear the sound files but the door doesnt explode
(01-10-2012, 10:16 AM)flamez3 Wrote: Is it giving you an error?

01-10-2012, 10:22 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: why wont this work :<

What door is this?

01-10-2012, 10:27 AM
Find
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#5
RE: why wont this work :<

a prison section (im on that part you already know^^)
the grunt cant smash the door so i created an area that gets activated after the first script. i want the player to get chased after entering the second script area so that he has a little chance

if its not 'smashable' could i do something like unlocking the door with that script?
(This post was last modified: 01-10-2012, 10:31 AM by Quotentote.)
01-10-2012, 10:30 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#6
RE: why wont this work :<

I'm not sure if that door can be broken. If the sounds are playing it means that the function is being called; but the door isn't been destroyed. Yeh; sounds like it can't be broken. :/ I guess you would just have to make the door open instead of it breaking apart.

(This post was last modified: 01-10-2012, 10:32 AM by flamez3.)
01-10-2012, 10:32 AM
Find
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#7
RE: why wont this work :<

PHP Code: (Select All)
    SetSwingDoorLocked("door1"falsetrue); 

?

PHP Code: (Select All)
void func_slam(string &in asParentstring &in asChildint alState)
{
SetSwingDoorLocked("door1"falsetrue);
PlaySoundAtEntity("""react_breath_slow.snt""Player"0false);
PlaySoundAtEntity("""react_scare""Player"0false);


tried this but it didnt work T_T
(This post was last modified: 01-10-2012, 10:40 AM by Quotentote.)
01-10-2012, 10:33 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#8
RE: why wont this work :<

(01-10-2012, 10:33 AM)Quotentote Wrote:
PHP Code: (Select All)
    SetSwingDoorLocked("door1"falsetrue); 

?

PHP Code: (Select All)
void func_slam(string &in asParentstring &in asChildint alState)
{
SetSwingDoorLocked("door1"falsetrue);
PlaySoundAtEntity("""react_breath_slow.snt""Player"0false);
PlaySoundAtEntity("""react_scare""Player"0false);


tried this but it didnt work T_T
That only unlocks the door, doesn't make it swing open.

AddPropImpulse("door1", float afX, float afY, float afZ, "world");
The floats are X, Y and Z. Look into the map and check what axis the door moves on to open. Then add like a 2 or 4 on that float, leave all the others to 0.

Or you could just

SetEntityActive("door1", false);
SetEntityActive("door2", true);

Click on the door1 and hit Ctrl + D and make door2 unactive, also make the OpenAmount to 1.


(This post was last modified: 01-10-2012, 10:55 AM by flamez3.)
01-10-2012, 10:55 AM
Find
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#9
RE: why wont this work :<

okay thanks im going to use the active/inactive thing cause im not pretty goot in these propimpulse things...a few more tips and i have to write 'made by flamez3' o.o Big Grin
01-10-2012, 11:07 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#10
RE: why wont this work :<

Hahaha ^^

01-10-2012, 11:27 AM
Find




Users browsing this thread: 2 Guest(s)