View previous topic :: View next topic |
Author |
Message |
Ghost_Fang
Joined: 12 Nov 2009 Posts: 162
|
Posted: Thu Jan 21, 2010 7:41 am Post subject: 2 simple (i promise) questions |
|
|
Ok really simple, again, im only asking cause of the lack of my .qc syntax knowledge.
1.When i shoot i wanna spawn a model.spr sprite for a muzzle flash.
Whats the code that creates a model, and how would i set it for like a split second.
2. Broken animation, i replaced an enemy model with my own, i matched every frame perfectly, even the names. But when i kill them, they play the death sequence perfectly, but then pop right back up to death1 frame (but they are still dead) how would i fix this?
Thanks in advance |
|
Back to top |
|
 |
c0burn
Joined: 05 Nov 2004 Posts: 158 Location: Liverpool, England
|
Posted: Thu Jan 21, 2010 7:44 am Post subject: |
|
|
1) spawn()
2) The simple answer is you didn't match it. |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA
|
Posted: Thu Jan 21, 2010 8:16 am Post subject: |
|
|
also might want to check out the grenade launcher code or the rocket launcher. its almost exactly what you want. the just use what ever they use to set the grenade code and replace the grenade.mdl with your sprite. _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
Error Inside3D Staff

Joined: 05 Nov 2004 Posts: 558 Location: VA, USA
|
Posted: Thu Jan 21, 2010 11:41 am Post subject: |
|
|
question 2)
c0burn is right, you didn't match the frames exactly. let me make some points about frames:
1. using $stand1 style frame macro things does not have anything to do with the naming of frames in models
2. frame groups (as seen in your model editor), don't matter at all, even the names of them, while coding
Example:
Now, in this image you see all these frames.
In QC, you would use frame macros like this:
Code: | //
// running
//
$frame axrun1 axrun2 axrun3 axrun4 axrun5 axrun6
$frame rockrun1 rockrun2 rockrun3 rockrun4 rockrun5 rockrun6
|
"$axrun1" is actually equal to frame number 0, as axrun3 would equal frame number 2.
the order of the frames is what matters. if there is any frame before $axrun1 in your model, it then would turn into $axrun1 or frame number 0.
I'm officially tired and probably didn't get that out right. can someone please help or clarify? _________________ Inside3D : Knowledge Is Power
Darkplaces Documentation Wiki |
|
Back to top |
|
 |
Ghost_Fang
Joined: 12 Nov 2009 Posts: 162
|
Posted: Thu Jan 21, 2010 2:53 pm Post subject: |
|
|
I have already given Ceriux my model, he took a look at it and he even said the frames match up perfectly
edit: i fixed it, i needed to add a frame, but still, i matched it up, even ask Ceriux.
Edit2: I looked and looked at both missile functions and i cant quite figure out how to manipulate it for my muzzle flash. it has a lot of all this extra stuff. How would i go about defining a new entity? would it be something like this??
.string mflash =
setmodel ("misc/mflash.spr")
setorigin (0, 0, 0)
Like that? lol, im lost atm. |
|
Back to top |
|
 |
|