Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > King's Bounty > King's Bounty: Crossworlds > Mods

Mods King's Bounty: Crossworlds Mods

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-13-2015, 02:39 PM
jorko80 jorko80 is offline
Approved Member
 
Join Date: Mar 2009
Posts: 63
Default Modding creature abilities

Hello , I'm working on a little mod and want to ask you how can I restrict creature abilities? The abilities must be available only when a certain condition is met. The condition I want most is - creature experience level in Red Sands, but morale, level of the hero are also good ones.

I found this for the chosha unit in addon_unit_features.lua :

function chosha_features(unit)
local i = unit
if i == nil then i = 0 end
if Attack.act_name(i)=="chosha" then
if Attack.act_size(i)> Attack.act_initsize(i)/2 then
Attack.act_enable_attack(i,"eat_all",false)
else
Attack.act_enable_attack(i,"eat_all")
end
end
return true
end

The condition here is stack size , but when I add this function for firemage's fire_shot ability it just does nothing.
Thank you!
Reply With Quote
 


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. The time now is 12:11 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.