View previous topic :: View next topic |
Author |
Message |
Freemanoid
Joined: 16 Jun 2008 Posts: 52 Location: BELARUS
|
Posted: Tue Mar 10, 2009 9:56 pm Post subject: weapon coding questions |
|
|
All greetings. I want to set some questions.
1) How to make so that the weapon moved to the left to the right at movement of the player (as in Quake 3) ?
2) How to make so that the weapon slowly moved to the different sides when the player stands on a place?
3) How to make so that during shooting the screen twitched (feedback from the weapon)?
I am creating game for PPC so such programs as darkplaces cannot be used. _________________ ^O,..,o^ |
|
Back to top |
|
 |
Lardarse

Joined: 05 Nov 2005 Posts: 243 Location: Bristol, UK
|
Posted: Wed Mar 11, 2009 12:17 am Post subject: |
|
|
1 and 2 can't be done purely from the QC. You will need to modify the model that is used as the player's displayed weapon. 1 Can be done in some engines (that have cvars for the position of the gun).
For 3, the only one that exists is an automated way is punchangle. Weapon firing functions set this to somewhere between -2 and -4, to give a slight backwards kick to the view. For a bigger kick, increase make the number more negative (but remember that it will only readjust slowly. Set it to -90 when you fire the shotgun and you will see what I mean). |
|
Back to top |
|
 |
Freemanoid
Joined: 16 Jun 2008 Posts: 52 Location: BELARUS
|
Posted: Wed Mar 11, 2009 6:55 am Post subject: |
|
|
So as I understand I have to create some animation for weapon and place it to the game?
But how can it be made? I don't know how to use special animation in special cases. |
|
Back to top |
|
 |
|