Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tag_flash.origin
#11
(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?
[Image: MaEIQ.png]
Reply

#12
(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.
Reply

#13
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
    }
}
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply

#14
(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.
[Image: MaEIQ.png]
Reply

#15
(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????
Reply

#16
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.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Request] ServerClient.Origin archit 4 3,540 09-19-2012, 01:35
Last Post: DidUknowiPwn
  Help Teleporting via Flags/Origin/Location yokai134 2 2,959 09-06-2012, 12:19
Last Post: yokai134
  [News] Origin still cracked d0h! 19 15,275 08-10-2012, 11:13
Last Post: d0h!
  I HATE ORIGIN!!! Arteq 10 6,851 03-17-2012, 22:30
Last Post: Pozzuh
  Distance(self.origin, location) not working? xplosiff 3 3,278 01-05-2012, 17:39
Last Post: xplosiff
  [Release] Battlefield 3 RETAIL/ORIGIN PLUS 14 TRAiNER dEViATED 2 4,688 11-19-2011, 12:56
Last Post: d0h!
  [Release] Battlefield 3 Multiplayer Without Origin Internal d0h! 13 26,549 11-02-2011, 01:02
Last Post: House
  How to change your Origin ID williamadinata 3 5,538 10-31-2011, 14:23
Last Post: OrangePL
  [Release] One Click - Kill Origin after BF3 has started d0h! 6 5,183 10-31-2011, 09:56
Last Post: d0h!
  Fucking Origin Pozzuh 13 12,556 10-05-2011, 15:11
Last Post: Pozzuh

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.