re spell help needed

spirits

New Member
Reaction score
0
i posted a thread asking for help and i got it and followed to the exact thing but it says it doesnt work.. the spell is supposed to boost stats for each unit around the hero but im not sure why its not working. also can i have some explainingin my action where it says add attribute bonus part please.

here is link
http://www.thehelper.net/forums/showthread.php?t=115409

Untitled Trigger 001
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to war hero
Actions
Set hero1 = (Learning Hero)
Set point1 = (Position of hero1)
Unit - Add Attribute Bonus to hero1
Set temp_group = (Units within 300.00 of point1 matching (((Matching unit) is in (Units owned by (Owner of hero1))) Equal to True))
For each (Integer A) from 1 to ((Number of units in temp_group) + 1), do (Actions)
Loop - Actions
Unit - Set level of Attribute Bonus for hero1 to (((Integer A) + 1) + 1)
Custom script: call DestroyGroup (udg_temp_group)
Custom script: call RemoveLocation (udg_point1)
 

XeNiM666

I lurk for pizza
Reaction score
138
EDIT: I read wrong...

do this

Code:
Unit - Set level of Attribute Bonus for hero1 to (Number of units in temp_group)
 

spirits

New Member
Reaction score
0
but it said its the last 2 lines that are messed up..well ill replace that line with your new one anyways
 

eXirrah

New Member
Reaction score
51
Can you describe to me exactly what you want. As far as I understand is that when you learn a skill the more the units surrounding you the more attribute points you get. If you explain better what you want to do I might be able to help you
 

spirits

New Member
Reaction score
0
the MORE unit around you in 300 area the more stats you get. the person that helped me used bonusattribute but i couldnt find it so i used attribute bonus
 

spirits

New Member
Reaction score
0
for got to mention its based off an aura and works on self and happens when you level spell
 

eXirrah

New Member
Reaction score
51
what is the behavior of this trigger what errors do you get

EDIT:
Trigger:
  • Untitled Trigger 001
    • Events
    • Unit - A unit Learns a skill
    • Conditions
    • (Learned Hero Skill) Equal to war hero
    • Actions
    • Set hero1 = (Learning Hero)
    • Set point1 = (Position of hero1)
    • Unit - Add Attribute Bonus to hero1 <- No need for this one you set hero attributes below
    • Set temp_group = (Units within 300.00 of point1 matching (((Matching unit) is in (Units owned by (Owner of hero1))) Equal to True))
    • For each (Integer A) from 1 to ((Number of units in temp_group) + 1), do (Actions) <- I guess that the hero is owned by the owner of the hero so no need for +1(No need for the loop at all actually)
    • Loop - Actions
    • Unit - Set level of Attribute Bonus for hero1 to (((Integer A) + 1) + 1) <- (((Integer A) +1) +1) = (Integer A) + 2
    • Custom script: call DestroyGroup (udg_temp_group)
    • Custom script: call RemoveLocation (udg_point1)


I think your trigger should look like this:

Trigger:
  • Untitled Trigger 001
    • Events
    • Unit - A unit Learns a skill
    • Conditions
    • (Learned Hero Skill) Equal to war hero
    • Actions
    • Set hero1 = (Learning Hero)
    • Set point1 = (Position of hero1)
    • Set temp_group = (Units within 300.00 of point1 matching (((Matching unit) is in (Units owned by (Owner of hero1))) Equal to True))
    • Unit - Set level of Attribute Bonus for hero1 to ((Number of units in temp_group) - 1)
    • Custom script: call DestroyGroup (udg_temp_group)
    • Custom script: call RemoveLocation (udg_point1)
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Code:
Set temp_group = (Units within 300.00 of point1 matching [B](((Matching unit) is in (Units owned by (Owner of hero1)))[/B] Equal to True))

Bolded part could just be replaced with ((Matching unit) is an ally of (Owner of hero1)).

Does your attribute bonus ability have enough levels?

You might also want to check the level of the learned ability (in case it has more than 1 level and unless you want it to reset with each level).
 

spirits

New Member
Reaction score
0
can you make a step by step guide to tell me how to change it from step one clicking on the trigger to edit it because im really lost.. on how to change the thing
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
When you press the text "((Matching unit) is in (Units owned by (Owner of hero1))) Equal to True))", you can select to change a lot of variables and such, but what you really want to do is changing the whole comparison to "Unit belongs to an ally of player", still located under boolean comparisons. Select this and change to "(Matching unit) belongs to an ally of (owner of hero1) Equal to true".
 

eXirrah

New Member
Reaction score
51
Ok man this is my last post cause I'm going to new year party so :

Trigger:
  • Untitled Trigger 001
    • Events
    • Unit - A unit Learns a skill
    • Conditions
    • (Learned Hero Skill) Equal to war hero
    • Actions
    • Set hero1 = (Learning Hero) <- you set a unit variable that contains the hero
    • Set point1 = (Position of hero1) <- you set the position of the hero
    • Set temp_group = (Units within 300.00 of point1 matching (((Matching unit) is in (Units owned by (Owner of hero1))) Equal to True)) <- you set the group of units in 300 range arround the hero(hero included)
    • Unit - Set level of Attribute Bonus for hero1 to ((Number of units in temp_group) - 1) <- you set the attribute of the hero equal to the number of units in the group -1(beacause of the hero is in the group too)
    • Custom script: call DestroyGroup (udg_temp_group) <- remove memory leak from the units group you used
    • Custom script: call RemoveLocation (udg_point1) <- remove memory leak from the point you used
 

spirits

New Member
Reaction score
0
okay i select text ---> opens up temp group = units within 300 etc etc click that unit within 300 --->opens up units within 300 of point1 then matching matching units is in units owned by owner of hero1 = to true ----> then i click the matching unit etc = to true then im stuck ..im so lost and confused srry and thankss forr helpp :)
 

spirits

New Member
Reaction score
0
Untitled Trigger 001
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to war hero
Actions
Set hero1 = (Learning Hero)
Set point1 = (Position of hero1)
Set temp_group = (Units within 300.00 of point1 matching (((Matching unit) is in (Units owned by (Owner of hero1))) Equal to True))
Unit - Add Attribute Bonus to hero1
For each (Integer A) from 1 to ((Number of units in temp_group) - 1), do (Actions)
Loop - Actions
Unit - Set level of Attribute Bonus for hero1 to (Number of units in temp_group)
Custom script: call DestroyGroup (udg_temp_group)
Custom script: call RemoveLocation (udg_point1)
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Trigger:
  • GUI crap
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to <My Ability>
    • Actions
      • Set point1 = (Position of (Triggering unit))
      • Set temp_group = (Units within 300.00 of point1 matching ((((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit - Add Attribute Bonus to (Triggering unit)
      • Unit - Set level of Attribute Bonus for (Triggering unit) to (Number of units in temp_group)
      • Custom script: call RemoveLocation(udg_point1)
      • Custom script: call DestroyGroup(udg_temp_group)


Should work as planned. <My Ability> is to be replaced with your aura ability.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top