About Store Forum Documentation Contact



Post Reply 
Can I make a shotgun with this engine?
Author Message
kiavash2k Offline
Member

Post: #1
Can I make a shotgun with this engine?
Hello,

How can I make a new weapon like shotgun with esenthel?

can anyone help me about making new weapon like shotgun?
02-07-2010 04:15 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #2
RE: Can I make a shotgun with this engine?
Hi,

U have to make an shotgun model yourself first with programs like "Blender, C4D 3DsMax" etc.

When you have done that u can import your model in the Mesh editor to convert it to a .mesh file.
http://www.esenthel.com/wiki/index.php?t...esh_Editor
http://www.esenthel.com/wiki/index.php?t..._Importing

ps: there are websites where u can get free models just google its not hard to find.

~Dynad

There is always evil somewhere, you just have to look for it properly.
02-07-2010 06:10 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kiavash2k Offline
Member

Post: #3
RE: Can I make a shotgun with this engine?
Thanks Dynad,

but I mean how can make a clip and bullet counter, or make shot gun with script, a real gun, when hit put decals on wall, this engine have this abillity?
02-07-2010 11:07 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Can I make a shotgun with this engine?
you can find some help in Bloody Massacre tutorials (for weapons handling)
and tutorial from the SDK "game basics\19 - Small Overlays" for leaving decals
02-07-2010 11:15 PM
Find all posts by this user Quote this message in a reply
kiavash2k Offline
Member

Post: #5
RE: Can I make a shotgun with this engine?
Hi,

Thanks for your support.

I have make my laser pistol and it can put decal on the wall right now. but i have some new problems.

1. how can I change the position of my bullet when it's going out from my pistol? just i can make change in X axis and can't change the Y position, the bullet go out lower than my pistol.

2. It's possible when bullet hit the wall a particle like smoke appear on wall for a second?

(solved)3. in Bloody Massacre map when I try to shoot the walls the decals are appear on some place of the wall and some time it isn't appear, maybe the decal printed on the wall but it's printed inside of the wall not out. (solved)

4. it's possible to make clip or Ammo counts for weapons?

It's my code:

Code:
case WEAPON_PISTOL:
        {
            Bullet &bullet=Bullets.New();
            Vec &dir = cskel.getPoint("head").dir;
            Vec pos = weapon().pos()+dir*0.2f;
            
            PhysHit phys_hit;
            if(Physics.ray(pos,dir*ViewportActive.range,&phys_hit)) // if ray test hit an actor
            {
                if(Item *item=CAST(Item,phys_hit.obj)) // if the object is an item
                {
                    item->addBulletHole(phys_hit.plane.pos, phys_hit.plane.normal, dir); // call item method to add a bullet hole
                }
                if(!phys_hit.obj)
                {
                    Game::World.terrainAddDecal(WHITE,*Materials(PistolDecal),Matrix().setPosDi​r(phys_hit.plane.pos, phys_hit.plane.normal).scaleOrn(0.05f));
                }
            }
            
            bullet.set(pos, dir, this);
            if(left)time_left_to_shoot_l=0.15f;
            else    time_left_to_shoot_r=0.15f;
      
        }break;

The attachment Screenshot show what happened for decals.


Attached File(s) Image(s)
   
(This post was last modified: 02-08-2010 02:48 PM by kiavash2k.)
02-08-2010 12:45 PM
Find all posts by this user Quote this message in a reply
kiavash2k Offline
Member

Post: #6
RE: Can I make a shotgun with this engine?
Ok, the decals problem solved, I just make new phys from mesh and it's work correct right now.

I'm waiting for the answer of the other Questions.


Attached File(s) Image(s)
   
02-08-2010 02:45 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: Can I make a shotgun with this engine?
1. adjust the skeleton of the weapon
2. yes, create new object at impact moment
4. yes
02-08-2010 02:50 PM
Find all posts by this user Quote this message in a reply
Post Reply