Map - Charge

Wargus is a Warcraft 2 mod that allows you to play Warcraft 2 with the Stratagus engine.
User avatar
Kyran
Posts: 499
Joined: Sat Dec 31, 2011 5:19 pm
Location: Australia
Contact:

Re: Map - Charge

Postby Kyran » Fri Sep 13, 2013 4:38 pm

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
User avatar
b_o
Posts: 328
Joined: Sun Jan 01, 2012 12:07 pm

Re: Map - Charge

Postby b_o » Fri Sep 13, 2013 4:53 pm

Kyran wrote:That is a good idea. ...
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.
User avatar
Andrettin
Posts: 433
Joined: Sun Jun 30, 2013 9:58 pm
Location: Vienna, Austria
Contact:

Re: Map - Charge

Postby Andrettin » Fri Sep 13, 2013 5:16 pm

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.
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.
User avatar
cybermind
Posts: 110
Joined: Sat Dec 31, 2011 11:43 pm

Re: Map - Charge

Postby cybermind » Fri Sep 13, 2013 9:27 pm

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.
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.
Andrettin wrote:but I don't think it is possible with Stratagus at the moment
Nah, Stratagus has the Super Cow Powers! :D
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.
User avatar
Andrettin
Posts: 433
Joined: Sun Jun 30, 2013 9:58 pm
Location: Vienna, Austria
Contact:

Re: Map - Charge

Postby Andrettin » Sat Sep 14, 2013 12:41 am

cybermind wrote: Nah, Stratagus has the Super Cow Powers! :D
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.
Great, thanks! Could you give me an example of how I should set up the AllowArg for "check-unit-variable"?
User avatar
cybermind
Posts: 110
Joined: Sat Dec 31, 2011 11:43 pm

Re: Map - Charge

Postby cybermind » Wed Sep 18, 2013 2:35 am

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
User avatar
Andrettin
Posts: 433
Joined: Sun Jun 30, 2013 9:58 pm
Location: Vienna, Austria
Contact:

Re: Map - Charge

Postby Andrettin » Wed Sep 18, 2013 5:07 am

cybermind 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
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.8 :)
User avatar
Kyran
Posts: 499
Joined: Sat Dec 31, 2011 5:19 pm
Location: Australia
Contact:

Re: Map - Charge

Postby Kyran » Wed Sep 18, 2013 5:13 pm

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
User avatar
Andrettin
Posts: 433
Joined: Sun Jun 30, 2013 9:58 pm
Location: Vienna, Austria
Contact:

Re: Map - Charge

Postby Andrettin » Fri Sep 20, 2013 5:03 am

Kyran wrote:You could try using one of Dinky's builds with WIP. It might work.
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.
User avatar
Kyran
Posts: 499
Joined: Sat Dec 31, 2011 5:19 pm
Location: Australia
Contact:

Re: Map - Charge

Postby Kyran » Thu Oct 24, 2013 3:54 pm

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

Who is online

Users browsing this forum: No registered users and 2 guests