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
problem with scare script
zergling50 Offline
Member

Posts: 74
Threads: 9
Joined: Jul 2012
Reputation: 1
#21
RE: problem with scare script

(04-08-2013, 09:00 AM)junkfood2121 Wrote:
(04-08-2013, 02:20 AM)JustAnotherPlayer Wrote: You're not adding enough force! You need the force to be above 2000 to see the effects.
AddPropImpulse("mansion_6", 30000, 0, 0, "world");
And you need another perimeter!
AddPropForce("mansion_6", 30000, 0, 0, "world");

And remember, it depends whether you are in the Z or the X Axis!

Is that really true when it comes to AddPropImpulse?
I never use values above 20.0f and that is strong enough to make the door get thrown up very powerfully.

first off, I dont know what you meant by I need another paramater. Also, I don't believe 30000 is necessary because I can fling a door open with impulse using 20. It's just this door wont work for some reason.

(04-08-2013, 02:05 AM)noovra Wrote:
(04-07-2013, 09:42 PM)zergling50 Wrote: So I just went through again and managed to finally discover why it was still crashing, it was a problem with a completely different method, the fix you guys showed me with the entity sound thing worked. Only problem is the door is not flying open. Every part works except that. I set up two script areas next to the door so that I could in the game test what different impulses would do to the door and see if I could get it to work, but it wont work. You can see the door get shoved and hear an impact but its like its hooked up to a really strong rubber band because it only budges an extremely little bit and then shuts right back closed. I have tried extremely high values (in the 600's) and small values (in the 10's) but they all have the same effect. The door simply wont move. Does anyone have any idea whats going on?

In my view, it looks like, that the coordinates are wrong. Did you ever tried to change them?
Instead of:
AddPropImpulse("mansion_6", 20, 0, 0, "world"); ->
AddPropImpulse("mansion_6", 0.0f, 500.0f, 0.0f, "world");
or maybe try to place a " - " for the number of impulse...

I have another bit of code that uses it the exact same way
CODE: AddPropImpulse("mansion_3", 0, 0, -50, "world");
This works just fine. For some reason it wont work on this particular door though. Ive tried all three coordinates in both the negatives and positives. None worked.
(This post was last modified: 04-10-2013, 11:49 PM by zergling50.)
04-10-2013, 11:46 PM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#22
RE: problem with scare script

Make sure that the door isn't clipping inside the door frame at all. Also, which door and doorframe are you using?

In Ruins [WIP]
04-11-2013, 12:36 AM
Find
zergling50 Offline
Member

Posts: 74
Threads: 9
Joined: Jul 2012
Reputation: 1
#23
RE: problem with scare script

(04-11-2013, 12:36 AM)NaxEla Wrote: Make sure that the door isn't clipping inside the door frame at all. Also, which door and doorframe are you using?

Sorry, I have had to put this project on the backburner for a while and am getting back into it. I am using the mansion door and wall door frame set

By the way, I took the door out of the door frame and tried seeing if it would move out of it. It does the same exact thing even out of the frame. I don't know if its a glitch with that door or what as other doors with similar actions in the map work fine. it looks as if its pushing against something when the force is applies and is shoved back in place.

UPDATE: I have even tried deleting this door and adding a new one, removing the door frame, and reducing and increasing the force. None of this is working. Should I try something besides propImpulse?
EDIT: I realized that in the other cases where the door is slammed shut or open the player had already interacted with the door and thus it was slightly ajar. In this case im trying to fling open a closed door (not locked, just closed) and for some reason this causes complications. If I walk up to the door and move it slightly ajar and then activate the script it works fine, but once the door is closed and I activate it again it wont open. (I made two testing trigger areas. One swings the door open and one swings it closed. This way I can watch its effects multiple times in one playthrough.)
(This post was last modified: 06-11-2013, 08:51 PM by zergling50.)
06-11-2013, 08:22 PM
Find
GrAVit Offline
Senior Member

Posts: 580
Threads: 15
Joined: Oct 2011
Reputation: 22
#24
RE: problem with scare script

I suppose you could go to the door's settings in the level editor and set the OpenAmount to a very small value. That way the door would be technically open but visibly hardly noticeable.

Or you could make it visibly ajar. Whatever you want.

Also, if you choose to do so, be sure to use this:
SetSwingDoorDisableAutoClose("mansion_6", true);

That way it wont automatically close itself when it's only open by a small amount.
You need to add it outside the function though.

(This post was last modified: 06-12-2013, 08:19 AM by GrAVit.)
06-12-2013, 08:16 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#25
Bug  RE: problem with scare script

This happened to me once.
I had to do the following:

PHP Code: (Select All)
void LazyDoorOpen () { 
DisableAutoClose false
SwingDoorClosed false
,false
Addtimer 0.1 
"LazyDoorImpulse" 
Addtimer 0.3 "LazyDoorImpulse"  }

void LazyDoorImpulse ()
PropImpulse 3 


In my experience, i remember i put 5 floating doors.
The only door that opened is the one with that code, in that order.
First disable, then swingclosed, then the two impulses with a little delay between.

06-12-2013, 12:19 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#26
RE: problem with scare script

(06-12-2013, 12:19 PM)Amn Wrote: This happened to me once.
I had to do the following:

PHP Code: (Select All)
void LazyDoorOpen () { 
DisableAutoClose false
SwingDoorClosed false
,false
Addtimer 0.1 
"LazyDoorImpulse" 
Addtimer 0.3 "LazyDoorImpulse"  }

void LazyDoorImpulse ()
PropImpulse 3 


In my experience, i remember i put 5 floating doors.
The only door that opened is the one with that code, in that order.
First disable, then swingclosed, then the two impulses with a little delay between.

You know that guy would just copy-paste that right? And then he says it got an error.

"Veni, vidi, vici."
"I came, I saw, I conquered."
06-12-2013, 02:48 PM
Find
zergling50 Offline
Member

Posts: 74
Threads: 9
Joined: Jul 2012
Reputation: 1
#27
RE: problem with scare script

(06-12-2013, 02:48 PM)JustAnotherPlayer Wrote:
(06-12-2013, 12:19 PM)Amn Wrote: This happened to me once.
I had to do the following:

PHP Code: (Select All)
void LazyDoorOpen () { 
DisableAutoClose false
SwingDoorClosed false
,false
Addtimer 0.1 
"LazyDoorImpulse" 
Addtimer 0.3 "LazyDoorImpulse"  }

void LazyDoorImpulse ()
PropImpulse 3 


In my experience, i remember i put 5 floating doors.
The only door that opened is the one with that code, in that order.
First disable, then swingclosed, then the two impulses with a little delay between.

You know that guy would just copy-paste that right? And then he says it got an error.

Actually, I didn't lol. I know the basics of coding. But I decided to go with the slightly ajar door suggestion and it worked great.

(06-12-2013, 08:16 AM)GrAVit Wrote: I suppose you could go to the door's settings in the level editor and set the OpenAmount to a very small value. That way the door would be technically open but visibly hardly noticeable.

Or you could make it visibly ajar. Whatever you want.

Also, if you choose to do so, be sure to use this:
SetSwingDoorDisableAutoClose("mansion_6", true);

That way it wont automatically close itself when it's only open by a small amount.
You need to add it outside the function though.

I tried this out and it worked great. thanks Smile
(This post was last modified: 06-13-2013, 08:14 PM by zergling50.)
06-13-2013, 08:13 PM
Find




Users browsing this thread: 3 Guest(s)