Page 1 of 1

DragonBall Z

Posted: Mon Nov 05, 2007 1:30 pm
by Masta_J
Hi guys, I'm in the process of making a DBZ game and got a couple issues which I really need help with:

1) Is there any way to make a pawn react with a projectile in different ways. E.G knock it away or catch it? I have sort of achieved this by creating a projectile pawn which spawns on a trigger, but the scripting takes up alot more time.

2) Is there a way to disable, "Auto fire," for a player pawn? In other words, can I make it so that holding the melee attack button only performs the action once instead of repeatedly.

3) I'd like to add an energy trail efffect to my projectiles. I'm not sure if your familiar with DBZ, but Goku's Kame Ha would be the best example. In other words, the projectile is fired and leaves a long tail extending from the pawn's hand to the projectile.

4) Last but not least. I've added in a teleport function for the scripted players. I would like to know how to remove the bounding box for the period of time that the pawn is not rendered, so if the pawn colides with an object, he simply goes straight through it. Here's the code I've used for the teleport function.

Code: Select all

InstantTransmision[()
{
   PawnRender(false);
   Gravity(false);
   if(IsKeyDown(K_FOR))
   {
   PawnRender(false);
   AnimateHold("SwoopForward");
   ForceForward(370);
   PlaySound("boost.wav");
   self.think="InstantTransmisionEnd";
  }
   else
   {
   self.think="RunPlayer";
   return 0;
  }
}]
Any help is appreciated, thanks guys.

Posted: Mon Nov 05, 2007 2:21 pm
by Jay
4) Just to say, a force of 370 forward is insane. You will be very well teleported outside of the level. 20 or 30 is much already i think. 370 does not mean you will be teleported 370 forward, but 370 in the first second, 369 in the 2nd, 368 in the ยด3rd, and so on until 1 in the 370th second. (at lkeastr that's how i understand force)

You can use SetNoCollision() to disable the collision, and SetCollision() to enable it again.

I would not use force, because it will not be an instant teleport, but you can try this:

SetNoCollision();
PositionToPawn(self.EntityName,0,0,370,true,false);
SetCollsion();

This will do an instant teleport (i hope it works) 370 texels forward.

Posted: Mon Nov 05, 2007 2:59 pm
by Masta_J
I tried that already, but my player still collides with objects...?

Posted: Mon Nov 05, 2007 3:37 pm
by Juutis
2.) Add a new variable called something like 'meleebutton_pressed'. Then:

Code: Select all

if(IsKeyDown(<INSERT YOUR MELEE KEY>))
{
     if(meleebutton_pressed = false)
     {
          meleebutton_pressed = true;
           <DO THE MELEE STUFF>
     }
}
else
{
     meleebutton_pressed = false;
}
3.) I'm not sure exactly how this could be done in RF, but I'd start by trying out the different effects RF has. Play around with them as much as possible and see if you can figure out a way.

Posted: Mon Nov 05, 2007 4:03 pm
by Masta_J
Thanks. Just wanted to know... Where and how would I define the variable, "melleebutton_pressed"?

Posted: Mon Nov 05, 2007 4:05 pm
by Juutis
Variables are defined in the beginning of the script. I'm sure you have done it. Just add:

Code: Select all

meleebutton_pressed     [false]

Posted: Tue Nov 06, 2007 4:33 pm
by vrageprogrammer
Since you are really very interested in Dragonball Z, you can check out my online DBZ game( Still under development) here:
http://vdronline.forum5.com

It's really easy to create online games!

Posted: Wed Nov 07, 2007 12:13 pm
by Masta_J
Thanks for help guys. Thanks for link VDRAGEPROGRAMER. Will sign up soon as I get lunch break.