Forum

Bad MoveType & Alternateive To Stuffcmding

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Bad MoveType & Alternateive To Stuffcmding

Postby Team Xlink » Mon Jan 18, 2010 10:18 pm

Hello.

I am trying to change the player model when he has a certain weapon this is what I have:

if (self.weapon == IT_GROWINATOR)
{
setmodel(self,"progs/giant.mdl");
modelindex_player = self.modelindex;
self.movetype = MOVETYPE_WALK;
self.impulse = 0;
}

It gives me an error that says this:

Svphysics: bad movetype

I don't know why it is doing that.

Thank you.

Hello.

I am trying to slow the players turning speed and stuffcmding to cl_yawspeed isn't a good way to do it, is there an easy alternative to it?

Thank you.
Team Xlink
 
Posts: 368
Joined: Thu Jun 25, 2009 4:45 am
Location: Michigan

Postby Orion » Mon Jan 18, 2010 11:03 pm

Player models are changed via .modelindex.

Also, you don't need to redeclare MOVETYPE_WALK nor self.impulse after changing a model. :wink:

Try something like this at PutClientInServer() (client.qc):

Code: Select all
setmodel (self, "progs/giant.mdl");
modelindex_giant = self.modelindex;


The player's modelindexes are checked by CheckPowerups() (also client.qc), you might also want to take a look at it.

Don't forget to put a (float modelindex_giant) at the bottom of defs.qc. :P

But the second question I kinda don't know much, though.
User avatar
Orion
 
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Postby Wazat » Tue Jan 19, 2010 2:10 am

We recently had a discussion on slowing the player's turn speed... I forget which thread. Does anyone have the link?
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

Postby Baker » Tue Jan 19, 2010 3:51 am

Wazat wrote:We recently had a discussion on slowing the player's turn speed... I forget which thread. Does anyone have the link?


viewtopic.php?t=1874

(Obtained via: this Google query)
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby Spike » Tue Jan 19, 2010 10:16 am

in regular quake, not all entities support movetype_walk, only players do. Are you sure your 'self' is really the player?
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Urre » Tue Jan 19, 2010 1:17 pm

As I understand it, your target platform is PSP, correct? For that you'll probably have to stuffcmd to restrict turning speed, as whatever engine you're using probably doesn't have an alternative. Truth is it can be hard with engines which supposedly have alternatives, too. I can only imagine it being possible with CSQC, and I haven't tried it out personally. That is, if you're planning to restrict the mouse aiming speed too, not just the turning speed by keys.

Does the PSP Quake engine you're using use cl_yawspeed for turning? It might base it on some other cvar.
I was once a Quake modder
User avatar
Urre
 
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon

Postby mh » Tue Jan 19, 2010 4:09 pm

If you're SP-only you can use cvar_set ("cl_yawspeed", "100") from QC and it should work. For MP it won't get from server to client(s) however.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Wazat » Wed Jan 20, 2010 4:58 am

Well, as discussed in the other thread, if you jump to 3rd person mode (or even stay in 1st person) and use a dummy object as the player, you CAN restrict turn speed very effectively that way (this is how most games do turrets & vehicles, etc).

If you don't want to use a dummy object as the player, a stuffcmd may be the only option. Hopefully that doesn't clobber the player's config if they quit at the wrong time, though!
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


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest