Spellbook natives?

Executor

I see you
Reaction score
57
Hi,

am I just silly or aren't there any spellbook natives out there?

I want to modify a spellbook ingame dynamically.

Ex.:Right clicked a UNIT, now your spellbook contains "speak" "attack" ...
Or you rightclicked a Destructable, now your spellbook contains "seek treasure"

I really don't want to use several spellbooks. Are there alternatives?
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
There aren't any functions that deal with spellbooks specifically, as far as I know. However, you could just add all the spells to the spellbook, and selectively disable the ones that shouldn't be displayed:

Trigger:
  • Player - Disable Acid Bomb for Player 1 (Red)


JASS:
native SetPlayerAbilityAvailable takes player whichPlayer, integer abilid, boolean avail returns nothing

call SetPlayerAbilityAvailable(whichPlayer, abilid, avail)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top