A template for space-strategy mods has born.
Moderator: InsideQC Admins
28 posts
• Page 2 of 2 • 1, 2
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!
Cool, I am learning new stuff
- 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
New image, and latest code.
- 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
Suddenly, I had a vision of a classic mod birth...
http://en.wikipedia.org/wiki/Star_Trek_(text_game)
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)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
RenegadeC wrote:Sajt wrote:O_o
I second this. Angels in space? what?
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

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
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.
The Burning Man mod review of PlanetQuake
http://planetquake.gamespy.com/View.php?view=MOTW.Detail&id=9
On google images theres only a few male porn images, and random crap, like a giant metal monsters destroying "The Burning Man" fiesta.
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
28 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest

