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
Push up door smooth script
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#7
RE: Push up door smooth script

(05-29-2012, 10:47 AM)paththeir Wrote: This is because you're using integers, not floats. It will looks like:
void opening(string &in asParent, string &in asChild, int alState)
{
122 SetSwingDoorDisableAutoClose("castle", true);
123 SetSwingDoorClosed("castle", false, true); //Yes, you could add it
124 AddPropImpulse("castle", 0.0f, 0.0f, -20.0f, "world");
}
Actually, you should find that the script engine deals with it in the same way if you have used -20, -20.0 or -20.0f. Unless there is a limitation I am not yet aware of, I have always taken the simplest option of not defining the .0 decimal even with a float, and have not used the 'f' afterwards either, haven't come across any problems as a result. If someone knows better I would love to be corrected on that, to save future problems Tongue

If the wrong data type was being used the error message should be more like 'no matching signature to AddPropImpulse(string, float, float, int, string)'
05-29-2012, 01:33 PM
Find


Messages In This Thread
Push up door smooth script - by stevenbocco - 05-22-2012, 08:59 PM
RE: Push up door smooth script - by FragdaddyXXL - 05-22-2012, 09:48 PM
RE: Push up door smooth script - by stevenbocco - 05-22-2012, 10:42 PM
RE: Push up door smooth script - by stevenbocco - 05-23-2012, 12:14 PM
RE: Push up door smooth script - by FragdaddyXXL - 05-23-2012, 06:13 PM
RE: Push up door smooth script - by paththeir - 05-29-2012, 10:47 AM
RE: Push up door smooth script - by Adrianis - 05-29-2012, 01:33 PM



Users browsing this thread: 1 Guest(s)