3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1] 2

Author Topic: User-created plug-ins  (Read 42643 times)

« on: April 01, 2009, 03:47:57 AM »
If you want to share any Script-based plug-in that others can use in their projects without coding, please post it here.

To maximize clarity please do not post anything else to this thread. If you want to discuss a plugin found here, please start a new topic.

Thank You in advance for your cooperation  :)

PLUG-IN SCRIPT REQUIREMENTS

  • it must be a .3dr project with one single Script object in it and nothing else. This will allow others to easily add it to their projects by using the recently improved File->Merge menu option
  • the .3dr file name should start with 'plugin_' to let users locate all plugins easily in their projects folder
  • an usage description must be included to your post, specifying the plugin purpose and the order in which other objects should be linked with the plugin Script object
  • the plugin should be designed with non coders in mind! It means, for example, that the user must be able to configure the script, if applicable, by simply changing clearly marked values in the script header
  • by submitting your script you agree to let others use it and its script code for any purpose

« Reply #1 on: April 01, 2009, 03:49:27 AM »
Goal Arrow

Displays a SkinMesh always facing towards a specified goal. It can be used to implement arrows that help the player reach a location.

INSTALLATION

Download the plugin_GoalArrow.3dr file to the

C:\3D Rad\3DRad_res\projects\

folder on your computer, launch 3D Rad, open your project and then select File->Merge from the pull-down menu.

Select the plugin and when loaded link the objects in your project in the following order (if you make a mistake remove the plugin Script object from the list and merge it again):

  • the SkinMesh object to use as arrow
  • the goal object
  • the CamChase object in which you want to display the arrow


REMARKS

To adjust the run-time position of the arrow on the screen, double-click the plugin Script object and change the values at 'CONFIGURATION'

For an example of usage, please download and launch the GoalArrowPluginTest.3dr project

« Last Edit: April 11, 2009, 03:14:54 AM by 3D Rad Developer - Fernando »
« Reply #2 on: April 03, 2009, 08:10:03 AM »
This is something I made a while back and spruced up for this.
It will place a sprite on the location where the target object will be by the time the bullet gets to it.
Which means you don't have to guess how much lead to put on a target, just aim at the sprite.

psikotropico

« Reply #3 on: April 11, 2009, 01:12:52 AM »
RACE TIMER

Returns a text string with elapsed minutes, seconds and milliseconds in 00:00:000 format. Thanks to Fernando for code logics and finishing details... (yes, somebody must do de dirty job ;D )

INSTALLATION

Download the plugin_RaceTimer.3dr file to the

C:\3D Rad\3DRad_res\projects\

folder on your computer, launch 3D Rad, open your project and then select File->Merge from the pull-down menu.

Select the plugin and when loaded link the objects in your project in the following order (if you make a mistake remove the plugin Script object from the list and merge it again):

1.- EventTimer
2.- TextPrint


REMARKS

Set the EventTimer to 60 secs. and repeat 1000000 times. Be sure to check "Reset internal timers when stopped".

For an example of usage, please download and launch the RaceTimer_InAction.3dr project.
« Last Edit: April 11, 2009, 03:15:51 AM by 3D Rad Developer - Fernando »
« Reply #4 on: April 17, 2009, 03:21:09 PM »
Plugin Character Chase

Makes a bot character chase any target (is anyone he actually "sees" in his FOV)...
OBJ_0 is the Character bot, OBJ_22 is the bot Skin Mesh, and the remaining objects of the script could be collidable (e.g., rigid body) targets...
Details are on the body of the script text!

See ya, and enjoy!!
« Reply #5 on: May 01, 2009, 05:29:04 PM »
Hand-brake

Enables hand-brake simulation for the Car object. Input control is fully configurable by the final user by using ConfigureControls object.

INSTALLATION

Download the plugin_HandBrake.3dr file to the

C:\3D Rad\3DRad_res\projects\

folder on your computer, launch 3D Rad, open your project and then select File->Merge from the pull-down menu.

Select the plugin and when loaded link the 'Script: hand-brake' object to the Car in your project.


REMARKS


For an example of usage, please download and launch the HandBrakePluginTest.3dr project
« Reply #6 on: June 13, 2009, 09:37:06 PM »
SPEEDOMETER and TACHOMETER

This script addapted from the Speedometer.3dr script provided with 3drad.

INSTALLATION
All you need is 2 speedo (rotarydialA) sprite objects, 2 speedo (rotarydialB) sprite object for the rotary needle indicators and a text print (optional) also a Car object. Link them all to the plugin script. Only edit the values indicated by the Yellow reminder statement. The gearbox specifications are for a 4 speed with overdrive you could add more gears by adding ratio values to the gearboxRatio[] array. The values are configurable but not necessary. All configurable values are indicated by the yellow reminder statement.

REMARKS
For an example please download the sample project. Speedometer-Tacho.3dr
« Reply #7 on: July 02, 2009, 03:10:37 AM »
Non-rolling wheel props

Non-rolling wheel props (like exposed sports car brakes) and replacements (like snowmobile skis).

INSTALLATION

Download the plugin_CarSki.3dr file to the

C:\3D Rad\3DRad_res\projects\

folder on your computer, launch 3D Rad, open your project and then select File->Merge from the pull-down menu.

Select the plugin and when loaded link the 'Script: car ski manager' object to the Car in your project.


REMARKS


For an example of usage, please download and launch the SnowmobileDemo.3dr project
« Reply #8 on: December 05, 2009, 02:00:32 PM »
Simple Toon/Cel Shader

EDit : removed, use this instead : http://www.3drad.com/forum/index.php?topic=5001.msg41541#msg41541
« Last Edit: August 10, 2010, 07:32:10 AM by shadmar »
« Reply #9 on: December 05, 2009, 02:03:31 PM »
Very very easy to use Infinite water

Uses a script to create imposters for infinite water. Goes perfectly with BoatDemo.

INSTALLATION

 6.40
 Use the script below and link boat and water-skinmesh to it, look in the script at top to match OBJ_X  correctly.
 You can use the deafult BoatDemo with this.

 6.41+
 Download the plugin_InfiniteWaterEasy.3dr file to the

 C:\3D Rad\3DRad_res\projects\
 folder on your computer, launch 3D Rad, open the project and then select File->Merge from the pull-down  menu.

 Link your boat and waterskinmesh to the script or just use example provided :)

REMARKS

 Might require 3dRad v 6.41+ since it was saved using that version.

Script for 6.40 or lower

Code: [Select]
///Control section, edit these values --------------------------------
int boat             = OBJ_22;   //Boat Rigidbody OBJ_ goes here
int watermesh        = OBJ_0;    //Skinmesh for water OBJ_ goes here.
float boatOffset     = -0.7;     //y-offset for water
int waterplanesize   = 400;      // should match your waterplane mesh size in meteres
int makeimposters    = 10;       //this is grid size power number  10 = 10*10 grid == 100 imposters--> only use pair numbers
/// ------------------------------------------------------------------



Vector3[] waterImpLoc(makeimposters*makeimposters); 
bool init=true;

Quaternion NoQ;
Vector3 boatLoc;

//function to populate skinmeshes imposters x-rows in the z-axis
void pop(Vector3 bLoc)
{
    if (init) {
    bLoc.x -= (makeimposters/2)*(waterplanesize/2)+(waterplanesize/4); //make sure boat is in the center of grid
    bLoc.z -= (makeimposters/2)*(waterplanesize/2)+(waterplanesize/4); //make sure boat is in the center of grid
    }
    else
    {
    bLoc.x -= (makeimposters/2)*(waterplanesize/2); //make sure boat is in the center of grid
    bLoc.z -= (makeimposters/2)*(waterplanesize/2); //make sure boat is in the center of grid
    }
    int p=0;
    for (int i=0;i<makeimposters;i++)
    {
         bLoc.z += (waterplanesize/2);
         popx(bLoc,makeimposters,p); //get new row of imposters
         p=p+makeimposters;
    }
}

//create rows of imposters in the x axis.
void popx(Vector3 iLoc, int num, int start)
{
   int j=0;
   for (int i=start;i<num+start;i++)
   {
         iLoc.x += (waterplanesize/2);
         iObjectImposterSet(watermesh,i,NoQ,iLoc);
         waterImpLoc[i] = iLoc;
         j++;
   }
}

//function to move tiles when boat crosses a tile.
void movetiles(Vector3 bLoc )
{
     for (int i=0;i<makeimposters*makeimposters;i++)
     {
         if (iVectorCompare(waterImpLoc[i], bLoc, waterplanesize/2))
         {
             pop(waterImpLoc[i]);
         }
     }
}

void Main()
{
  if (iDeinitializing()) {
      iObjectImpostersDestroy(watermesh);
  }

  if (iInitializing()) {
      NoQ=Quaternion(0,0,0,1);
      iRenderingEnable(false);  //stop renderering until all imposters are made..
      iObjectImpostersCreate(watermesh,makeimposters*makeimposters);
      iObjectLocation(boat, boatLoc);
      boatLoc.y+=boatOffset;
      pop(boatLoc); //make initial water...
      iRenderingEnable(true); //start rendering
      init=false;
  }
   Vector3 Loc;
   iObjectLocation(boat, Loc);
   Loc.y+=boatOffset;
   movetiles(Loc);
}
« Last Edit: December 13, 2009, 03:57:46 PM by shadmar »

Joe

« Reply #10 on: March 02, 2010, 03:46:05 PM »
thanks for the infinite water script!
« Reply #11 on: March 19, 2010, 12:17:25 AM »
Here's some Day/Night transitioners that also keep track of time and days passing. Shows the time and day in the upper-right corner of the screen. 3DRad v6.41

plugin_Day&Night_MilitaryTime - Midnight:
time runs in military time and starts at midnight

plugin_Day&Night_MilitaryTime - Noon:
time runs in military time and starts at noon

plugin_Day&Night_NormalTime - Midnight:
time runs the normal 12am-12pm and starts at midnight

plugin_Day&Night_NormalTime - Noon:
time runs the normal 12am-12pm and starts at noon
« Last Edit: March 19, 2010, 11:47:46 AM by Oblivionburn »

psikotropico

« Reply #12 on: March 20, 2010, 12:34:39 AM »
RACE TIMER II (SCRIPT)

Another racetimer, easier to handle in a complex game, ready for 4 cars. Returns 4 text strings with elapsed minutes, seconds and milliseconds in 00:00:000 format.

INSTALLATION

Download the plugin_RaceTimerScript.3dr file to the C:\3D Rad\3DRad_res\projects\ folder on your computer, launch 3D Rad, open your project and then select File->Merge from the pull-down menu.

REMARKS

The current script starts the timers when you press 1,2,3,4 keys. If you want to start them by another way - like race start - simply change the script logics to the following:

if (CurrLap1 == 1) {
   car1 = true;
}

where CurrLap1 is the Racetracker's Lap internal parameter for Car1. Also, if you want to stop it, simply write something like this:

if (CurrLap1 > TotalLaps) {
   car1 = false;
}

hope it helps!
« Last Edit: March 20, 2010, 12:45:28 AM by psikoT »

jestermon

« Reply #13 on: April 28, 2010, 10:48:19 AM »
SLIDE METER GAUGE

The slide meter is a gauge that can be used as a slider display for such things as Health, Fuel, Life, or whatever values your game needs to display

The slider plug in displays its value from a Counter component, which you just need to link to, in order for it to work.

INSTALL INSTRUCTIONS
Unzip the file and place the 2 sprite in the sprite folder, and the .3dr file in the project folder


INSTRUCTIONS
1..Merge the plugin-project into your own project.
2..Drag the "Slide Meter Box" to any location on the screen.
3..Link your controller to the Meter Counter
4..Change the initial value to (0-100) in the COUNTER

There is a little test script in the project that lets you test the meter. Use the UP and DOWN arrows to test the meter. Delete this test script, since you wont need it in your game

« Last Edit: April 28, 2010, 10:54:42 AM by jestermon »
« Reply #14 on: May 04, 2010, 07:06:20 PM »
2D Sprite Slider Button

  • Extremely useful for tweaking your project on the fly.
  • Really easy to use.
*Requires 3DRad6.46
Pages: [1] 2