AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity origin (https://forums.alliedmods.net/showthread.php?t=185361)

Xalus 05-16-2012 08:44

Entity origin
 
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!

Waleed 05-16-2012 08:46

Re: Entity origin
 
What are you trying to do?

hornet 05-16-2012 09:02

Re: Entity origin
 
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?

Xalus 05-16-2012 09:18

Re: Entity origin
 
Yes.

hornet 05-16-2012 09:39

Re: Entity origin
 
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.

<VeCo> 05-16-2012 09:39

Re: Entity origin
 
pev_origin should work for point entities.

Xalus 05-16-2012 10:08

Re: Entity origin
 
Quote:

Originally Posted by <VeCo> (Post 1709913)
pev_origin should work for point entities.

Not for map entities?
They get automatic putted back to old origin on roundend?

<VeCo> 05-16-2012 10:50

Re: Entity origin
 
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).

ConnorMcLeod 05-16-2012 11:32

Re: Entity origin
 
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.


All times are GMT -4. The time now is 00:25.

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