Raised This Month: $12 Target: $400
 3% 

How do I do things with Entities?


Post New Thread Reply   
 
Thread Tools Display Modes
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 08-26-2005 , 04:01  
Reply With Quote #11

Aha, turn this:

Code:
velocity_by_aim(NewEnt, get_cvar_num("cell_maxspeed"), fVelocity)

into this:

Code:
velocity_by_aim(id, get_cvar_num("cell_diskspeed"), fVelocity)

By using id as the first parameter you use the player's angles instead of the uncreated entities angles. Also, you registered the cvar as diskspeed, but tried to use maxspeed.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 08-26-2005 , 04:12  
Reply With Quote #12

Dang, man thanks a million I would have never caught that error on my own! I really need to freakin study the engine class, so many functions, yet so little description... And I'll edit this post if I need help again with something =D. One more thing, isn't the entity created when I made the statement: create_entity("info_target")

BTW how can I improve my karma?
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 08-26-2005 , 04:52  
Reply With Quote #13

Okay, well I guess it isn't an uncreated entity, but it's angles are still 0, 0, 0. As for karma:

Quote:
Every day (24 hours) you can affect five people. Of those five people, you can only affect the same person three times. The first time you affect a person, it's for free. However, if you affect them again within a 24-hour period, you lose karma points - 1 if you give them karma, 2 if you subtract. This is to prevent people from going on vengeful karma-burning sprees.

If you have less than -10 karma, you cannot affect anyone else's karma negatively. If you have less than -15 karma, you cannot affect anyone else's karma at all. If you have less than -20, you are automatically assigned the rank of "Troll" (which will be removed once you get back above -20). Furthermore, you cannot post plugins. There is no limit to how negative or positive you can get.

For every rating on an approved plugin that you've posted, you can lose or gain karma. A rating of 3 or greater is +1, a rating of 1 is -1. A positive modifier (like Useful) is also +1, while a negative modifier like Redundant is -1.

The karma system is meant to be a way to reward people who make insightful posts and detract people from posting nonsense or annoying things. Use it as a reward system for people who do well :]
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 08-26-2005 , 06:28  
Reply With Quote #14

Nice, thanks for giving me the insights about karma, okay the disk works now, thanks to you it's actually moving. Now for the biggest step of all, make it follow wherever you aim, kind of like a heat-seeking missile except it doesn't follow the heat it follows wherever you aim!!! Now at this point I have no idea of how to do this. Do I need to set up a loop or something? And what function (most likely in the engine include, my feeling) can affect the direction of where an entity is moving?
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
DahVid
Senior Member
Join Date: Jun 2005
Old 08-26-2005 , 06:30  
Reply With Quote #15

+karma for attributing to the community.
DahVid is offline
DahVid
Senior Member
Join Date: Jun 2005
Old 08-26-2005 , 06:32  
Reply With Quote #16

get_user_aiming, I think you'd do a set_task on it so like every .1 seconds it follows the new one. Not positive.. I'd wait for someone like avalanche to post.
DahVid is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-26-2005 , 06:53  
Reply With Quote #17

Quote:
Originally Posted by DahVid
get_user_aiming, I think you'd do a set_task on it so like every .1 seconds it follows the new one. Not positive.. I'd wait for someone like avalanche to post.
thats a horrible way
Freecode is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 08-26-2005 , 07:00  
Reply With Quote #18

I have a theory, since velocityByAim is the function that sets what direction the entity will go, maybe I could include this in the loop like cell_disklife().

On a side note I just learned by a note thanks to freecode that RadiusDamage doesn't tell who killed you, makes you look like you committed suicide.

Well what do you guys think?
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
DahVid
Senior Member
Join Date: Jun 2005
Old 08-26-2005 , 07:03  
Reply With Quote #19

1. Possibly -- I've never used it so not sure.
2. Look at other 'fake gun' plugins, theres a message you can do so that you can make it say "Bla killed Bla with Bla" etc..
DahVid is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 08-26-2005 , 07:33  
Reply With Quote #20

FREAKIN GOOD NEWS GUYS! I tested out my theory, AND IT WORKS!!! OMG a miracle. Now, I got to add the explosion and stuff like that. And I got to update the loop task because it only changes the direction of the disk every second. I'll make it change direction every decisecond (1/10) of a second.
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
Reply


Thread Tools
Display Modes

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 12:00.


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