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
Making a "vehicle" (EASY one, need help)
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
#4
RE: Making a "vehicle" (EASY one, need help)

You could try this, but I have no idea if it will work:

Make the bus model an entity with type: object and subtype: static (I might be wrong with these, but it should work this way)
It's done in the model editor; load your model, than click settings>user defined variables. Adding bodies to the model in this method would probably be useless, so just save it as an entity.

Now this is the most experimental part. Try attaching the entity to the player (via scripting) by using either
AttachPropToProp (you need 1.3 to use this) or
AddAttachedPropToProp (this one's supposedly broken so better try the first). You'll need to set the position where the bus connects to the player, which unfortunately means that player won't be able to move around the bus.

What I expect to happen is that the bus will now move with the player; Now you only need to disable player movement and such stuff, and then use something like
AddPlayerBodyForce to move the player around (you will have to experiment how to disable/reduce upwards and downwards motion which is present in walking animation. I think there was a tutorial for that somewhere, search for camera movement or intros)

The other funky part is if you want the bus to make a turn. I think you'd have to use AddPlayerBodyForce again, but this time have the force along either axis decrease as the force on the other axis increases. I'd do this by using a float variable and a timer/for function that increases the variable value.

This might work, but if it will it will still require plenty of experimentation.

(This post was last modified: 02-26-2016, 11:11 PM by Darkfire.)
02-26-2016, 11:09 PM
Find


Messages In This Thread
RE: Making a "vehicle" (EASY one, need help) - by Darkfire - 02-26-2016, 11:09 PM



Users browsing this thread: 1 Guest(s)