Forum

weapon coding questions

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

weapon coding questions

Postby Freemanoid » Tue Mar 10, 2009 9:56 pm

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^
Freemanoid
 
Posts: 52
Joined: Mon Jun 16, 2008 11:25 am
Location: BELARUS

Postby Lardarse » Wed Mar 11, 2009 12:17 am

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).
User avatar
Lardarse
 
Posts: 266
Joined: Sat Nov 05, 2005 1:58 pm
Location: Bristol, UK

Postby Freemanoid » Wed Mar 11, 2009 6:55 am

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.
Freemanoid
 
Posts: 52
Joined: Mon Jun 16, 2008 11:25 am
Location: BELARUS


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest