Jump to content

Editing the Trader - Trying to make my hero unit upgradable with a wolf


LordStark
 Share

Recommended Posts

I am trying to create a soldier who can be upgraded to have a loyal wolf. I thought I would be able to basically just copy the trader and replace the horse with a wolf and the trader unit with a fighting soldier but for some reason the wolf does not appear next to the soldier and I cannot find what line of code would assign the wolf to the soldier.

Alternatively, is there a way to make a wolf that will automatically guard <class>hero</class>?

I know that I could easily make a unit called "wolf" and then assign it to guard my hero but I don't want it to be an option where I can choose to have the wolf guard someone else or to go off and fight by it self. I plan on making the wolf a pretty effective fighter but with the restriction that in order to use it, you must put your hero in harms way.

Link to comment
Share on other sites

1 hour ago, LordStark said:

I would be able to basically just copy the trader and replace the horse with a wolf and the trader unit with a fighting soldier but for some reason the wolf does not appear next to the soldier and I cannot find what line of code would assign the wolf to the soldier.

Best for that would be the celt trader. Do note that it would not adapt to enemies though.

For your second request you probably need to write a small js component called protector or something that takes a class in its schema and periodically checks whether its protecting a hero And if its not look for the nearest one.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...