Raised This Month: $ Target: $400
 0% 

NS Auto-comm


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JPiolho
Member
Join Date: Dec 2004
Location: Portugal
Old 01-16-2005 , 17:43   NS Auto-comm
Reply With Quote #1

I am trying do a automatic commander to marines, is going fine but I have a little problem, when a player get nearby a resource node a resource tower is created, after 1 sec other resource tower is created and the 2 resources towers are killed because a command I created, but I only want know how to check if the node have already 1 resource tower

I spend 3 hours trying to fix, but nothing

plz help-me
JPiolho is offline
Send a message via MSN to JPiolho
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-16-2005 , 18:45  
Reply With Quote #2

Try using find_ent_in_sphere or find_sphere_class to check for nearby resource tower entities.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
JPiolho
Member
Join Date: Dec 2004
Location: Portugal
Old 01-17-2005 , 15:54  
Reply With Quote #3

find_ent_in_sphere ( StartEntity, Floatrigin[3], Float:radius )

what StartEntity means?
JPiolho is offline
Send a message via MSN to JPiolho
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-17-2005 , 20:39  
Reply With Quote #4

StartEntity is an offset to start searching from (+1), so you can create a loop to find all of the entities like this:

Code:
new ent; while((ent = find_ent_in_sphere(ent,origin,radius)) != 0) {  // ent would be the current entity }

This will reassign a value to ent each time through and make sure not to search through what it has already searched, and it will stop the loop if you can't find any more entities passed the offset.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
JPiolho
Member
Join Date: Dec 2004
Location: Portugal
Old 02-05-2005 , 05:42  
Reply With Quote #5

Is there any way to change or check marine resources?
JPiolho is offline
Send a message via MSN to JPiolho
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-05-2005 , 12:24  
Reply With Quote #6

ns_get_res might be able to grab Marine resources, but I don't think ns_set_res will let you set it.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 19:21.


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