SHOW:
|
|
- or go back to the newest paste.
1 | //ACF SETUP | |
2 | @name ACF Setup | |
3 | @inputs W | |
4 | @outputs Throttle Constant Damping | |
5 | ||
6 | Throttle = W * 100 | |
7 | Constant = 50000 | |
8 | Damping = 500 | |
9 | ||
10 | //STEERING SETANG | |
11 | @name Setang steering | |
12 | @inputs A D CHASSIS:entity | |
13 | @persist SLAVE:entity [TURN_RATE TURN_ANGLE TURN] B C | |
14 | @model models/sprops/rectangles/size_2_5/rect_18x18x3.mdl | |
15 | ||
16 | if (dupefinished()) {reset()} | |
17 | ||
18 | B = round(toUnit("km/h",CHASSIS:vel():length())) | |
19 | ||
20 | ||
21 | if(B >= 20) { | |
22 | TURN_ANGLE = 25 | |
23 | } | |
24 | else | |
25 | { | |
26 | TURN_ANGLE = 45 | |
27 | } | |
28 | ||
29 | if (first()) { | |
30 | interval(20) | |
31 | ||
32 | TURN_RATE = 5 | |
33 | ||
34 | ||
35 | SLAVE = entity() | |
36 | } elseif (clk()) { | |
37 | interval(20) | |
38 | ||
39 | if (!SLAVE:isPlayerHolding()) { | |
40 | TURN += clamp((A-D)*TURN_ANGLE - TURN, -TURN_RATE, TURN_RATE) | |
41 | SLAVE:setAng( CHASSIS:toWorld(ang(0, TURN, 0)) ) | |
42 | SLAVE:propFreeze(1) | |
43 | } | |
44 | } | |
45 | ||
46 | //BALL-SOCKET ADV. VALUES | |
47 | //Force Limit: = 0 | |
48 | //Torque Limit = 0 | |
49 | //X Minimum = -180 | |
50 | //X Maximum = 180 | |
51 | //Y Minimum = -0.1 | |
52 | //Y Maximum = 0.1 | |
53 | //Z Minimum = -0.1 | |
54 | //Z Maximum = 0.1 | |
55 | //X Friction = 0.00 | |
56 | //Y Friction = 0.00 | |
57 | //Z Friction = 0.00 | |
58 | //✔ Freemovement | |
59 | //✘ or ✔ No-Collide Entities |