Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

now its the fame thrower

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
MeTcHsteekle Joined: 15 May 2008 Posts: 397 Location: its a secret |

Posted: Tue Sep 02, 2008 4:23 am Post subject: now its the fame thrower |

hello again so i took the flame thrower tutorial and made it its own lil thing and then i did the doctor shadowborg'ses tutorial on the [proper] way to add a weapon to quake so it was all going good untill i shot a bit o fire out then i was interuppted mid "hey its working " thought with yet another host error

Quote:
Introduction EDICT 86: modelindex 93.0 absmin '543.0 425.1 44.8' absmax '545.0 427.1 46.8'
movetype 9.0
solid 2.0
origin '544.0 426.1 45.8'
velocity ' 0.0 500.0 6.4'
classname fire
model progs/s_explod.spr
touch Flame_Touch()
owner entity 1
===========================
Host_Error: PR_ExecuteProgram: NULL function
===========================
Connected to a ProQuake server
VERSION 1.09 SERVER (58922 CRC)
Introduction
]fov 120
EDICT 86:
modelindex 93.0
absmin '541.8 426.3 48.3'
absmax '543.8 428.3 50.3'
movetype 9.0
solid 2.0
origin '542.8 427.3 49.3'
velocity ' -4.3 499.6 18.9'
classname fire
model progs/s_explod.spr
touch Flame_Touch()
owner entity 1
===========================
Host_Error: PR_ExecuteProgram: NULL function
===========================
]condump

as you all might be catching on, these errors stump me and foil me plans
i really cant under stand this one because it spit a bunch of numbers out at me
any help is apprecated (as i cant seem to help myself at all with these things)
yet another mid night posting, will it make sence this time in the morning?
_________________
bah

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Tue Sep 02, 2008 2:20 pm Post subject: |

You're using the explosion sprite without a think function? Wouldn't that look a bit ugly? Or more specifically, if you set the nextthink without setting the think function, then you'll get the exact same symptoms as shown (the engine detects the nextthink, clears the field, calls the think function... then finds that its not set! panic!).
_________________
What's a signature?

Back to top |

MeTcHsteekle Joined: 15 May 2008 Posts: 397 Location: its a secret |

Posted: Tue Sep 02, 2008 10:18 pm Post subject: |

htat helped a bit but now it has a probem with shooting nails and it will still crash if it dosent touch a monster, perhaps the code is fubar (like aways)

Code:
//+++++++++++++++++++ // naplam spray gun :D //+++++++++++++++++++ void(vector org) Flame_Burn = {
local entity flame;
flame = spawn ();
flame.owner = self;
flame.classname = "fire";
flame.movetype = MOVETYPE_FLYMISSILE;
flame.solid = SOLID_NOT;
flame.origin = org;
flame.velocity = '0 0 15';
setmodel (flame, "progs/s_explod.spr");
setsize (flame, '0 0 0', '0 0 0');
flame.think = s_explode1;
flame.nextthink = time + 0.01;
};
void() Flame_Think =
{
local float r;
if (self.enemy.waterlevel == 3 || self.enemy.health <= 0)
{
// do somthing!!
BecomeExplosion ();
return;
}
self.origin = self.enemy.origin + '0 0 25';
if (r < 0.3) //how often hurt and scream
T_Damage (self.enemy, self, self.owner, 1); // how much thau shalt feel thy burn
self.nextthink = time + 0.01;
// nextthink has to be fast or the consequences will be dire >8O
};
void(vector org, entity e) Flame_Onfire =
{
local entity flame;
flame = spawn ();
flame.owner = self.owner;
flame.enemy = e;
flame.classname = "fire";
flame.movetype = MOVETYPE_NONE;
flame.solid = SOLID_NOT;
flame.origin = org;
flame.velocity = '0 0 0';
setmodel (flame, "progs/sphere.mdl");
setsize (flame, '0 0 -15', '0 0 0');
flame.nextthink = time + 0.01;
flame.think = Flame_Think;
flame.effects = flame.effects | EF_DIMLIGHT;
};
void() Flame_Touch =
{
local float r;
local vector org;
if (other.takedamage)
{
org = other.origin;
org_z = self.origin_z;
Flame_Burn (org);
T_Damage (other, self, self.owner, 8); // amu of dmg dnt u like sort hnd?
remove (self); // and gon lik it nvr hppn
r = random ();
if (r < 0.2)// how oftn tey get on fire
{
if ((other.classname == "player"))
{
centerprint (other, " U R ON FIRE\n - SUKKS TO BE YOU!!!!!!!! -");
stuffcmd (other,"bf\n");
}
Flame_Onfire (org, other);
}
} // *GASP* 8O
};
void() W_FireNapalm =
{
local entity flame;
self.currentammo = self.ammo_shells = self.ammo_shells - 3;
sound (self, CHAN_WEAPON, "hknight/hit.wav", 1, ATTN_NORM);
flame = spawn ();
flame.owner = self;
flame.movetype = MOVETYPE_FLYMISSILE;
flame.solid = SOLID_BBOX;
flame.classname = "fire";
makevectors (self.v_angle);
flame.velocity = aim (self, 100000);
flame.velocity = flame.velocity * 500;
flame.touch = Flame_Touch;
setmodel (flame, "progs/s_explod.spr");
setsize (flame, '0 0 0', '0 0 0');
setorigin (flame, self.origin + (v_forward * 16) + '0 0 16');
flame.nextthink = time + 0.25; //how far awy frm brrl bfor it flms up
// W_attack, self.attack_finished - wld contrl how clse tgter thy come oot
};

_________________
bah

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Wed Sep 03, 2008 7:55 am Post subject: |

Either that is old code, or you ignored what I said. _________________ What's a signature?

Back to top |

MeTcHsteekle Joined: 15 May 2008 Posts: 397 Location: its a secret |

Posted: Wed Sep 03, 2008 7:16 pm Post subject: |

...ooooh did u mean under the W_fire functin?? because what i did was i saw some of the next thinks where before the first thinks :0 ill trya and add thinks to the right places now ;] _________________ bah

Back to top |

MeTcHsteekle Joined: 15 May 2008 Posts: 397 Location: its a secret |

Posted: Thu Sep 04, 2008 12:18 am Post subject: |

well it works now...kinda it sorta flys one fire out and then shoots nails and apperantly if i dont have nails it will skipp to the lightning gun [wich nake sence, but not wanted] i think its the think i used i did w_fire napalm think as Flame_Burn hmmm perhaps Flame_Think??
that seems to make sence because thats the think function
bah i guess ill guess right eventully
_________________
bah

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Thu Sep 04, 2008 5:31 pm Post subject: |

I would recommend SUB_Remove. _________________ What's a signature?

Back to top |

MeTcHsteekle Joined: 15 May 2008 Posts: 397 Location: its a secret |

Posted: Thu Sep 04, 2008 7:50 pm Post subject: |

thank you the flamethrowerpart works now [extended the nextthink time] now i have to figure out why it only shoots once per click and why it shoots lightning along with it [ seems to be somthing to do with the frame im starting the player in "lightattack_1" or somthing]
_________________
bah

Back to top |

Orion Joined: 12 Jan 2007 Posts: 414 Location: Brazil |

Posted: Thu Sep 04, 2008 8:13 pm Post subject: |

Instead of calling player_light1(); at W_Attack(), you can call either player_shot1(); or player_rocket1(); Otherwise the player will shoot 2 weapons at once... don't forget to call W_FireFlame(); below player_shot1() at the flamethrower attack part.
Hope this helps.
_________________
There's no signature here. Stop looking for one.

Back to top |

MeTcHsteekle Joined: 15 May 2008 Posts: 397 Location: its a secret |

Posted: Thu Sep 04, 2008 9:43 pm Post subject: |

oh so it has to be rock or shot ..ok ill see if i can remeber that from now on thanks evryone = emence happiness _________________ bah

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group