Renendaru
(Evol)ution is nothing without love.
- Reaction score
- 309
I'm talking about a generic template that can be used within ONE trigger.
// Pirate would be somekind of NPC class, they have some
// spesific actions for pirates only
struct Pirate extends NPC // NPC struct would have all basic stuff
// NPC struct would extend some interface, which has all these methods:
// like, when integer 'nerve' goes lower that X then this method is called:
method whenLittleAngry takes nothing returns nothing
// Make Pirate Swear and Spit
endmethod
method whenVeryAngry takes nothing returns nothing
// Make Pirate Kill everything
endmethod
// NPC struct would also have a timer, which would register events which make
// NPC loose his 'nerve'
endstruct
function CreateSomeGuy takes nothing returns nothing
local Pirate OneEyeJack=Pirate.create(..)
set OneEyeJack.nerve=100.0
set OneEyeJack.nerveLoosingRate=5.0
call OneEyeJack.addSwearWord("Fuck ya")
call OneEyeJack.addSwearWord("Fuck ya again !")
call OneEyeJack.addSwearWord("I stick my Hook in yar ASS!")
endfunction