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]

Author Topic: show rigidbody after Hide Skin mesh  (Read 264 times)

« on: March 29, 2014, 03:06:38 PM »
Hi guys.

I made a project that there is a gun on the car, now when bullets finish my gun (as skin mesh) Will be hidden. Now for better and More realistic view, I want after finish bullets and hidden skin mesh, my gun that already created as rigidbody detach the car and fall to the ground. I can create it for Once, but this work May occur more than 50 times and I think not good idea that make 50 rigidbody with hidden geometry and show them after hide skin mesh.

Now anyone have idea for this work? can make a rigidbody after each time skin mesh is hide?

Thanks
« Last Edit: March 29, 2014, 03:11:19 PM by behdadsoft »
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #1 on: March 29, 2014, 04:53:30 PM »
Just reposition the rigidbody to where you want the next one to be, or under the map until it is required again, or just use imposters
« Reply #2 on: March 30, 2014, 08:51:59 AM »
Thanks Cypermethrin

Quote
or just use imposters

how can show rgidbody with imposters when skinmesh Will be hidden?
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #3 on: March 30, 2014, 10:23:10 AM »
same as you would if its not hidden, if its hidden you just can't see it - its still there
« Reply #4 on: March 30, 2014, 10:40:46 AM »
Quote
same as you would if its not hidden, if its hidden you just can't see it - its still there

yes, I need how can check skinmesh is hide or show in script?
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #5 on: March 30, 2014, 10:43:18 AM »
yes, I need how can check skinmesh is hide or show in script?

You can't. There is no hide/show return function.

However, you're the one who hides or shows an object, so you can keep track of it's current status.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #6 on: March 30, 2014, 11:06:57 AM »
Quote
so you can keep track of it's current status.

mean create a variable and change it to (0-1) if is show or hide?
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #7 on: March 30, 2014, 11:12:45 AM »
mean create a variable and change it to (0-1) if is show or hide?

For example.
By the way, this is where the boolean variable comes in handy.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #8 on: March 30, 2014, 11:19:31 AM »
Quote
For example.
By the way, this is where the boolean variable comes in handy.

ok, thanks. I test and say to you what's result.
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #9 on: March 30, 2014, 03:21:49 PM »
OK, I make a variable for check show or hide skin mesh, but I'm confused. I see I I see ImposterObjectRBDemo.3dr and create an imposter like it, the difference that I start Imposter with script like this:

Code: [Select]
   // Start Imposter for fall gatling rigidbody
   if (speed <= 0 && HideShow == false) iObjectStart (OBJ_132);
   else iObjectImpostersDestroy(OBJ_132);

I want create one Imposter rigidbody if (speed <= 0 && HideShow == false). but with this script, until this condition is right (speed <= 0 && HideShow == false) imposter create rigidbody.

how can fix this problem?
« Last Edit: March 31, 2014, 10:12:13 AM by behdadsoft »
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #10 on: April 01, 2014, 09:47:57 AM »
can anyone help me?
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #11 on: April 01, 2014, 11:00:43 AM »
 // Start Imposter for fall gatling rigidbody
   if (speed <= 0 && HideShow == false && imposterCreated == false) {
 iObjectStart (OBJ_132);
imposterCreated = true;
}

if (destroyImposterCondition == true) {
  ObjectImpostersDestroy(OBJ_132);
  imposterCreated = false;
  }

seriously, if you're making a commercial game you gotta think at least a little bit and learn the basics of scripting.

Set the  destroyImposterCondition to what you want when you want the imposter to be destroyed otherwise it'll just create and destroy it immediately
« Last Edit: April 01, 2014, 11:04:49 AM by Cypermethrin »
« Reply #12 on: April 01, 2014, 03:09:08 PM »
Quote
// Start Imposter for fall gatling rigidbody
   if (speed <= 0 && HideShow == false && imposterCreated == false) {
 iObjectStart (OBJ_132);
imposterCreated = true;
}

if (destroyImposterCondition == true) {
  ObjectImpostersDestroy(OBJ_132);
  imposterCreated = false;
  }

seriously, if you're making a commercial game you gotta think at least a little bit and learn the basics of scripting.

Set the  destroyImposterCondition to what you want when you want the imposter to be destroyed otherwise it'll just create and destroy it immediately

Thanks Cypermethrin, really I tired because I Alone make this game and sometimes my mind does not work. I wrote more than 1500 line script in 3drad and for run once a code I used more than 10 times boolean variable. I think I need a few days rest.

And Thanks Again Cypermethrin.
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
Pages: [1]