Frictional Games Forum (read-only)

Full Version: SetSwingDoorClosed?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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...
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)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
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)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.
Dx I keep making typos -.-. Sorry.
(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.