so... i got that radar finally working...
Moderator: InsideQC Admins
5 posts
• Page 1 of 1
so... i got that radar finally working...
and im kinda disappointed
the radar works, but what it does is spawn a sprite where the spawn is and the sprite moves like you do in that position... it wasnt really what i thought it was :/ but oh well, atleast i did it ...
i also made my rocket launcher throw exploding body parts!
i also made my rocket launcher throw exploding body parts!
-

ceriux - Posts: 2223
- Joined: Sat Sep 06, 2008 3:30 pm
- Location: Indiana, USA
Yay!
With some alteration and using the right engine, you should be able to make that radar follow the player everywhere he goes with MOVETYPE_FOLLOW, and be visible only to him (in deathmatch, etc) using drawonlytoclient.
With some alteration and using the right engine, you should be able to make that radar follow the player everywhere he goes with MOVETYPE_FOLLOW, and be visible only to him (in deathmatch, etc) using drawonlytoclient.
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
- Wazat
- Posts: 771
- Joined: Fri Oct 15, 2004 9:50 pm
- Location: Middle 'o the desert, USA
i dont think iv ever even seen the 2nd thing you've listed before o.o i think i might get the first thing your talking about would it be something with this?
radar.owner = self;
radar.movetype = MOVETYPE_FOLLOW;
radar.nextthink = self + 3;
radar.think = MOVETYPE_FOLLOW (self);
radar.owner = self;
radar.movetype = MOVETYPE_FOLLOW;
radar.nextthink = self + 3;
radar.think = MOVETYPE_FOLLOW (self);
-

ceriux - Posts: 2223
- Joined: Sat Sep 06, 2008 3:30 pm
- Location: Indiana, USA
Not quite, but close. There are two ways to make it follow you. You're merging them together, which won't work. Here are examples:
1) Set its owner to the player, and its think to a function like this:
This will look jittery as the player moves, but it will work without special engine support.
2) Use MOVETYPE_FOLLOW, which is supported by engines like DP:
If you want to use MOVETYPE_FOLLOW and .drawonlytoclient, you'll need to download the DP engine (or another similar engine) and look at its dpextensions.qc. That has the various features listed with (somewhat difficult) instructions on their use (it's also a file you'll need to add to your mod).
1) Set its owner to the player, and its think to a function like this:
- Code: Select all
void RadarFollow()
{
makevectors(self.owner.v_angle);
self.origin = self.owner.origin + v_forward*40 + v_right*20;
self.think = RadarFollow();
self.nextthink = time;
// Then the radar does its normal think stuff here
}
This will look jittery as the player moves, but it will work without special engine support.
2) Use MOVETYPE_FOLLOW, which is supported by engines like DP:
- Code: Select all
radar.movetype = MOVETYPE_FOLLOW;
radar.solid = SOLID_NOT;
radar.aiment = player;
radar.punchangle = radar.angles;
radar.view_ofs = '40 20 0'; // I may be doing this wrong, haven't used this feature in a while
// then the radar uses its normal think without anything special. For example:
radar.think = radar_think;
radar.nextthink = time;
If you want to use MOVETYPE_FOLLOW and .drawonlytoclient, you'll need to download the DP engine (or another similar engine) and look at its dpextensions.qc. That has the various features listed with (somewhat difficult) instructions on their use (it's also a file you'll need to add to your mod).
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
- Wazat
- Posts: 771
- Joined: Fri Oct 15, 2004 9:50 pm
- Location: Middle 'o the desert, USA
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest