Or you could do it this way.
Seven, you slick dude.
Announcement
Collapse
No announcement yet.
Help with weapon drops
Collapse
X
-
just saw this was a double post, i replied to your other thread here => http://quakeone.com/172805-post2.html
Leave a comment:
-
Yes.
I use fteqccgui as somtimes in notepad everything appears like the text was smashed together.
Leave a comment:
-
hello ijazz
First you need to know why your qc is not compiling
are you using fteqccgui??
Index of /moodles/fteqcc
fteqccgui can give you clues about your errors
Leave a comment:
-
Thanks seven,
I added 3 new models.Didnt compile yet but they are backpack_extra,backpack_extra1 and backpack_extra2.
Also could you be a little more clear with the check is positive / negative part? Please?
Leave a comment:
-
Hello ijazz,
You can drop whatever model you want and give it whatever ammo you need.
You are free to use different dropped models and ammo for different monster types.
This is what you need to do for the grunt:
- precache your new model (grunt_backpack.mdl) inside worldspawn()
- change all other DropBackpack() calls in the .qc files: ogre.qc, player.qc and enforcer.qc from DropBackpack() into DropBackpack(0)
- edit the code inside your grunts death animation frames where the backpacks are called: army_die3() and army_cdie3()
Make a check for the entities spawnflag, as you like.
If the check is positive, add the custom ammo amount and type of your choice and call the backpack function but with an additional float:
DropBackpack(1);
If the check is negative, use the original ammo amount and type and call the backpack function but with an additional float:
DropBackpack(0);
- go into items.qc and change the function:
void() DropBackpack =
into:
void(float custommodel) DropBackpack =
- replace:
with:Code:setmodel (item, "progs/backpack.mdl");
Code:if (custommodel == 1) setmodel (item, "progs/grunt_backpack.mdl"); else setmodel (item, "progs/backpack.mdl");
If you want to extend the code for enforcer, ogre, or any other monster, you need to give each monster an individual custommodel float number (example: enforcer= 2, ogre= 3, and so on) in their death animation function to be able to seperate the models in the DropBackpack function.
You can even use multiple backpack models for each monster type, just give them individual custommodel numbers in their calls.
I didnt compile and test the above code, but it should work.
If you want to go crazy about custom backpacks you can also read the source of the smc, as the smc has the option to use custom backpacks as well. Be aware that smc uses custom backpack physics and movement, so the code is much more complex.
Good luck,
Seven
EDITED:
No, insideqc´s tutorials normally do not make mods uncompilable. You most probably did something wrong.Originally posted by ijazz View PostInsideQC's tut once made my mod uncompilable.
And if your mod will become uncompilable, then listen to the error message the compiler gives you !
Fix your error and the compiler will be greatful and compile a nice little progs.dat for you.
Remember, the compiler is your friend. So listen to him and his warnings and error messages.
Leave a comment:
-
Help with weapon drops
I want to make Grunts,Enforcers and Ogres drop weapons with a certain spawnflags.Grunts drop 5 shell shotguns,Enforcers drop semi auto laser guns and Ogres drop chainsaws or GL and Soldier(custom enemy) drop ssg's.
Can yo uguys tell me what to add,delete and change here?
InsideQC's tut once made my mod uncompilable.Tags: None
Leave a comment: