26.12.2012, 10:59
Quote:
Wow, when i did open the gate it just flew away, do you have any skype or something so we can communicate there?
|
The top-mode, where you can find all the "New" add this code:
Код:
new gate;
-Then, when you add an object to a mode (gate building) code should look like this:
Код:
CreateObject (980, 2441.199951, -1658.800048, 15.100000, 0.000000, 0.000000, 90.027465);
Код:
gate = CreateObject (980, 2441.199951, -1658.800048, 15.100000, 0.000000, 0.000000, 90.027465);
-The following is a little tougher. You need to create a command that will open the gates of ours. The command should look like this:
i
Код:
f (strcmp (cmdtext, "/ open", true)) { ****MoveObject (gates, 309.799987, -1554.099975, 37.799999, 0.8, 0, 0, 90.027465); ****SetTimer ("zkapija", 12000, 0); ****return 1; }
Код:
, 0, 0, 322);
Код:
gate = CreateObject (980, 2441.199951, -1658.800048, 15.100000, 0.000000, 0.000000, 90.027465);
Getting back to the explanation of the function of the command. MoveObject you function for moving objects. In her place the coordinates of the object you want to move the object.
Код:
(gates,
Код:
309.799987, -1554.099975, 37.799999
Код:
, 0.8
Код:
, 0, 0, 90.027465
Код:
SetTimer ("zkapija", 12000, 0);
-When we have made a command and calliback with which we close the gate. At the top of fashion, where you can find all this forward Forwards add:
Код:
zkapija forward;
Now add to the bottom of this mode calliback:
Код:
public zkapiju () { ****MoveObject (gate, 2441.199951, -1658.800048, 15.100000, 0.8, 0, 0, 90.027465); ****return 1; }
Код:
Gate = CreateObject (980, 2441.199951, -1658.800048, 15.100000, 0.000000, 0.000000, 90.027465);
And of course the last 3 numbers you need to place the same as in the CreateObject function that you can not rotate the object. And that's it [/ b]
And at the end of the story, I explained you how to make floating-gate closure but with a new function. At the end of the story was the thing in the last 3 numbers in that rotation functions CreateObject and MoveObject. From now on, it is easier to make a ramp that can be made with a single function but as you should before 2 coda that:
Код:
SetObjectPos (ID, 1218.4964599609, -923.35882568359, 42.84375); *********SetObjectRot (id, 0, 0, 12); / / coordinator of the open gate