Buffs; trigger involved problems

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
I have a buffer, who is supposed to buff you for 50 gold each buff. Since the buffs are actual abilities, i triggered it, so that it consumes (Current gold of (Owner of (Target unit of ability being cast) - 50)), whenever the buffer casts an ability for the target unit.
There are 4 buffs on this buffer.
The 2 buffs are standard, out of the Object Editor. The rest 2 are fake ones (based on abilities that give buff), meaning trigger-involved, such as attribute bonus and magic resistance bonus. Now, if a Player has Less than 50 Gold, the buffer is stopped, will not cast the spell and the gold of the Player will not get lost of course. What it is done instead in the map, is the buffer stopping, but still consuming that 50 gold, because it is considered as it is casting the ability. How will i make it, so that it doesn't absorb gold out of a Player's pool and still NOT turn off the trigger (because it would require turning off the trigger, which is what calls gold absorption)?
Another issue:Those 4 buffs; there is another one, called Buff Remover. It is supposed to check how many and what type of buffs the unit has that refer to the buffer's buffs. So, if a Player casts this Buff Remover, all buffs that belong to the buffer, no matter how many they are (even if they are 4/3/2/1), they will ALL be gone away. I can't seem to figure it out though: how am i supposed to do this?
I guess it has to do with "Count buffs of type" or store them in a variable, but how can i know what type of buff each is (magical/ physical), when 2 of them are fake buffs and refer to triggers? Like i said, one gives magic resistance through a new ability added and the other custom buff refers to attribute bonuses. What type of buffs are they supposed to be? The other standard are based off Bloodlust and Inner Fire. What are they too? How will i avoid removing positive buffs that do not belong to the buffers' buffs?

+rep to the answers. Thank you. It's not only for my current project, but i would like to know what's wrong, damn.
 

Samael88

Evil always finds a way
Reaction score
181
+rep to the answers.

This is a answer:p

Just could not help it:p

But seriously, that red text is kind of angry towards the eyes, and it would be more readable with some spacing. If you want some part of the text to stick out, then use the bold thingy. It is much better than to irritate the eyes with colors:D

Edit: And on the first issue. You can either add the gold after fail.
Or you can make it so that the ability has a 0.1 casting time and have the trigger be fired when it is finshed casting.
and have another trigger for stopping the cast, and have that one fire with the unit begin's casting an ability.
In that way the trigger should have time to stop the spell before the other trigger fires:)

Edit2: The second one you can check like this:

A have a unit on the map, cast the buffs on that unit.

then have a trigger that counts how many buffs there are on the unit and displays them.
like.

Code:
player 1 red writes test in chat.

set a = 0 [B]this is so that you can cast it multiple times without ruining the result[/B]
set a = number of magical buffs on unit
display "number of magic:"+ a to player 1 red.

If you want to know wich buff is of wich type. You can fire them one by one and see wich one turns out 1 and wich one turns out 0:D
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
OOps, sozie! It didn't seem that irritating to me, but whatever, fixed.
Nah, you really want that rep, don't u? Whatever, here you are..
 

Samael88

Evil always finds a way
Reaction score
181
OOps, sozie! It didn't seem that irritating to me, but whatever, fixed.
Nah, you really want that rep, don't u? Whatever, here you are..

I was not that needy, mere kidding:p Thanks anyway:thup: But I have answered and given possible solutions in the post above aswell. Just to be sure to earn it:D
 

DiFm

New Member
Reaction score
35
+rep for this?
You make the abilty to absorb gold a dummy ability, that creates a dummy unit.

unit begins casting an ability

if owned of unit target unit of ability being cast gold property equal to or greater to then 50.

then
create dummy unit
order last created unit to cast (real skill)
order triggering unit to stop

else

second trigger.
unit starts the effect of an ability.
remove gold and add gold.

but this should be able to do in 1 trigger sory i have no WE in front of me now. i could make it tommorrow but your problem is propably allready solved by then.
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
+rep for this?
You make the abilty to absorb gold a dummy ability, that creates a dummy unit.

unit begins casting an ability

if owned of unit target unit of ability being cast gold property equal to or greater to then 50.

then
create dummy unit
order last created unit to cast (real skill)
order triggering unit to stop

else

second trigger.
unit starts the effect of an ability.
remove gold and add gold.

but this should be able to do in 1 trigger sory i have no WE in front of me now. i could make it tommorrow but your problem is propably allready solved by then.
second trigger.
unit starts the effect of an ability.
remove gold and add gold.
It will not work, because i had already tried that and even if i had 51 gold, it left me with 1 gold and after re-casting, it left me with 0 gold, then i retested it when i had 23, it set it to 0 again, it is like trying to remove that 50 amount, so i can't really add it back, when i will have a periodic time event which adds gold to the Player every some seconds. The next step would be making the abilities items, but it won't work right (so that gold is automatically absorbed = payed). If someone can figure out a good way of not messing with charged items though to add those buffs on the hero, i am open-minded :D
It seems though that that amount of gold taken away is really bitchy. I may make 2 triggers, like you suggested, but how will i disable trigger one, without messing with instant income (like a tower is destroyed and you get instant 90 gold let's say)? I can't check periodically timed the property of all Players, that would be laggy :I


If you want to know wich buff is of wich type.
Which type doesn't mean which of those 4 buffs. It means whether physical or magical, as listed in the Trigget Editor (go to "Remove buffs of Type" Action and you'll get what i'm saying)
 

DiFm

New Member
Reaction score
35
I can see what i can do tomorrow. I'm positive can find a solution to it.
 

Samael88

Evil always finds a way
Reaction score
181
Did you even try the things I posted in my earlier thread? They should work quite fine for you:)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top