Heres a combo system I made myself a year or two ago.
Its a bit dusty, but it should be pretty easy to figure out.
I'm also including a weapons charging code I made.
http://dl.dropbox.com/u/1776436/Q1forums.zip
You also might ask RennyC as he's done this kind of thing before.
[ame=http://www.youtube.com/watch?v=_DJLHbp118A&list=UUUG7Jt98SSSqG8QpXMM8ckg& index=4&feature=plcp]Street Fighter 2 Quake - YouTube[/ame]
Announcement
Collapse
No announcement yet.
QC Coders - Question to you!
Collapse
X
-
little stuff like this I redefined in my head long ago according to languages I know. think/nextthink combo (in my world) is just a timer. No different than:
Originally posted by javascriptvar nextthink = 3000; //milliseconds
var jsthink = setTimeout("think()",nextthink);
function think()
{
clearTimeout(jsthink); //automatic in Quake upon "thinking"
//code - which may include restarting the timer
}
psssh - I just invented the beginnings of QJS.Last edited by MadGypsy; 06-02-2012, 02:45 AM.
Leave a comment:
-
.nextthink is usually used for animations, though in it's rudest from is just a splice in time to do something when the entity think func is called. You can create an ent ( ent = spawn() ) then set the nexthink to time + x and it will call the .think func then.Originally posted by MadGypsy View PostNextthink that checks if the button is pressed and increments or decrements velocity accordingly up to a predefined number of thinks would be my guess.
Leave a comment:
-
Nextthink that checks if the button is pressed and increments or decrements velocity accordingly up to a predefined number of thinks would be my guess.
Leave a comment:
-
^^^Originally posted by MadGypsy View PostAs far as I know you can make an impulse for anything. You could fill up the entire keyboard with impulses. So, my answer would be - you could have an 8 armed monster and have a button for each hand.
Gypsy
^^^
How about a charged jump?
Lets say I want my model(in-game) to jump 1 unit high, I tap the jump button and my model jumps 1 unit high.... but if I wanted him to jump higher I press and hold the jump button resulting in a spring bring pulled back effect... the longer I hold jump, the higher I jump... Possible? I hope so!
Leave a comment:
-
As far as I know you can make an impulse for anything. You could fill up the entire keyboard with impulses. So, my answer would be - you could have an 8 armed monster and have a button for each hand.
Gypsy
Leave a comment:
-
I've resolved all issues regarding QME, thanks!
I'll ask my question to MadGypsy publicly to get some extra input...
Can there be 2 separate fighting buttons punching and kicking? or can there only be one attack?
Leave a comment:
-
I've ran into a wall here.
I am useing QMe 3.0 lite version and I can't seem to find the full version... It did get released to the public right?
Right now I have my run animation working as well as a forward flip(jump) animation.
It's pretty simple to add new frames on "frame_16 frame_17 etc etc etc...
But Qme only allows me to save 20 frames max... so far this seems like the only limit I've ran into.
Can anyone provide me with QMe 3.0 full version if it's free or an alternative? Thanks!
Leave a comment:
-
I don't know the answer to that but I can logically speculate some stuff
1) adding more frames will not create smoother animations, it will create longer ones and in most cases the results will be an animation that looks too slow
2) every engine is a little different so what one engine may be able to handle might break a different one
3).md3 is just a model format it shouldn't change the amount of frames allowed in an animation
I basically guessed all of this and I may be wrong.
Michael
Leave a comment:
-
What are the frame limits for the animations, there seems to be some confusion as some of us thought that it was 8 and some said 16.If md3 models are used can the engine take advantage of any more?
Leave a comment:
-
Okey doke I wanted to make this to where you didn't have to rely on me every time you want to test a new character animation so there is a lil bit of a process here (not too bad).
1) download this. I stripped quake of damn near everything except your mod and packaged it ready to go with a standalone darkplaces. All you have to do is unzip it and click ..\QungFu\go.bat
2) editing my QC is also uber simple. You only need to change 1 file (playerX.qc) and you only need to ever change 4 lines in that file. It can be found in QungFu\develop\playerX.qc.
this line:
leave "$frame" alone and add all the frames labels of your entire model after it. DO NOT press enter until the very end of the line. If you absolutely must break the frame into lines declare $frame on the new line first like:Code:$frame frame_1 frame_2 frame_3 frame_4 frame_5 frame_6 frame_7 frame_8 frame_9 frame_10
Code:$frame frame_1 frame_2 frame_3 frame_4 frame_5 frame_6 frame_7 frame_8 frame_9 frame_10 $frame frame_11 frame_12 frame_13 frame_14
Now this line
AND this lineCode:void() playerX_run =[ $frame_1, playerX_run ]
I know it's a lil weird that $frame_1 now has a $ in front of it but that's just how it works. Change this to the label of the frame you want to start from preceeded by a $. (just like above)Code:self.frame = $frame_1 + self.walkframe;
and finally this line
change the number 9 to the number of frames in your animation (this is an oops and should be a 10 {currently})Code:if (self.walkframe == 9)
now save it, close it and start QungFu\develop\fteqccgui.exe...click compile. Scroll the lil bar when it's done and make sure there is no red wording. If you have red wording (errors) it's because you maybe deleted one of my commas or a bracket by accident, just put it back and compile again. All of your code should look identical to mine with the exception of adding frame labels, changing the start frame and that one number. The four warnings (green wording) for dpextensions are harmless just ignore them.
Make sure you named your "new" model playerX.mdl and it is in pak0.pak/progs. click go.bat and see your changes.
Hit meup when you have a model with a handful of concrete animations and I will write the actual and proper .qc for it. The qc you are using is the best I could do to make it so you could test all your animations in quake without needing a coder every step of the way. Oh! you can also change the values in the setsize function to be the ones that I recommended you check in qME earlier
respectively
setsize(self, 'all frames lower values', 'all frames upper values');
you'll see when you read it. I'm sorry that it took me 2 hours to get this together. I went to make a bare bones box with a light to display your model in and I wound up just playing with radiant (lol). I did you a little better than a box but it's still pretty crappy.
Gypsy
edit: I left my config.cfg in by accident. I use numpad (8=forward, 4=strafe left, 5=backpedal, 6=strafe right) and mouse (=freelook, left click=fire, right click=jump) - of course you can easily change all this but I figured i would throw out the info so you can move around right away instead of spending time configging stuff.
double edit: don't press fire. I'm not sure what i deleted but pressing fire drops darkplaces. there is nothing to kill anyway.
triple edit: I think I know what I did. I didn't declare a th_pain on the model so when you shoot it the game crashes. You can press fire, just don't shoot playerX. There is still nothing to kill (lol).Last edited by MadGypsy; 06-01-2012, 05:09 AM.
Leave a comment:
-
I take ZERO credit for that model. Phenom made that model, I just wrote the QC to get it in the game. It's a side of QC that I never really had to mess with (as my models are waaay too big in polygon count). So, it was fun spending the 15 minutes to figure out how to do it. Maybe it's because I have an extensive programming background, but QC to me isn't all that challenging.Gypsy, your model is not too bad, thanks for sharing.
Imma make a lil commercial for QC real quick that maybe only nerds like me can enjoy
"5 amazing var types that double as field types if you add a dot! Write a function! With our revolutionary underscore syntax you can parse coordinate values from vectors! Act now and we will throw in 2 different comment types!
I know what you are thinking - a system this stripped down to nothing must be incredibly expensive but we will give you the function, the var and field types, the underscore syntax that is used with like 3 keywords AND the 2 comment types for - not 49.99, not 29.99 but ABSOLUTELY FREE!
if you are not absolutely satisfied
"Code:void() func_you_up = { bprint("tough shit"); }
Well, that was fun but now I gotta go make good on my earlier post. I'll be back in a bit.
Leave a comment:
-
True the engine controls all the player model animation, but you may be able to hack / speed up the animatiojn if you add: if (self.frame == (the walk frame numbers) self.frame = self.frame + 1 in player prethink or whatever.
Gypsy, your model is not too bad, thanks for sharing. If you want a cute little side project, see if you can make the player model with some jump frames...so that when playerjump () is called inthe QC, he kneels down in a few frames before jumping. I hacked my mod so that when he's at the hheight of the jump he becomes frame #69 briefly.....looks ok.
BTW, not all the frames are setsized differently, so #69 for example ought to have a resize call again setting the bounding boxes smaller. I am messing with some new code : void (entity n) Setsizeformodlel
...where I will just call that on an entity spawn so that it sets the size I want. I am not sure but someone said on another forum you dont even need setsize as the engine will do it for you, but with DP, I dont see that happen at all. Somoene also said .modelindex will set the model, but not sure how that works.
Originally posted by MadGypsy View Postyou can't control animation speed, it is an engine thing.
Leave a comment:
Leave a comment: