flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: AddEntityCollideCallback FAIL
(10-30-2011, 03:36 AM)Apjjm Wrote: (10-30-2011, 12:06 AM)flamez3 Wrote: You have decimals on the "AddPropForce" event, you would probably need to put an f on the end of each float.
e.g: AddPropForce("wine01_1", -8.738f, 0.945f, -8.775f, "world"); Whilst it isn't necessary, you are correct in stating and doing this, as it is good practice to add the "f" after the decimal numbers to state that they are "floats" rather than "doubles". I say this merely because otherwise, you may get warning messages mixed in any error messages when compiling your script. These appear in both the log files and the error message box if errors occur (otherwise they are just ignored), and if sufficient in number, waste time trying to scan through them to see the actual relevant info.
|
|
10-30-2011, 03:51 AM |
|
Victor
Member
Posts: 83
Threads: 19
Joined: Oct 2011
Reputation:
2
|
RE: AddEntityCollideCallback FAIL
(10-30-2011, 03:36 AM)Apjjm Wrote: (10-30-2011, 12:06 AM)flamez3 Wrote: You have decimals on the "AddPropForce" event, you would probably need to put an f on the end of each float.
e.g: AddPropForce("wine01_1", -8.738f, 0.945f, -8.775f, "world"); Whilst it isn't necessary, you are correct in stating and doing this, as it is good practice to add the "f" after the decimal numbers to state that they are "floats" rather than "doubles". I say this merely because otherwise, you may get warning messages mixed in any error messages when compiling your script. These appear in both the log files and the error message box if errors occur (otherwise they are just ignored), and if sufficient in number, waste time trying to scan through them to see the actual relevant info. Now the door and the message are working, but the bottle do not move!
|
|
10-30-2011, 02:13 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: AddEntityCollideCallback FAIL
(10-30-2011, 02:13 PM)Victor Wrote: (10-30-2011, 03:36 AM)Apjjm Wrote: (10-30-2011, 12:06 AM)flamez3 Wrote: You have decimals on the "AddPropForce" event, you would probably need to put an f on the end of each float.
e.g: AddPropForce("wine01_1", -8.738f, 0.945f, -8.775f, "world"); Whilst it isn't necessary, you are correct in stating and doing this, as it is good practice to add the "f" after the decimal numbers to state that they are "floats" rather than "doubles". I say this merely because otherwise, you may get warning messages mixed in any error messages when compiling your script. These appear in both the log files and the error message box if errors occur (otherwise they are just ignored), and if sufficient in number, waste time trying to scan through them to see the actual relevant info. Now the door and the message are working, but the bottle do not move! This could be because you are actually putting in the co-ordinates of the bottle from the editor, reset everything to zero, and adjust the X axis to like -70, and see if that moves it.
|
|
10-31-2011, 01:14 AM |
|
Laurensman
Junior Member
Posts: 21
Threads: 2
Joined: Oct 2011
Reputation:
0
|
RE: AddEntityCollideCallback FAIL
(10-30-2011, 03:13 AM)Victor Wrote: Yes, it is bottlescare. I'm sure!
I don't think it is "propimpulse", it is not like this in the tutorial.
In the tutorial it's "PropImpulse" allright. Okay, i have something similar with adding force to an object in my scripting. mine is a guy flying towards you. And the script looks like this, AddPropImpulse("corpse_male_1", -140, 0, 0, "world");
Umm idk why you have all those decimal numbers. Not sure, but mine works, With just -140, which im guessing is how much force to add. Flamez3 helped with mine. For the 0,0 part. Idk what that is. But thats what mine looks like.
|
|
11-01-2011, 11:37 PM |
|
|