Raised This Month: $ Target: $400
 0% 

Solid entity follows player, and when touches him, does dmg


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LynX
Veteran Member
Join Date: Oct 2004
Old 04-26-2005 , 13:46   Solid entity follows player, and when touches him, does dmg
Reply With Quote #1

Okay, I need a help. I'm trying to make a plugin with all sorts of pickups, etc.

So, idea for this thing is to create entity which has his own model, his speed and is solid, and when entity is released by owner player, it catches closest enemy and when touches him does the damage.
So, mine questions are:
How to make that entity stays close to players origin untill player releases binded button for creationg of entity? SO, basic idea is while your holding pressed button, it isn't released, and when you release the button it will launch?
How to give that entity its own speed?
How to make it follows closest enemy?
How to make it that when it touches something it explodes and if its player damages him?

Thanks alot .
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Cronck
Member
Join Date: Apr 2005
Old 04-26-2005 , 15:09  
Reply With Quote #2

If im not wrong, this would be crappy if you aren't going to use waypoints for the etinity like bots do...
Cronck is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 04-26-2005 , 15:22  
Reply With Quote #3

No, it won't be crappy because for mod I'm making for it maps have ALOT of space.
Or, if it would be easier for you guys - just show me how can I make it that it goes on spot I looked after I released entity ( it should not follow crosshair position ).
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Ced
Member
Join Date: Oct 2004
Old 04-26-2005 , 17:17  
Reply With Quote #4

give it speed by setting its velocity. Look at the beyonder superhero for a reference for moving and following a player, but be sure to give credit. And for the two entities touching, use
Code:
pfn_touch( ptr, ptd )
Ced is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 04-27-2005 , 02:05  
Reply With Quote #5

Well, I'm gonna look. BUt how to make when it touches player it kills him?
And I think setting speed of entity can be done with entity_get_int ?
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
LynX
Veteran Member
Join Date: Oct 2004
Old 04-27-2005 , 02:52  
Reply With Quote #6

Okay, I got this:

Code:
#include <amxmodx> #include <engine> #include <fakemeta> public plugin_init() {     register_plugin("Entity spawn","0.1","EncorE_SX")     register_clcmd("spawn_custom","create")     return PLUGIN_CONTINUE } new iEntity[33] public create(id) {     new origin[3]     get_user_origin(id, origin[3],0)     new Origin = origin[2] + 10.0     iEntity[id] = create_entity("info_target")     entity_set_string(iEntity[id], EV_SZ_classname, "TestEntity")     entity_set_model(iEntity[id], "sprites/custom.spr")     entity_set_origin(iEntity[id], genericOrigin )     return PLUGIN_HANDLED } public plugin_precache() {     precache_model("sprites/custom.spr")     return PLUGIN_CONTINUE }

Now, it gives tons of errors... Can you guys fix it for me?
AND, how do I make it goes directly on position I'm looking at ( where crosshair is ). Or, how to make it go on position where I looked at while launching was in progress... HELP...
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
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 16:45.


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