Map - Charge
Re: Map - Charge
That is a good idea. I put friendly Paladins in to do the healing.
04:27 jim4 why haven't you added wc1 support? this project sucks. i'm only going to use freecraft
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
Re: Map - Charge
You could take the idea further to create an inventory system based on buttons, and maybe with the help of upgrades I guess. Make a potion spell which only applies to a hero, then when he hits a potion rune, give him the upgrade to have that spell button, and when he uses the potion spell via the button, remove the upgrade and the button. You could take that idea further, and let them pick up a special weapon to give them bonus damage, and when they click on the special weapon button, they just drop the weapon on the ground like a rune and loose the bonuses and the button. The same could work for armor, or boots of speed, or whatever. That is sort of how the inventory system in my non-stratagus game works.Kyran wrote:That is a good idea. ...
Re: Map - Charge
That is a very good idea, but I don't think it is possible with Stratagus at the moment. If button definitions could check for variables in order for the button to show up, then we could give the unit a variable indicating that it holds the item and everything would work properly, I believe, but alas, it is not so.b_o wrote: You could take the idea further to create an inventory system based on buttons, and maybe with the help of upgrades I guess. Make a potion spell which only applies to a hero, then when he hits a potion rune, give him the upgrade to have that spell button, and when he uses the potion spell via the button, remove the upgrade and the button. You could take that idea further, and let them pick up a special weapon to give them bonus damage, and when they click on the special weapon button, they just drop the weapon on the ground like a rune and loose the bonuses and the button. The same could work for armor, or boots of speed, or whatever. That is sort of how the inventory system in my non-stratagus game works.
Re: Map - Charge
This could be done in more convenient way: we need to create a new unit "Potion", which has Indestructible flag, CanAttack = true, CanAttackLand = true, NonSolid = true, AttackRange = 0 (which says unit only could attack if some another unit stepped on it), make it hostile to player and create some actions in Attack animation section, then call "die" action to remove it. That's the way i've done items in Doom Wars DeathMatch. Weapons can be done in same manner; I don't think runes are the way to do such functionality.b_o wrote:Make a potion spell which only applies to a hero, then when he hits a potion rune, give him the upgrade to have that spell button, and when he uses the potion spell via the button, remove the upgrade and the button.
Nah, Stratagus has the Super Cow Powers!Andrettin wrote:but I don't think it is possible with Stratagus at the moment
You can make buttons to check variables using Allowed = "check-unit-variable" in button definition. Another way to make such check is to use spells with conditions.
Re: Map - Charge
Great, thanks! Could you give me an example of how I should set up the AllowArg for "check-unit-variable"?cybermind wrote: Nah, Stratagus has the Super Cow Powers!
You can make buttons to check variables using Allowed = "check-unit-variable" in button definition. Another way to make such check is to use spells with conditions.
Re: Map - Charge
Use that syntax:
Allowed = "check-unit-variable", AllowArg = {var, type, mod, op},
where
var - variable name
type - variable field (Value, Max, Increase, Enable)
mod - compare function(<, >, <=, >=, ==, !=)
op - operand
Example:
AllowArg = {"HitPoints", "Value", ">", "10"} - button will be visible only when unit's hit points are greater than 10
Allowed = "check-unit-variable", AllowArg = {var, type, mod, op},
where
var - variable name
type - variable field (Value, Max, Increase, Enable)
mod - compare function(<, >, <=, >=, ==, !=)
op - operand
Example:
AllowArg = {"HitPoints", "Value", ">", "10"} - button will be visible only when unit's hit points are greater than 10
Re: Map - Charge
I had tried that, but it still crashed - I later realized, by looking at the Stratagus code commit history in launchpad, that the reason why it wasn't working is because this is a new feature for Stratagus 2.2.8, and I use 2.2.7. In any case, thanks very much for the help (and for creating this function in the first place), it will be very useful once I get 2.2.8cybermind wrote:Use that syntax:
Allowed = "check-unit-variable", AllowArg = {var, type, mod, op},
where
var - variable name
type - variable field (Value, Max, Increase, Enable)
mod - compare function(<, >, <=, >=, ==, !=)
op - operand
Example:
AllowArg = {"HitPoints", "Value", ">", "10"} - button will be visible only when unit's hit points are greater than 10
Re: Map - Charge
You could try using one of Dinky's builds with WIP. It might work.
04:27 jim4 why haven't you added wc1 support? this project sucks. i'm only going to use freecraft
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
Re: Map - Charge
It probably would, but then WIP would no longer be compatible with the latest stable release of Wargus, so it is probably better to wait until 2.2.8 is released. And in any case, the ideas I had pertaining this feature were mostly connected with another project I'm working on.Kyran wrote:You could try using one of Dinky's builds with WIP. It might work.
Re: Map - Charge
Anything I should add before I upload the final Wargus version?
04:27 jim4 why haven't you added wc1 support? this project sucks. i'm only going to use freecraft
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me