Login  Register
 



Post new topicReply to topic
 
Author Message
 PostPosted: 03 May, 2012 
 

Joined: 04 Aug, 2011
Posts: 83
Offline
Hello,
what does a unit need in its bp for

1. Cloak
or
2. CloakFieldRadius
or
3. ANTITELEPORT

? :)


Top
 Profile  
 PostPosted: 04 May, 2012 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
Hi,

in the INTEL section of the bp you just add what you want like:

Cloak = true,
CloakFieldRadius = 20,

there is no default antiteleport intel type, however that does not mean you cannot make one, bo:u has anti teleport, but also with the help of DMS i made a new intel type for it..

i basicly setup a new intel type for anti-teleport
then i made a function for if the unit is in an anti-teleport field..
and also a function to check if the destintation is in an anti-teleport field.

Code:
local InAntiTeleportField = self:IsInField('AntiTeleportField')
      local DesNotInAntiTeleportField = self:CheckDestinationForAntiTeleport(Destination)


the IsInField function is a generic function in DMS to test if a unit is in an intel field,
the CheckDestintationForAntiTeleport looks like this..

http://pastebin.com/MkN3ujSt

again the main function which gets the units with antiteleportfield is

Code:
local units = brain:GetIntelTypeUnits('AntiTeleportField')


in DMS every inteltype unit is seperated into a table in the army brain, so that we can return them from any army at any time.. in this case were getting all units that have the intel type AntiTeleportField were then checking the radius of the units field against the distance to the teleport destination, if the distance is lower than the units radius we break and return false, (invalid destination) else we return true (valid destination). The list of units is returned instantly, with no strain on sim speed, because the table is updated in real time from each army when a unit enables/disables the intel type.

this is a custom intel type provided via dms intel systems, i did it this way so that were not dependant on unit categories to get the units of a certain intel type..
we can return a table of units for any army that use any intel type..

the system is fully automated and updated in real time.

_________________
Domino.
______________


Top
 Profile  
 PostPosted: 05 May, 2012 
 

Joined: 04 Aug, 2011
Posts: 83
Offline
I see.
I was confused because of bo's antiteleport.

Thank you!


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic



Quick Tools

Search for:
Jump to:  

© 2002-2010 Gas Powered Games Corp. All Rights Reserved. Gas Powered Games is the exclusive trademark of Gas Powered Games Corp.
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
 
Home| Games | Company | News & Press | Support
  Terms of Use   |    Copyright Information   |    Privacy Policy