Forum

A template for space-strategy mods has born.

Discuss anything not covered by any of the other categories.

Moderator: InsideQC Admins

Postby Teiman » Thu Jul 19, 2007 2:43 pm

FrikaC wrote:Try removing the line missile.owner = self;


Oops!..

Thanks FrikaC!

Now it work. Humm... Interesting. Seems setorigin is not instant on QW, as is the new location is near, the entity location is interpolated! :D
Cool, I am learning new stuff :D

Code: Select all


.float scale;
.float alpha;

.entity selector;


entity sun;
void() CheckSun =
{

    local entity sun2;
    if (sun)
        return;
       
    sun = spawn ();
   sun.owner = self;
   setmodel (sun, "progs/mundo2.mdl");
   setsize (sun, '0 0 0', '0 0 0');
   setorigin (sun, self.origin);
    sun.effects = EF_DIMLIGHT |EF_BRIGHTLIGHT;
    sun.alpha = 0.1;
    sun.scale = 5;
   
    sun2 = spawn ();
   sun2.owner = self;
   setmodel (sun, "progs/sun.mdl");
   setsize (sun, '0 0 0', '0 0 0');
   setorigin (sun, self.origin);
    sun.effects = EF_DIMLIGHT |EF_BRIGHTLIGHT;
    sun.alpha = 0.4;
    sun.scale = 2;
       
       
       
};


void() W_FireTest =
{
   local   entity missile, mpuff;
   
    CheckSun();
   
   missile = spawn ();
   //missile.owner = self;
   missile.solid = SOLID_BBOX;
   missile.classname = "planet";

   makevectors (self.v_angle);

   missile.nextthink = time + 40;
   missile.think = SUB_Remove;
    missile.skin = random()*6;
    missile.scale = 0.4 + random()*8;

   setmodel (missile, "progs/mundo2.mdl");
    //setmodel (missile, "progs/planet1.spr");
/*
   if (random()*100<50)
      setmodel (missile, "progs/sun16.spr");
   else
      setmodel (missile, "progs/planet16.spr");
*/

   //setsize (missile, '0 0 0', '0 0 0');
      setsize (missile, '-16 -16 -16', '16 16 16');
   setorigin (missile, self.origin + '0 0 80') ;
   missile.takedamage = DAMAGE_AIM;
   missile.th_die = SUB_Remove;

};




void (vector org) GunShot =  {
   WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
   WriteByte (MSG_MULTICAST, TE_GUNSHOT);
   WriteByte (MSG_MULTICAST, 3);
   WriteCoord (MSG_MULTICAST, org_x);
   WriteCoord (MSG_MULTICAST, org_y);
   WriteCoord (MSG_MULTICAST, org_z);
   multicast (org, MULTICAST_PVS);
}


void() MakeSoSelectorExists =  {
   if (!self.selector || self.selector == world) {
      self.selector = spawn();
      setmodel (self.selector, "progs/hud.spr");
   }
};


void() W_Select =
{
   local   vector  source;
   local   vector  org;
   local float len;

   MakeSoSelectorExists();


   len = 4192;

   makevectors (self.v_angle);
   source = self.origin + '0 0 16';
   traceline (source, source + v_forward* len, FALSE, self);

   if (trace_fraction == 1.0) {
      setmodel(self.selector,"");
      return;
   }
   
   //We are pointing to something       
       if (trace_ent)
   if (trace_ent.classname=="planet") {

      //This is so we avoid engine location interpolation
      if(1){
         remove(self.selector);
         self.selector = world;
         MakeSoSelectorExists();
      }

      setorigin(self.selector, trace_ent.origin);
      sound (trace_ent, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
      GunShot( trace_ent.origin );
      return;
   }
};


Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby Teiman » Fri Jul 20, 2007 3:06 pm

New image, and latest code.

Image

Code: Select all
void() precache_stars = {
   
    precache_model ("progs/mundo2.mdl");   //Tei: mundo
    precache_model ("progs/sun.mdl");   //Tei: mundo
   
    precache_model ("progs/planet1.spr");   //Tei: mundo
    precache_model ("progs/sun.spr");   //Tei: mundo   
    precache_model ("progs/planet16.spr");   //Tei: mundo
    precache_model ("progs/sun16.spr");   //Tei: mundo   


    precache_model ("progs/hud.spr");   //Tei: mundo   
    precache_model ("progs/alas1.spr");   //Tei: mundo   

}


.float scale;
.float alpha;

.entity selector;


entity sun;
void() CheckSun =
{

    local entity sun2;
    if (sun)
        return;
       
    sun = spawn ();
   sun.owner = self;
   setmodel (sun, "progs/mundo2.mdl");
   setsize (sun, '0 0 0', '0 0 0');
   setorigin (sun, self.origin);
    sun.effects = EF_DIMLIGHT |EF_BRIGHTLIGHT;
    sun.alpha = 0.1;
    sun.scale = 5;
   
    sun2 = spawn ();
   sun2.owner = self;
   setmodel (sun, "progs/sun.mdl");
   setsize (sun, '0 0 0', '0 0 0');
   setorigin (sun, self.origin);
    sun.effects = EF_DIMLIGHT |EF_BRIGHTLIGHT;
    sun.alpha = 0.4;
    sun.scale = 2;
       
       
       
};


void() W_FireTest =
{
   local   entity missile, mpuff;
   
    CheckSun();
   
   missile = spawn ();
   //missile.owner = self;
   missile.solid = SOLID_BBOX;
   missile.classname = "planet";

   makevectors (self.v_angle);

   missile.nextthink = time + 40;
   missile.think = SUB_Remove;
    missile.skin = random()*6;
    missile.scale = 0.4 + random()*8;

   setmodel (missile, "progs/mundo2.mdl");
    //setmodel (missile, "progs/planet1.spr");
/*
   if (random()*100<50)
      setmodel (missile, "progs/sun16.spr");
   else
      setmodel (missile, "progs/planet16.spr");
*/

   //setsize (missile, '0 0 0', '0 0 0');
      setsize (missile, '-16 -16 -16', '16 16 16');
   setorigin (missile, self.origin + '0 0 80') ;
   missile.takedamage = DAMAGE_AIM;
   missile.th_die = SUB_Remove;

};







void (vector org) GunShot =  {
   WriteByte (MSG_MULTICAST, SVC_TEMPENTITY);
   WriteByte (MSG_MULTICAST, TE_GUNSHOT);
   WriteByte (MSG_MULTICAST, 3);
   WriteCoord (MSG_MULTICAST, org_x);
   WriteCoord (MSG_MULTICAST, org_y);
   WriteCoord (MSG_MULTICAST, org_z);
   multicast (org, MULTICAST_PVS);
}


void() MakeSoSelectorExists =  {
   if (!self.selector || self.selector == world) {
      self.selector = spawn();
      setmodel (self.selector, "progs/alas1.spr");
   }
};


void() W_Select =
{
   local   vector  source;
   local   vector  org;
   local float len;

   MakeSoSelectorExists();


   len = 4192;

   makevectors (self.v_angle);
   source = self.origin + '0 0 16';
   traceline (source, source + v_forward* len, FALSE, self);

   if (trace_fraction == 1.0) {
      setmodel(self.selector,"");
      return;
   }
   
   //We are pointing to something       
       if (trace_ent)
   if (trace_ent.classname=="planet") {

      //This is so we avoid engine location interpolation
      if(1){
         remove(self.selector);
         self.selector = world;
         MakeSoSelectorExists();
      }

      setorigin(self.selector, trace_ent.origin);
      //sound (trace_ent, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
      //GunShot( trace_ent.origin );
      return;
   }
};


vector rotate = '0 310 0';



void(vector org) NewPlanet=
{
   local   entity missile, mpuff;
       
   missile = spawn ();
   missile.solid = SOLID_BBOX;
   missile.classname = "planet";
   missile.skin = random()*6;
   setmodel (missile, "progs/mundo2.mdl");
   setsize (missile, '-16 -16 -16', '16 16 16');
   setorigin (missile, org);
   //setmodel (missile, "progs/missile.mdl");
   //missile.avelocity = rotate  + rotate *random();
   //missile.velocity = '1 0 0';
   //missile.movetype = MOVETYPE_FLYMISSILE ;
   
   
};





void () CreatePlanets = {
   local vector endpos;

   if (self.cnt<1)
      return;


   self.avelocity = rotate  + rotate *random();
   makevectors(self.angles);

   endpos = self.origin + v_forward * (300 * random() + self.cnt/4 * (random()+0.5)   + 50)   + '0 0 120' * random() + '0 0 10';
   
   NewPlanet( endpos );

   self.cnt = self.cnt - 1 ;
   bprint (PRINT_HIGH, "New planet\n");
   self.nextthink = time + 0.1;

   //self.velocity = '100 0 0' *random() ;
   self.movetype = MOVETYPE_FLYMISSILE ;
};


entity creator;

void() CreateGalaxy = {
//   bprint (PRINT_MEDIUM, "New creator... Starting\n");

   //run only once
   if (creator)
      return;

   creator = spawn();

   setorigin(creator, '0 0 0');
   creator.think = CreatePlanets;
   creator.nextthink = time + 0.1;
   creator.cnt = 32;   
   creator.avelocity = rotate  + rotate *random();

   bprint (PRINT_HIGH, "New creator\n");

};


Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby Teiman » Fri Jul 20, 2007 4:46 pm

More screenshots

Event icon for "Utopia"
Image

The ingame screenshot:
Image
Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby Sajt » Fri Jul 20, 2007 8:36 pm

O_o
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby RenegadeC » Fri Jul 20, 2007 11:58 pm

Sajt wrote:O_o


I second this. Angels in space? what? :P
User avatar
RenegadeC
 
Posts: 391
Joined: Fri Oct 15, 2004 10:19 pm
Location: The freezing hell; Canada

Postby frag.machine » Sat Jul 21, 2007 2:04 am

Suddenly, I had a vision of a classic mod birth...

http://en.wikipedia.org/wiki/Star_Trek_(text_game)
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby Teiman » Mon Jul 23, 2007 9:00 am

RenegadeC wrote:
Sajt wrote:O_o


I second this. Angels in space? what? :P


Remenber the events:

* Planetary Destruction sound
* Solar nova explosion sound
* Megadeath, quantic chain reaction explosion
* "Genesis", planet terraformation
* "Comunism", robots revolution
* "Utopia", angel alike sound for "perfect society,peace and love" event

Is just a icon. A suggestive one.

Anyway.. whats bad about angels in space? warhammer 40.000 has demons there...
Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby Sajt » Mon Jul 23, 2007 9:07 am

Nothing wrong with it. It's pretty trippy, but that's actually pretty cool. :)
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby FrikaC » Mon Jul 23, 2007 3:34 pm

It'd be more suggestive if that chick was nekkid.
FrikaC
Site Admin
 
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Postby Urre » Tue Jul 24, 2007 6:07 am

/me suggests chocolate
I was once a Quake modder
User avatar
Urre
 
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon

Postby frag.machine » Wed Jul 25, 2007 2:10 am

Image
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby Teiman » Wed Jul 25, 2007 9:46 am

WTF is nekkid?

On google images theres only a few male porn images, and random crap, like a giant metal monsters destroying "The Burning Man" fiesta.

Image

The Burning Man mod review of PlanetQuake
http://planetquake.gamespy.com/View.php?view=MOTW.Detail&id=9
Last edited by Teiman on Wed Jul 25, 2007 3:19 pm, edited 1 time in total.
Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby FrikaC » Wed Jul 25, 2007 1:12 pm

sweet.
FrikaC
Site Admin
 
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest