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

Changing Player model Goto page 1, 2, 3 Next

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
Ghost_Fang Joined: 12 Nov 2009 Posts: 162 |

Posted: Mon Feb 01, 2010 5:23 am Post subject: Changing Player model |

I have the chasecam added from the tutorial in the tutorial section, how would i make it so when it goes into chasecam, it also changed the player model, and back to the origonal when not in chasecam?

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Mon Feb 01, 2010 12:34 pm Post subject: |

setmodel (self, "progs/eyes.mdl"); setmodel (self, "progs/player.mdl"); setmodel (self, "progs/whatever.mdl"); _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

Ghost_Fang Joined: 12 Nov 2009 Posts: 162 |

Posted: Mon Feb 01, 2010 12:56 pm Post subject: |

i did that, well on the impulse, should i do it in the chasecam function?

Back to top |

c0burn Joined: 05 Nov 2004 Posts: 158 Location: Liverpool, England |

Posted: Mon Feb 01, 2010 1:06 pm Post subject: |

Don't use setmodel. Use modelindex, otherwise hulls will break and the player will clip through walls and stuff. Check client.qc for how it's done with the ring powerup.

Back to top |

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

Posted: Mon Feb 01, 2010 2:11 pm Post subject: |

if you use setmodel you should follow it up with setsize too, otherwise your player will fall into the floor and changing it back will make them stick (The mins size is used to offset the hull). Changing the modelindex directly means that any checks against the player's model name still work.
Either way, the ring code will overwrite your new modelindex every single frame.
_________________
What's a signature?

Back to top |

Ghost_Fang Joined: 12 Nov 2009 Posts: 162 |

Posted: Tue Feb 02, 2010 3:09 am Post subject: |

nothing happens, i did baker's way, i put that on impulse 15, and then when i messed with player index i got some really weird results....

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA |

Posted: Tue Feb 02, 2010 4:52 am Post subject: |

look at the invis code the way they do it is what you need to do. modelindex is the only proper way i know of to set a model. maybe try seeing if your new models are precahed? _________________ QuakeDB - Quake ModDB Group

Back to top |

Ghost_Fang Joined: 12 Nov 2009 Posts: 162 |

Posted: Tue Feb 02, 2010 5:15 am Post subject: |

My model was precached. What should i do since weapons.qc comes before client.qc? and that is one huge function, i only need a little bit form it, what would i do then?

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA |

Posted: Tue Feb 02, 2010 5:54 am Post subject: |

first tell me what your trying to change specifically and how? are you just trying to make a menu to choose different models from using impulses? ill take a look at the code and see what i come up with. _________________ QuakeDB - Quake ModDB Group

Back to top |

c0burn Joined: 05 Nov 2004 Posts: 158 Location: Liverpool, England |

Posted: Tue Feb 02, 2010 8:46 am Post subject: |

Ghost_Fang wrote:
nothing happens, i did baker's way, i put that on impulse 15, and then when i messed with player index i got some really weird results....

Look at PutClientInServer for how it's done. Also, delete the CheckPowersups() line in client.qc.

Back to top |

LonePossum. Joined: 02 Nov 2009 Posts: 38 |

Posted: Tue Feb 02, 2010 10:04 am Post subject: |

I believe from my understanding he was to Press and Impulse which switches the player model to a different model and goes into chasecam at the same time and then he wants to press the button again for it to switch back into firstperson and switch the player model back to the origianal model it switched from.
Another thing is that it must also reduce how tall the player is called. and then switch back to regular height.
This is not neccesary to do at this stage he is just wanting to get the switching into chasecam with the model change and switching back sorted out.
Hope that clears it up, I thought he said it rather straight forward.
Peace.

Back to top |

c0burn Joined: 05 Nov 2004 Posts: 158 Location: Liverpool, England |

Posted: Tue Feb 02, 2010 12:11 pm Post subject: |

Changing size won't work if you're thinking of crouching in Q1BSP anyway.

Back to top |

Teiman Joined: 03 Jun 2007 Posts: 309 |

Posted: Tue Feb 02, 2010 2:30 pm Post subject: |

If you ever change the player size, first use something to detect if that new box are valid points (not inside a solid), or you character will get stuck. DP as a special builtin to check solids inside "box's" (tracebox?)

Back to top |

Ghost_Fang Joined: 12 Nov 2009 Posts: 162 |

Posted: Wed Feb 03, 2010 4:33 am Post subject: |

OK.... this is wat i want: if (self.impulse == 15) { ccam(); and whatever i gotta do to change the player model here
}
ccam(); is done and working, i followed the tut from the tut section.
I did look at the invisible function in the powerups, and i didnt learn squat, i tried "setmodel (self, "progs/mball.mdl") and nothing happened
I do also want the hitbox size to change also, because its gona be a morphball just like in metroid prime (cause thats wat it is lol) so you can fit into smaller places.

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA |

Posted: Wed Feb 03, 2010 9:04 am Post subject: |

hmm, honestly im not sure if thats 100% possible (the hitbox thing idk. if im wrong someone correct me.). ill check into all of that. i got some coding for someone to do tomorrow. ill see about squeezing in time to see if i can replicate your code and get it all working, if i do ill post up how and explain everything.
_________________
QuakeDB - Quake ModDB Group

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT Goto page 1, 2, 3 Next
Page 1 of 3

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