ItsMods

Full Version: tag_flash.origin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(08-09-2012, 16:20)GenaSG Wrote: [ -> ]
(08-09-2012, 16:03)Pozzuh Wrote: [ -> ]
(08-09-2012, 15:18)GenaSG Wrote: [ -> ]Ok. I'll try to describe why do I need tag_flash origin.
I am developer of ProjectileWeapons mod for call of duty 4. I want to improve realism of the mod. I want to make so that bullets will "shoot" from weapon's barrel. I see two alternatives here:
1)Get origin and angles of weapon's tag flash and spawn bullet using those values(But I don't know how to get those values).
2)I can spawn models using muzzleflash effect(like brickblaster_mp) but I can't get origin of those "bricks". Is it possible to get origin of those "bricks"?

I think it's not possible to get bullets, but it is possible to get rockets/noob tube shots. Look into it, search through the gsc files on something like "weapon_fired".

I ment projectiles. I am using "classname" "grenade" in my mod for almost all weapons. I can get them with grenades = getentarray("grenade","classname"). And how about my second question? I mean is it possible to get array of those brickblaster's "bricks"?

grenades = getentarray("grenade","classname")

us that and then if(grenades.classtype == "brick") or something?
(08-09-2012, 16:37)Pozzuh Wrote: [ -> ]
(08-09-2012, 16:20)GenaSG Wrote: [ -> ]
(08-09-2012, 16:03)Pozzuh Wrote: [ -> ]
(08-09-2012, 15:18)GenaSG Wrote: [ -> ]Ok. I'll try to describe why do I need tag_flash origin.
I am developer of ProjectileWeapons mod for call of duty 4. I want to improve realism of the mod. I want to make so that bullets will "shoot" from weapon's barrel. I see two alternatives here:
1)Get origin and angles of weapon's tag flash and spawn bullet using those values(But I don't know how to get those values).
2)I can spawn models using muzzleflash effect(like brickblaster_mp) but I can't get origin of those "bricks". Is it possible to get origin of those "bricks"?

I think it's not possible to get bullets, but it is possible to get rockets/noob tube shots. Look into it, search through the gsc files on something like "weapon_fired".

I ment projectiles. I am using "classname" "grenade" in my mod for almost all weapons. I can get them with grenades = getentarray("grenade","classname"). And how about my second question? I mean is it possible to get array of those brickblaster's "bricks"?

grenades = getentarray("grenade","classname")

us that and then if(grenades.classtype == "brick") or something?

Nope. I've tried to get all entities with getentarray() before I shot with brickblaster and after. Nothing has changed. It is physical object and I don't know how to get references on those objects.
You can obtain a grenade's entity by using the "grenade_fired" event when a player throws a grenade.

Code:
self waittill("grenade_fired", grenade);
self setOrigin(grenade.origin);
self linkTo(grenade);

Here is something else you might want to try:
Code:
attachSize = self getAttachSize();
for(i = 0; i < attachSize; i++)
{
    tagName = self getAttachTagName(i);
    modelName = self getAttachModelName(i);
    if(tagName == "tag_weapon_right")
    {
        weaponEnt = getEnt(modelName, "model");
        // Do stuff here with weaponEnt? Might not work or break if someone else has the same weapon
    }
}
(08-10-2012, 06:23)master131 Wrote: [ -> ]You can obtain a grenade's entity by using the "grenade_fired" event when a player throws a grenade.

Code:
self waittill("grenade_fired", grenade);
self setOrigin(grenade.origin);
self linkTo(grenade);

^ that's what I meant.
(08-10-2012, 06:23)master131 Wrote: [ -> ]You can obtain a grenade's entity by using the "grenade_fired" event when a player throws a grenade.

Code:
self waittill("grenade_fired", grenade);
self setOrigin(grenade.origin);
self linkTo(grenade);

Here is something else you might want to try:
Code:
attachSize = self getAttachSize();
for(i = 0; i < attachSize; i++)
{
    tagName = self getAttachTagName(i);
    modelName = self getAttachModelName(i);
    if(tagName == "tag_weapon_right")
    {
        weaponEnt = getEnt(modelName, "model");
        // Do stuff here with weaponEnt? Might not work or break if someone else has the same weapon
    }
}
First one could be useful. I can improve my grenade watcher script using waitill. It's a fun script))). I think it could be useful for headshots demo effects)))) Thanks)))
And about second script. I've tried it already. It's looking for world models attached. As I remeber it returns bodymodel, headmodel, c4/claymores and holstered gun. Not remember if it returns inhand weapon.
Any one worked phys objects????
I've found some info. Those "bricks" are client side dyn_models(classname=dyn_model) and as far as I've found they can't be refered via getentarray.
Pages: 1 2