View topic - Unit enters range callback



All times are UTC + 1 hour


Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 19 May 2010, 22:09 

Joined: 20 Apr 2010, 04:14
Hi, I was wondering if the AI interface (specifically the Java interface), had a callback for when an enemy unit enters a given units range (either reclaim or attack). I know this event happens internally (for instance, when an enemy enters the range of a LLT, it fires on the enemy), but it would be cool to program an AI where builders automatically reclaim nearby enemies. Specifically, this would make sense for nano towers, since you would want them to reclaim nearby enemies. Any idea how to achieve this behavior?


Top
 Offline Profile  
 
PostPosted: 19 May 2010, 22:24 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
there's an widget for that, maybe see how it does it (was it smart nanos?)


Top
 Offline Profile  
 
PostPosted: 21 May 2010, 01:43 

Joined: 20 Apr 2010, 04:14
In case anyone else wants to know: the widget "Smart Nanos" does this and can be found here: http://www.springfiles.com/show_file.php?id=1011


Top
 Offline Profile  
 
PostPosted: 21 May 2010, 08:21 
AI Coder

Joined: 17 Mar 2008, 19:03
Location: RF
In each Update() call it scans units in a range. It does not use any specific event (if would exist).


Top
 Offline Profile  
 
PostPosted: 21 May 2010, 18:27 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
In the Spring Engine and Skirmish AI world:
Callback: AI ----requests-something-from----> Engine
Event: Engine ----sends-to----> AI


Top
 Offline Profile  
 
PostPosted: 22 May 2010, 14:06 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
There were events for enemy unit entered radar and entered LOS in the legacy AI interface, there should be events in the other APIs too


Top
 Offline Profile  
 
PostPosted: 22 May 2010, 17:26 
AI Coder

Joined: 17 Mar 2008, 19:03
Location: RF
But there are no events for unit entered attack or reclaim range.


Top
 Offline Profile  
 
PostPosted: 22 May 2010, 23:07 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
If an enemy unit is not in LOS then the information should not be available anyway, thus the events would be pointless, as it would require a set of calculations be done. The whole point of the events is to avoid these calculations, but if they're done anyway then that defeats the point


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.