Raised This Month: $ Target: $400
 0% 

entity changing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Acid07
Member
Join Date: May 2009
Old 08-19-2009 , 17:24   entity changing
Reply With Quote #1

hey i was wondering how i could search all the entities in a map and replace them with a different entity with the same position and angles? eg prop_dynamic to prop_physics? also would it need to do this every round or just on map start?
Acid07 is offline
DaFox
Senior Member
Join Date: Mar 2005
Old 08-19-2009 , 19:28   Re: entity changing
Reply With Quote #2

Using Stripper:Source would be a good start.
http://www.bailopan.net/stripper/
__________________
Quote:
Originally Posted by Peoples Army
your from Finland? what country is that in?
DaFox is offline
Acid07
Member
Join Date: May 2009
Old 08-20-2009 , 03:29   Re: entity changing
Reply With Quote #3

its for my own plugin that does other things aswell and i was hoping for it to have preset entity types that are built in.
Acid07 is offline
javalia
Senior Member
Join Date: May 2009
Location: korea, republic of
Old 08-20-2009 , 06:10   Re: entity changing
Reply With Quote #4

you cant do it in direct way
becaus prop_dynamic or other things are
ummm.. to say, short name of
c++ class.
so you should make another entity,
and copy datas that you need from entity to copy from.
make sense?
javalia is offline
Acid07
Member
Join Date: May 2009
Old 08-20-2009 , 13:04   Re: entity changing
Reply With Quote #5

yeah how do i get the entitys positions and angles?

also how do i cycle through the entities?
Acid07 is offline
DaFox
Senior Member
Join Date: Mar 2005
Old 08-20-2009 , 15:26   Re: entity changing
Reply With Quote #6

Quote:
Originally Posted by Acid07 View Post
yeah how do i get the entitys positions and angles?

also how do i cycle through the entities?
TeleportEntity:
http://docs.sourcemod.net/api/index....ad=show&id=40&

and

PHP Code:
new ent = -1
while((ent FindEntityByClassname(ent,"prop_dynamic")) != -1)  {
    
//Found an entity, touch it in bad places here.

__________________
Quote:
Originally Posted by Peoples Army
your from Finland? what country is that in?
DaFox is offline
Chris-_-
SourceMod Donor
Join Date: Oct 2008
Old 08-20-2009 , 17:30   Re: entity changing
Reply With Quote #7

Your snippet ain't long enough to be touched in bad places DaFox, feel free to let your imagination go crazy on that one
Chris-_- 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 10:30.


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