StarBlender


StarBlender TUTORIAL 2

USING WEAPONS AND DESTROYING OBJECTS

1/3

This tutorial will demonstrate how to select from among various weapons and then use them to destroy objects. Since this tutorial is a continuation from the previous one, you will require the character that was previously created (either yours or mine ).
 
 

1) The first step is to create the weapons (at the moment, I have 2 in my arsenal). You can create whatever weapons that you desire! For my part, I have a laser rifle (whose energy is gradually depleted with repeated firing and subsequently requires a short period of time to recharge) and a wrist mounted laser pistol (which can simply be fired continuously).

My weapons:

Depending upon the weapon, it must be parented with its initial support (ex: the character's body for the rifle and the wrist of the character's forearm for the laser pistol). Add to each member of the character involved and for each weapon, an animation of "disarming" and "arming" (which does not necessarily have to be the same animation simply reversed). Link all animations of disarming for the 1st weapon with a controller of the latter (same thing for the other weapon) and use the same method for arming, except with new controllers. Each weapon must now have the ability to be fired added. An excellent (French) tutorial describes this step, however I will describe to you the operation of a power hungry laser rifle.

2) This weapon must therefore consist of an Int property "gauge" with a value of 20, for example. When the laser rifle is fired, the gauge variable is decreased at a constant rate. When the value reaches 0, the weapon can no longer be fired. When the key is released, the gauge value slowly increases, until it is once again fully recharged, ie. "gauge" = 20. You will also require an Int property "rifle" and a Timer property "rtime". Using this information, view the following diagram which displays the laser rifle's implementation.

Détails :

Links :

3) Another required trick is that, the system used with the standard shooting arrangement, also functions quite well for situations where you use a laser beam style weapon (no "projectiles"), in which case, you would normally not be able to utilize the collision system. To correct this, the collisions must be simulated. Therefore, create a control which will create, at a relatively high frequency (of perhaps 2 or 3), a simple but invisible projectile which will take care of the collisions.

Now that you have all your weapons, we now need a way to swap between them.

NEXT

StarBlender

Today :
Wednesday 24 April 2024
Last update : 2001

Blender version : 2.12

Par d�faut

Untitled Untitled Untitled

You think GameBlender is :
without a future.
disappointing.
interesting.
promising.
fantastic.
 

results

©copyright Abjedi 2001