AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Thrown Grenade Types? (https://forums.alliedmods.net/showthread.php?t=64168)

Xenogenetics 12-09-2007 16:42

Thrown Grenade Types?
 
I am trying to figure out what differentiates a thrown henade entity from anyother type (gasnade, flashnade) in Counter-Strike. I tried to use entmod but the thrown henade shows up as a grenade, and when I try to spawn it I get what I am guessing is a generic grenade. All the generic grenade does is bounce and have the model from the half-life grenade launcher.

Is it a spawnflag or some keyvalue that I need?

help plz.

purple_pixie 12-10-2007 04:33

Re: Thrown Grenade Types?
 
How to create one?
Not entirely sure.

The general method people use to find out what it is is the model.

ConnorMcLeod 12-10-2007 06:06

Re: Thrown Grenade Types?
 
I guess you have to do this :

Set the classname to armoury_entity
Set the model to w_hegrenade.mdl

Then you have to set the armoury offset :

#define OFFSET_ARMOURY_TYPE 34
#define EXTRAOFFSET_WEAPONS 4
#define CSA_HEGRENADE 15

set_pdata_int(entity, OFFSET_ARMOURY_TYPE, CSA_HEGRENADE, EXTRAOFFSET_WEAPONS)


The last part can be done with native cs_set_armoury_type if you use cstrike module.

Wilson [29th ID] 12-10-2007 07:20

Re: Thrown Grenade Types?
 
You still have to figure out how to prime it though. In DoDx, we have natives for that. Not sure what they do off the top of my head, but you can check out the dodx source - it probably alters the grenades pdata somewhere.

purple_pixie 12-10-2007 07:35

Re: Thrown Grenade Types?
 
I thought you just set nextthink.

I'm almost sure that's what you change to delay it, so I should assume (great idea ... ) that's all that's needed to prime it.

ConnorMcLeod 12-10-2007 08:04

Re: Thrown Grenade Types?
 
My bad, i just explained how to make a henade that you can pick up...

So i think that this could be usefull : http://forums.alliedmods.net/showpos...9&postcount=91


All times are GMT -4. The time now is 11:12.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.