Raised This Month: $ Target: $400
 0% 

Entity origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-16-2012 , 08:44   Entity origin
Reply With Quote #1

Hello,

Is there a way to change the start position of an map entity?

For example: xPaw made plugin so U cant move map weapos / grenades with scooter.
Without U could move them to another spot, and they will always spawn there.

I try'd:
pev_origin
pev_oldorigin
pev_basevelocity
...

Nothing rlly worked.


Thx anyway!
__________________
Retired.
Xalus is offline
Waleed
Senior Member
Join Date: May 2012
Location: Pakistan
Old 05-16-2012 , 08:46   Re: Entity origin
Reply With Quote #2

What are you trying to do?
Waleed is offline
Send a message via Skype™ to Waleed
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-16-2012 , 09:02   Re: Entity origin
Reply With Quote #3

Are you saying that you want eg. If I pick up a weapon in fy_iceworld run across the map, and then either die and / or drop my weapon, the round ends, and then it's supposed to spawn where it landed on the next round?
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-16-2012 , 09:18   Re: Entity origin
Reply With Quote #4

Yes.
__________________
Retired.
Xalus is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-16-2012 , 09:39   Re: Entity origin
Reply With Quote #5

I believe the only way is that your going to have to loop through all weapon entities on round end and save their origin, and then set them on the next round.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-16-2012 , 09:39   Re: Entity origin
Reply With Quote #6

pev_origin should work for point entities.
__________________
<VeCo> is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-16-2012 , 10:08   Re: Entity origin
Reply With Quote #7

Quote:
Originally Posted by <VeCo> View Post
pev_origin should work for point entities.
Not for map entities?
They get automatic putted back to old origin on roundend?
__________________
Retired.
Xalus is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-16-2012 , 10:50   Re: Entity origin
Reply With Quote #8

I've tested now:

Changing pev_oldorigin to the same value as the origin will prevent them from resetting on their original places on new round.
For setting the origin, use EngFunc_SetOrigin, else only the entity models will be moved.

EDIT: Actually, you don't need to set oldorigin (I even think it's not used for anything).
__________________

Last edited by <VeCo>; 05-16-2012 at 10:52.
<VeCo> is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-16-2012 , 11:32   Re: Entity origin
Reply With Quote #9

Ground weapons on fy_ maps are "armoury_entity" entities, when you touch such entities, you are being given a real weapon, but armoury entity stay at the same place and become invisible and untouchable.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
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 00:25.


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