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
SetSwingDoorClosed?
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#1
SetSwingDoorClosed?

Ok, this is giving me the shits, and i just cant think of what to do.
SetSwingDoorClosed wont work...

Im trying to make it so that the wind blows the door open blah blah blah.
Its probably just something really stupid and obvious but it just wont open, it twiches sometimes but shit doesn't work.




void OnStart()
{
AddEntityCollideCallback("Player", "WindArea", "WindScare", true, 1);
SetSwingDoorDisableAutoClose("WindDoor", true);
}

void WindScare(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("WindDoor", false, true);
CreateParticleSystemAtEntity("DustPushing", "ps_dust_paper_blow.ps", "Particle_Spawn", true);
}

Im thinking it must be in the lvl editor, because im not getting errors, ill try it on a different door...

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

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: SetSwingDoorClosed?

Use

AddPropForce("name_of_door", float afX, float afY, float afZ, "world");


The floats are kinda tricky. Click on your door; then move the door on the axis you want the door to open. Depending on your map, it will be a positive (e.g: 1) or a negative (e.g: -1) value. If it's a negative value; add a 3 or higher in the axis you checked before. and fill out the rest of the floats as a 0.


Hope that helps.

01-15-2012, 07:19 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#3
RE: SetSwingDoorClosed?

(01-15-2012, 07:19 AM)flamez3 Wrote: Use

AddPropForce("name_of_door", float afX, float afY, float afZ, "world");


The floats are kinda tricky. Click on your door; then move the door on the axis you want the door to open. Depending on your map, it will be a positive (e.g: 1) or a negative (e.g: -1) value. If it's a negative value; add a 3 or higher in the axis you checked before. and fill out the rest of the floats as a 0.


Hope that helps.
that didnt work either, i'll upload the map and script, and if someone could check it really quick, that would be excellent.

http://www.mediafire.com/?eci6g9xuzkao1yq

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
01-15-2012, 07:35 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: SetSwingDoorClosed?

Ok sorry, gave you the wrong script ^^

Replace what I gave you before with this:

AddPropImpulse("WindDoor", 0, 0, 1.2f, "world");


And you have to make the Open Amount 2.0 : D

01-15-2012, 08:14 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#5
RE: SetSwingDoorClosed?

(01-15-2012, 08:14 AM)flamez3 Wrote: Ok sorry, gave you the wrong script ^^

Replace what I gave you before with this:

AddPropImpulse("WindDoor", 0, 0, 1.2f, "world");


And you have to make the Open Amount 2.0 : D
Well 2.0 i thought was a bit wrong(and it is) but i tried 0.2 and it worked perfectly, thanks.

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
01-15-2012, 09:51 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#6
RE: SetSwingDoorClosed?

Dx I keep making typos -.-. Sorry.

(This post was last modified: 01-15-2012, 09:53 AM by flamez3.)
01-15-2012, 09:53 AM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#7
RE: SetSwingDoorClosed?

(01-15-2012, 09:53 AM)flamez3 Wrote: Dx I keep making typos -.-. Sorry.
haha, thats ok, i thought it might be a typo when the door was wedged in the wall gimping out. But thanks.

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
01-15-2012, 09:54 AM
Find




Users browsing this thread: 3 Guest(s)