Raised This Month: $ Target: $400
 0% 

Entities following others


Post New Thread Reply   
 
Thread Tools Display Modes
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 08-29-2007 , 10:16   Re: Entities following others
Reply With Quote #11

Well I've never used it before, but I have a vague idea of what it's about.

How likely is it that this would work ...
Missile spawn:
Code:
{      // ... create missile     register_think("wz_missile","wz_missile_step")     entity_set_float(missile,EV_FL_nextthink,halflife_time()+0.1)     // is there a "set_pev" equivalent for this? }

and then in wz_missile_step()
Code:
{     point_towards_player()     entity_set_float(missile,EV_FL_nextthink,halflife_time()+0.1) }

EDIT: Yes, yes it does
(although I moved the register_think to plugin_init - I think it's supposed to be there)

On a related note, since I am no longer using tasks I can't store the parameters I wanted to (who fired the missile, and whom it is targetting)
Is it considered bad practice to use "un-necessary" ent-variables to store un-related info?

e.g. using EV_ENT_owner to store its target?

Last edited by purple_pixie; 08-29-2007 at 10:28.
purple_pixie is offline
potatis_invalido
BANNED
Join Date: Jul 2007
Location: 0 (world)
Old 08-29-2007 , 13:41   Re: Entities following others
Reply With Quote #12

It's not a bad practice, if the ent variables aren't being used (like EV_INT_team & EV_INTE_frags).
potatis_invalido is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 08-30-2007 , 05:37   Re: Entities following others
Reply With Quote #13

Well clearly it's rather stupid to use required variables for it ^^

Otherwise I'd have to work out how to store all the data in global arrays ... and one large enough to fit any ent-id has got to be too big


EDIT: On second thoughts, might "iuser1...4" possibly be user-defined variables?

Last edited by purple_pixie; 08-30-2007 at 05:41.
purple_pixie is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-30-2007 , 09:36   Re: Entities following others
Reply With Quote #14

Quote:
Originally Posted by purple_pixie View Post
Well clearly it's rather stupid to use required variables for it ^^

Otherwise I'd have to work out how to store all the data in global arrays ... and one large enough to fit any ent-id has got to be too big


EDIT: On second thoughts, might "iuser1...4" possibly be user-defined variables?
Global Dynamic Arrays will be availabe in 1.8.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
potatis_invalido
BANNED
Join Date: Jul 2007
Location: 0 (world)
Old 08-31-2007 , 16:48   Re: Entities following others
Reply With Quote #15

Quote:
Originally Posted by potatis_invalido View Post
It's not a bad practice, if the ent variables aren't being used (like EV_INT_team & EV_INTE_frags).
As I wrote, they are NOT bing used, so you can store whatever you want in them (except for apple pie. Mm... apple pie!).
potatis_invalido is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 08-31-2007 , 18:13   Re: Entities following others
Reply With Quote #16

Quote:
Originally Posted by potatis_invalido View Post
As I wrote, they are NOT bing used, so you can store whatever you want in them (except for apple pie. Mm... apple pie!).
and then 2 plugins are using the same field...
not a good idea
__________________
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 09-03-2007 , 04:09   Re: Entities following others
Reply With Quote #17

If you make the entity yourself it's fair to assume noones going to be using those fields ... right?

As a general rule I can't see it as a great idea, but it should do fine here.
purple_pixie is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-03-2007 , 12:27   Re: Entities following others
Reply With Quote #18

Quote:
Originally Posted by purple_pixie View Post
If you make the entity yourself it's fair to assume noones going to be using those fields ... right?

As a general rule I can't see it as a great idea, but it should do fine here.
Yea, especially if you use you're using class names and not one from the game (i.e. "purplepixie_ent")
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
potatis_invalido
BANNED
Join Date: Jul 2007
Location: 0 (world)
Old 09-06-2007 , 13:16   Re: Entities following others
Reply With Quote #19

Quote:
Originally Posted by Greenberet View Post
and then 2 plugins are using the same field...
not a good idea
"if you use you're using class names and not one from the game (i.e. "purplepixie_ent")"
potatis_invalido 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 20:30.


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