AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to move an entity without names (https://forums.alliedmods.net/showthread.php?t=126496)

t*stylez 05-09-2010 22:21

How to move an entity without names
 
How do i move an entity? But i don't want it to be able to move entities with special names.
Such as:
i got a
func_ladder and i want it to be movable but if it's name was (ex:) fat or fatter it couldn't be moved.

how would i do something like this?

wrecked_ 05-09-2010 22:34

Re: How to move an entity without names
 
What do you mean by "moved"? Just change its origin?

t*stylez 05-09-2010 22:39

Re: How to move an entity without names
 
no
like completely move, like ent mod does.

Exolent[jNr] 05-09-2010 22:41

Re: How to move an entity without names
 
You mean grab entities.
Also, what do you mean by "name" ?

t*stylez 05-09-2010 22:42

Re: How to move an entity without names
 
Quote:

Originally Posted by Exolent[jNr] (Post 1176118)
You mean grab entities.
Also, what do you mean by "name" ?

Correct, Grab entities
in maps, you have the option to name a entity,
like if you were using a button for something the button needs a target. and the target is the entities name
hope that makes sense

Exolent[jNr] 05-09-2010 22:46

Re: How to move an entity without names
 
Okay, I understand now.

All you need to do is just copy the code from say BlockMaker or JediGrab.

Then to check an entity's name, check it's targetname value:
Code:
new szTargetName[ 32 ]; // fakemeta pev( iEntity, pev_targetname, szTargetName, charsmax( szTargetName ) ); // engine entity_get_string( iEntity, EV_SZ_targetname, szTargetName, charsmax( szTargetName ) );

t*stylez 05-09-2010 22:53

Re: How to move an entity without names
 
alright exo thanks:]


All times are GMT -4. The time now is 03:32.

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