All times are UTC





Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Quickie
PostPosted: Sat Nov 12, 2011 10:04 am 
Offline
Advanced User
User avatar

Joined: Sat Apr 30, 2011 6:32 pm
Posts: 111
YouTD Score: 3
I need a way to negate MOD_EXP_RECEIVED for the duration of a script, I've done this in two ways and neither worked because I could not get the data of MOD_EXP_RECEIVED as an integer or real.

tl;dr: How to get MOD_EXP_RECEIVED converted into an integer? Trying to use

local integer xp = tower.MOD_EXP_RECEIVED

Doesn't work and I can't find any towers that reference their own modded stats.

Alternatively how would I add experience that isn't modified by the EXP modifier?


Top
 Profile  
 
 Post subject: Re: Quickie
PostPosted: Sat Nov 12, 2011 10:44 am 
Offline
Power User

Joined: Sun Apr 10, 2011 10:34 am
Posts: 543
Location: Ultima Thule
YouTD Score: 45
Sunken wrote:
I need a way to negate MOD_EXP_RECEIVED for the duration of a script, I've done this in two ways and neither worked because I could not get the data of MOD_EXP_RECEIVED as an integer or real.

tl;dr: How to get MOD_EXP_RECEIVED converted into an integer? Trying to use

local integer xp = tower.MOD_EXP_RECEIVED

Doesn't work and I can't find any towers that reference their own modded stats.

Alternatively how would I add experience that isn't modified by the EXP modifier?


MOD_EXP_RECEIVED - just an integer constant used to identify the exp received modifier.

Each modifier has a "getProp" method in the Unit struct.

The constants (MOD_EXP_RECEIVED) are used whenever you're adding a modifier to a tower either permanently or by a buff / aura. The the function is just .addModifier(integer modId), so you use the integer constant which is easy to read, nothing more.

how would I add experience that isn't modified by the EXP modifier - tower.addExp ( expamont / tower.getProp_ExpReceived())


Top
 Profile  
 
 Post subject: Re: Quickie
PostPosted: Sat Nov 12, 2011 10:51 am 
Offline
Advanced User
User avatar

Joined: Sat Apr 30, 2011 6:32 pm
Posts: 111
YouTD Score: 3
Palandu wrote:
tower.addExp ( expamont / tower.getProp_ExpReceived())


Yess, that's exactly what I needed, thank you.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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 © 2000, 2002, 2005, 2007 phpBB Group