DragonBall Z

Topics regarding Scripting with Reality Factory
Post Reply
Masta_J
Posts: 37
Joined: Tue Apr 17, 2007 1:35 pm
Location: Johannesburg South Africa

DragonBall Z

Post 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.
A good warrior knows his limits, but a great warrior finds his way around them.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post 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.
Everyone can see the difficult, but only the wise can see the simple.
-----
Masta_J
Posts: 37
Joined: Tue Apr 17, 2007 1:35 pm
Location: Johannesburg South Africa

Post by Masta_J »

I tried that already, but my player still collides with objects...?
A good warrior knows his limits, but a great warrior finds his way around them.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post 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.
Pain is only psychological.
Masta_J
Posts: 37
Joined: Tue Apr 17, 2007 1:35 pm
Location: Johannesburg South Africa

Post by Masta_J »

Thanks. Just wanted to know... Where and how would I define the variable, "melleebutton_pressed"?
A good warrior knows his limits, but a great warrior finds his way around them.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post 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]
Pain is only psychological.
User avatar
vrageprogrammer
Posts: 566
Joined: Wed Oct 31, 2007 2:59 pm
Location: On top of a tree
Contact:

Post 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!
Masta_J
Posts: 37
Joined: Tue Apr 17, 2007 1:35 pm
Location: Johannesburg South Africa

Post by Masta_J »

Thanks for help guys. Thanks for link VDRAGEPROGRAMER. Will sign up soon as I get lunch break.
A good warrior knows his limits, but a great warrior finds his way around them.
Post Reply