Forum

Bsp model placement

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Bsp model placement

Postby Error » Fri Sep 21, 2012 7:10 am

So what I've done is spawned 3 Bsp models in my level. When I place a new entity with the same "model" as the other, it offsets it to where the original model was placed. How do I get around that?

God I hope that made sense... I'm extremely tired.
User avatar
Error
InsideQC Staff
 
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA

Re: Bsp model placement

Postby r00k » Fri Sep 21, 2012 3:21 pm

are you updating the origin?

In my ctf mod, i allow players to toss ammo. But instead of a backpack, it will drop a BSP model of the ammo type
Code: Select all
if (self.weapon == IT_LIGHTNING)
            {
               if (self.ammo_cells > 10)
               {
                  self.ammo_cells = self.ammo_cells - 10;
                  ammo = 10;
                  class = "item_cells";
                  m ="maps/b_batt0.bsp";
               }
               else
//...
   item = spawn();
   item.owner = self;
   makevectors(self.v_angle);

   setorigin(item, self.origin + '0 0 16');
   item.velocity = aim(self, 320);
   item.velocity = item.velocity * 320;
   item.flags = FL_ITEM;
   item.solid = SOLID_TRIGGER;
   item.movetype = MOVETYPE_BOUNCE;

   item.aflag = ammo;
   item.classname = class;
   setmodel (item, m);
   
   setsize (item, '0 0 0', '32 32 56');
   item.touch = Team_Ammo_Touch;

   item.nextthink = time + 20;//must remove or else we will run out of server entities!!

   item.think = SUB_Remove;
   W_SetCurrentAmmo();
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Re: Bsp model placement

Postby Error » Sat Sep 22, 2012 2:01 am

It's not a seperatedly compiled Bsp model. It's an entity that's using the same model as a map defined entity.
User avatar
Error
InsideQC Staff
 
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA

Re: Bsp model placement

Postby Error » Sat Sep 22, 2012 8:40 am

Nevermind. I solved it by using precompiled Bsp models. The original way was giving me too much pain.

Thanks anyways.
User avatar
Error
InsideQC Staff
 
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA

Re: Bsp model placement

Postby r00k » Sat Sep 22, 2012 1:13 pm

This gives me an idea to make a mini map in quakeC by taking a map and shrinking it down to 10% and spawning it in front of the player ;)
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Re: Bsp model placement

Postby gnounc » Sat Sep 22, 2012 6:09 pm

ala splinter cell?

a few people were discussing taking the map bsp, removing the roof, and flattening it to make a gta esque minimap a while ago.
i believe it was baker and mh.
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Re: Bsp model placement

Postby Error » Sat Sep 22, 2012 9:20 pm

I'm making a hex grid turn based tactics style mod. Been playing a lot of board games recently.
User avatar
Error
InsideQC Staff
 
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest