Jump to content


Photo

Special Powers That Cost Resources


  • Please log in to reply
5 replies to this topic

#1 Gfire

Gfire

    Nuju

  • Project Team
  • 2,173 posts
  • Location:I have returned from the depths
  • Projects:Finding My Way
  •  The Perfectionist

Posted 04 April 2010 - 10:49 PM

Does anyone know how to make it so that a special power (such as a summon ability) costs resources each time you click it? I've seen it done in custom maps, but I don't have any of those maps anymore, and I'm not sure how to do it.
Greetings, community.

#2 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 05 April 2010 - 02:25 PM

Well... If you want to make scripts for every map its possible... :p
Just make a script that says if Player does this Special power,
Remove some of this money...
I have tried to make a power that does something like this a while ago, but at that time i knew nothing of the "LUA" scripts, so i will take a look again later ;) But I suggest you try what i said up there first, if it is at all possible ;)
Ridder Geel

#3 Gfire

Gfire

    Nuju

  • Project Team
  • 2,173 posts
  • Location:I have returned from the depths
  • Projects:Finding My Way
  •  The Perfectionist

Posted 05 April 2010 - 05:39 PM

In the custom maps I've played, it actually has a cost in the commandbutton description, as if you were buying an upgrade or unit. It's the automatically generated cost, with the little money icon. Unless you can add that in manually in BFME1 or something, I think it's possible to do in the ini code. The trouble is that it isn't used anywhere in BFME, but may be possible. I wonder if I could find it in the game.dat.

You could be right, though, if the custom maps to it with scripts and cheat somehow to get the money icon.

But, hey, I'd like to use only new maps for this mod anyway, so doing it with scripts wouldn't be too bad.

Edited by Gfire, 05 April 2010 - 05:40 PM.

Greetings, community.

#4 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 05 April 2010 - 05:58 PM

Then they most likely made u buy a upgrade :p Not sure though... ;)
Ridder Geel

#5 Gfire

Gfire

    Nuju

  • Project Team
  • 2,173 posts
  • Location:I have returned from the depths
  • Projects:Finding My Way
  •  The Perfectionist

Posted 05 April 2010 - 07:18 PM

I'm not sure how that is possible, because the power requires a target. I think you could do an upgrade with a power like blade master, but something like lightning sword that requires a target area or position, I don't think you could do. I wonder what would happen if you flagged a purchase_upgrade commandbutton with requires_target_position or whatever. It might work, but it doesn't seem likely.

I wish I could find this map, I'd see how they did it. Unfortunately I don't have it and haven't been able to find anyone playing it online yet. But I have time before I need it, this part of the mod isn't in a rush, I have lots of other work I can do.

I can certainly do it with scripts, but it would be nice is the cost on the button was generated automatically, so I didn't have to keep the lotr.string up to date with the balance data when I get to balancing.
Greetings, community.

#6 Annullus The Grey

Annullus The Grey

    Historian... Master of Ages

  • Hosted
  • 269 posts
  • Projects:Twilight of the Republic

Posted 16 June 2010 - 08:24 PM

you could remove the recharge mechanic and have the button grant an upgrade and do the power, while then requiring the purchase of another upgrade to allow you to use the spell again. alternatively you could see if its possible to link the purchase of an upgrade to an ability, then use ability chaining (like the teleport others spell) to remove the upgrade from the caster
If your reading this i probably am drunk in a ditch somewhere near you

the magical drunken teleporter

SELF PROCLAIMED FORUM DRUNK!!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users