Inside3D!
     

Bad MoveType & Alternateive To Stuffcmding

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Team Xlink



Joined: 25 Jun 2009
Posts: 320

PostPosted: Mon Jan 18, 2010 10:18 pm    Post subject: Bad MoveType & Alternateive To Stuffcmding Reply with quote

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.
_________________
Anonymous wrote:
if it works, it works. if it doesn't, HAHAHA!
Back to top
View user's profile Send private message
Orion



Joined: 12 Jan 2007
Posts: 413
Location: Brazil

PostPosted: Mon Jan 18, 2010 11:03 pm    Post subject: Reply with quote

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:

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. Razz

But the second question I kinda don't know much, though.
_________________
There's no signature here. Stop looking for one.
Back to top
View user's profile Send private message
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Tue Jan 19, 2010 2:10 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message MSN Messenger
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Tue Jan 19, 2010 3:51 am    Post subject: Reply with quote

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


http://forums.inside3d.com/viewtopic.php?t=1874

(Obtained via: this Google query)
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Tue Jan 19, 2010 10:16 am    Post subject: Reply with quote

in regular quake, not all entities support movetype_walk, only players do. Are you sure your 'self' is really the player?
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
Urre



Joined: 05 Nov 2004
Posts: 1073
Location: Sweden

PostPosted: Tue Jan 19, 2010 1:17 pm    Post subject: Reply with quote

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.
_________________
Look out for Twigboy
Back to top
View user's profile Send private message Visit poster's website
mh



Joined: 12 Jan 2008
Posts: 910

PostPosted: Tue Jan 19, 2010 4:09 pm    Post subject: Reply with quote

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.
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Wed Jan 20, 2010 4:58 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    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