monster attack weirdness
Moderator: InsideQC Admins
4 posts
• Page 1 of 1
monster attack weirdness
can anyone explain why this is happening?
https://youtu.be/Sw6gM46ppIQ
trying to create a new monster and his attack is coming from two different origins
here is the code:
i've tested it in darkplaces and enhanced glquake. same results. could it be the compiler? i'm using fteqcc
https://youtu.be/Sw6gM46ppIQ
trying to create a new monster and his attack is coming from two different origins
here is the code:
- Code: Select all
void (vector org, vector vec) LaunchBolt = {
sound (self, CHAN_WEAPON, "weapons/lhit.wav", 1, ATTN_NORM);
vec = normalize (vec);
newmis = spawn ();
newmis.owner = self;
newmis.classname = "bolt";
newmis.movetype = MOVETYPE_FLYMISSILE;
newmis.solid = SOLID_BBOX;
newmis.effects = EF_BRIGHTLIGHT;
setmodel (newmis,"progs/bolt.mdl");
setsize (newmis,VEC_ORIGIN,VEC_ORIGIN);
setorigin (newmis,org);
newmis.velocity = (vec * 1000.000);
newmis.velocity = newmis.velocity + v_right*crandom()*50 + v_up*crandom()*50;
newmis.angles = vectoangles (newmis.velocity);
newmis.touch = T_BoltTouch;
newmis.nextthink = time + 5;
newmis.think = SUB_Remove;
};
void () jesus_bolt =
{
local vector dir;
local entity en;
ai_face ();
//sound (self,CHAN_WEAPON,"weapons/spike2.wav",TRUE,ATTN_NORM);
en = self.enemy;
dir = (en.origin - (en.velocity * 0.200));
dir = normalize ((dir - self.origin));
LaunchBolt(self.origin+v_right*32+'0 0 64',dir);
};
void () monster_player_bolt1 = [103,monster_player_bolt2]{jesus_bolt();self.nextthink = time + 0.05;ai_face();};
void () monster_player_bolt2 = [104,monster_player_bolt3]{self.nextthink = time + 0.05;ai_face();};
void () monster_player_bolt3 = [103,monster_player_bolt4]{jesus_bolt();self.nextthink = time + 0.05;ai_face();};
void () monster_player_bolt4 = [104,monster_player_bolt5]{self.nextthink = time + 0.05;ai_face();};
void () monster_player_bolt5 = [103,monster_player_bolt6]{self.nextthink = time + 0.05;jesus_bolt();ai_face();};
void () monster_player_bolt6 = [104,monster_player_boss_run1]{self.nextthink = time + 0.05;SUB_CheckRefire(monster_player_bolt1); ai_face();};
i've tested it in darkplaces and enhanced glquake. same results. could it be the compiler? i'm using fteqcc
- hondobondo
- Posts: 207
- Joined: Tue Sep 26, 2006 2:48 am
Re: monster attack weirdness
you don't have any call to makevectors.
this means the v_right/v_up vectors that you're using are basically undefined (depending on when it was last called, and by which entity).
this means the v_right/v_up vectors that you're using are basically undefined (depending on when it was last called, and by which entity).
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Re: monster attack weirdness
true true
awesome now on to other things
awesome now on to other things
- hondobondo
- Posts: 207
- Joined: Tue Sep 26, 2006 2:48 am
Re: monster attack weirdness
i totally knew that
thanks spike
now i just need some jesus waves
thanks spike
now i just need some jesus waves
- hondobondo
- Posts: 207
- Joined: Tue Sep 26, 2006 2:48 am
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest