Jump to content

Pi-Scripts


Rick
 Share

Recommended Posts

File Name: Pi-Scripts

File Submitter: Rick

File Submitted: 13 Dec 2011

File Category: Scripts

 

Consolidated my Pi scripts into 1 zip file. Going to be adding some more functionality in the future and wanted to just have them all together.

 

===============================================================

 

Pi-Main

 

Description

This is the main script that works with all my other Pi Thingoids. Place this in \Scripts\Games and then point your editor to this script via Tools->Options->Paths->GameScript setting.

 

This is a very simplistic main loop game file. I designed it this way to allow the Thingoids to do the main work of the game and not have custom game code in the main lua file. Ideally, when the Pi library of Thingoids is complete, you would only need to use this main game lua file for all your games that you make in lua.

 

===============================================================

 

Pi-CharacterKeyboardControls

 

 

Description

This allows you to send movement messages to the Pi-Character thingoid. The settings allow you to configure what keys are used for what movement. It's still very early and not everything is available yet. Just want to get these things out there for people to play around with and maybe give advise/help.

 

===============================================================

 

Pi-Character v 0.1

 

 

Description

Very early version of my character objects. Place it in your scene and go to the settings and give it a model. It creates a character controller and receives some messages to help it move. This works in conjunction with Pi-CharacterKeyboardControls.

 

===============================================================

 

Pi-3rdPersonCamera v 0.1

 

 

Description

Here is a very basic 3rd person camera thingoid. Just drag it into your scene and give it a target

 

===============================================================

 

Pi-MoveTo

 

 

Description

This will move a body with SetPosition() as long as the Thingoid you are moving has a object:GetBody() method. Works well with Pi-Body.

 

Target 0 is the body to move.

All the other targets should be Pi-Pivot (1-6) is the points to move between. In the code you can change between Reverse or Loop. This determines what will happen when it reaches the last Pi-Pivot. This will be a setting in the next version.

 

===============================================================

 

Pi-FixedJoint v0.1

 

 

Description

This creates a FixedJoint between 2 bodies. You can use this with your custom Thingoid that creates a body as long as your Thingoid defines a function named object:GetBody() and returns a body.

 

The link 0 is the parent and link 1 is the child. The fixed joint is created as soon as you define both parent and child.

 

===============================================================

 

Pi-Body v0.1

 

 

Description

This is much like Pi-Cube. It allows you to create a dynamically sized physics body. When in editor mode a white cube mesh is shown, but when in game mode nothing is shown.

 

TODO:

Working on getting collision working

 

 

You might ask what good this is if no collision works. When I combine this, the Pi-Cube, Pi-FixedJoint, Pi-Pivot, & Pi-MoveTo I am able to get a cube that moves from pivot to pivot that has physics. I joint a Pi-Body to a Pi-Cube, then Pi-MoveTo calls EntityMove() on the Pi-Body to move from pivot to pivot while Pi-Cube still retains physics collision.

 

===============================================================

 

Pi-Cube v0.1

 

 

Description

This allows for dynamic cube sizes with matching dynamic body size and you can apply any material file to it. The body mass is not set until you run game mode (and are running the Pi-Main lua game script).

 

TODO:

It needs to be able to scale/rotate the texture assigned. If anyone knows how to do this please let me know.

 

Click here to download this file

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...