English Physics sample stats (and more)?

5 replies
Goto Page
To the start Previous 1 Next To the start
Up
Goo
User
Offline Off
Hey! I'm working on a big project and I want it to use the physics engine! Below are all my current questions!


Is there a way to do the following?
:1: Prevent specific players from using a vehicle
:2: Check if a player is driving a vehicle
:3: Completely destroy (remove) a vehicle
:4: Teleport a vehicle
:5: Check if somewhere is a valid position for a car (avoid crashing)
:6: Add sound to a vehicle
:7: Animate parts of the vehicle (such as rotating)

Thanks!
edited 1×, last 13.05.19 03:27:53 pm
16.05.19 09:22:41 am
Up
Jaller94
User
Offline Off
Vehicles are not part of vanilla (=unmodified) CS2D. Which lua script are you referring to for vehicles?
Please provide a link to the CS2D Downloads Archive, if you got it from there.
16.05.19 01:36:22 pm
Up
Goo
User
Offline Off
They are part of the game, it's one of the samples which uses the physics.lua and physics engine. (physics_cars.lua)
16.05.19 04:19:32 pm
Up
user Jaller94 has written:
Vehicles are not part of vanilla (=unmodified) CS2D. Which lua script are you referring to for vehicles?
Please provide a link to the CS2D Downloads Archive, if you got it from there.


IMG:https://i.imgur.com/Fr0DcDp.png


lol
Lastest upload : file cs2d fix the collecting (0)
16.05.19 05:44:14 pm
Up
Goo
User
Offline Off
That command isn't on http://cs2d.com/help.php?cat=all

Also trying to
print(type(inPhysicsObject))
returns
nil
.
Same goes for
raycast
, whatever that's used for...
17.05.19 03:26:51 am
Up
SQ
Moderator
Offline Off
Don't have much time to explain how it works, but those particular functions probably are not included in the build.
These are server-sided utilities, so can be included with any patch.
There ain't many helping code regarding physics yet, obviously because there wasn't much need so far.
I'll take a look later how I can resolve some issues related to this.
To the start Previous 1 Next To the start