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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...