Raised This Month: $51 Target: $400
 12% 

[SOLVED] Change entity angle and origin - backweapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
joselitostrike
Junior Member
Join Date: Jan 2005
Old 10-14-2006 , 13:42   [SOLVED] Change entity angle and origin - backweapon
Reply With Quote #1

I'm trying to find a solution for the plugin back weapons by cheap_suit to not use custom models and use w_ models, so far i can't get nothing. I tried changing the origin with entity_set_origin but dunno what is wrong.

Code:
if(g_bwEnt[id] < 1)
	{
		g_bwEnt[id] = create_entity("info_target")
		if(g_bwEnt[id] > 0)
		{
			new float:test[3]
			entity_get_vector(id, EV_VEC_origin,test)
			entity_set_origin(g_bwEnt[id], test)
			entity_set_int(g_bwEnt[id], EV_INT_movetype, MOVETYPE_FOLLOW)
			entity_set_edict(g_bwEnt[id], EV_ENT_aiment, id)
			test[1] += 500.0 // numbers just for test
			test[2] += 9998.0
			entity_set_origin(g_bwEnt[id], test)
		}
	}
Any other idea to change the angle and origin are welcome.
__________________
HAMACHI:

Last edited by joselitostrike; 10-15-2006 at 19:22.
joselitostrike is offline
joselitostrike
Junior Member
Join Date: Jan 2005
Old 10-14-2006 , 18:02   Re: Change entity angle and origin - backweapon
Reply With Quote #2

Another question, how do i make a model invisible using fakemeta, so far on engine i used set_entity_visibility.

EDIT: After trying a little more things with fakemeta, i think that's not possible to change the angles using the current method for the model follow the player.

It must be something with amxx or the hl1 engine that doens't let you add angles to the info_target model. Their angles just follow the player angles, and if you think in using another method, i'm pretty sure it will lag a lot.
__________________
HAMACHI:

Last edited by joselitostrike; 10-14-2006 at 18:38.
joselitostrike is offline
diamond-optic
Veteran Member
Join Date: May 2005
Old 10-15-2006 , 11:29   Re: Change entity angle and origin - backweapon
Reply With Quote #3

Quote:
Originally Posted by joselitostrike View Post
Another question, how do i make a model invisible using fakemeta, so far on engine i used set_entity_visibility.

heres a stock i use that is from VEN's fakemeta_util

Code:
stock fm_set_entity_visibility(index, visible = 1) 	//from fakemeta_util
{
	set_pev(index, pev_effects, visible == 1 ? pev(index, pev_effects) & ~EF_NODRAW : pev(index, pev_effects) | EF_NODRAW)

	return 1
}
if you dont want to just use the stock, it at least shows you how to do it...
__________________
diamond-optic is offline
joselitostrike
Junior Member
Join Date: Jan 2005
Old 10-15-2006 , 18:28   Re: Change entity angle and origin - backweapon
Reply With Quote #4

Thx diamond-optic, i followed what you said and found out that using pev_effects have solved my problem. From back weapons by cheap_suit:

Code:
if(equal(modelName, "models/pshell.mdl"))
			{
				set_pev(g_bwEnt[id], pev_effects, EF_NODRAW)
				return PLUGIN_CONTINUE
			}
			
			set_pev(g_bwEnt[id], pev_effects, 0)
About the problem with the angles and origin of the weapon model that is set to MOVETYPE_FOLLOW, it follows the aiment entitie. The only fix possible is suggesting a new feature, which will be change the origin and angle of a MOVETYPE_FOLLOW.

Don't know if there's another way, because getting the player origin and angles to use with another entitie doesn't do the same effect. Even if you set a task to the minimum time.
__________________
HAMACHI:
joselitostrike is offline
diamond-optic
Veteran Member
Join Date: May 2005
Old 10-16-2006 , 09:58   Re: [SOLVED] Change entity angle and origin - backweapon
Reply With Quote #5

i tried to do the same thing when he released that..

i wanted to use it for dod but also didnt want to have a whole lot of models to download (plus that would put me well over the precache limit) but it seems i ran into the same problems you are :-) so i gave up and moved on lol
__________________
diamond-optic is offline
v3n1n
Junior Member
Join Date: Nov 2006
Location: France
Old 11-15-2006 , 08:39   Re: [SOLVED] Change entity angle and origin - backweapon
Reply With Quote #6

Just a question I ask :

The backpack w_ model :

[IMG]http://img218.**************/img218/4650/backpacksd7.th.jpg[/IMG]

Look at the ground position (the backpack is on the ground) but in the game it can be in the back of terrorist and on the ground. Can't the origin or I don't know what can't be used with that ?
__________________
[ Me this ♫♪ ! ][ 84 ][NJS4E]

Last edited by v3n1n; 11-15-2006 at 12:00.
v3n1n is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 11-15-2006 , 10:41   Re: [SOLVED] Change entity angle and origin - backweapon
Reply With Quote #7

No, it's controlled by the body pev. It's hardcoded into the T-models.
VEN is offline
v3n1n
Junior Member
Join Date: Nov 2006
Location: France
Old 11-15-2006 , 11:56   Re: [SOLVED] Change entity angle and origin - backweapon
Reply With Quote #8

Oh I see ! :'( too bad for now...
__________________
[ Me this ♫♪ ! ][ 84 ][NJS4E]
v3n1n is offline
SoulWeaver16
Senior Member
Join Date: May 2021
Location: Uruguay
Old 06-02-2021 , 14:58   Re: [SOLVED] Change entity angle and origin - backweapon
Reply With Quote #9

What was the plugin or how was it resolved?
SoulWeaver16 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-02-2021 , 18:02   Re: [SOLVED] Change entity angle and origin - backweapon
Reply With Quote #10

Quote:
Originally Posted by SoulWeaver16 View Post
What was the plugin or how was it resolved?

As it seems the author of the thread didnt really bother to post the solution but here is a side solution

https://forums.alliedmods.net/showpo...7&postcount=10
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:02.


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