Regular growing

Marrusian

New Member
Reaction score
2
Hello,

My question is this : I can make a trigger to grow my hero scaling value like 0.10 on every level ?

I set the hero level 20 but i don't know how to set this trigger.

The second : I can make a trigger when i reach lvl 20 a special monster to appear ?

Thx, I hope you can help me.
 

Exide

I am amazingly focused right now!
Reaction score
448
The first question should be easy :p

Code:
Untitled Trigger 001
    Events
        Unit - A unit owned by Player 1 (Red) Gains a level
    Conditions
    Actions
        Animation - Change (Triggering unit)'s size to (100.00%, 100.00%, 100.00%) of its original size

Just change the size and the name of the trigger. And maybe add a condition (for what kind of Hero - depending on how you want it to be).

The second question, though..
I'm sure it can be done.. Not sure what you want to do, though.
Maybe explain a little better...
What kind of Monster? Who should own this Monster? (Friend or foe) Why a Monster? :p

-Should be do-able with the same trigger as above, but add an If Hero's level is equal to 20 - or something :p

EDIT: Maybe something like this:

Code:
Untitled Trigger 001
    Events
        Unit - A unit owned by Player 1 (Red) Gains a level
    Conditions
    Actions
        Set L = (Position of (Triggering unit))
        Animation - Change (Triggering unit)'s size to (100.00%, 100.00%, 100.00%) of its original size
        If ((Level of (Triggering unit)) Equal to 20) then do (Unit - Create 1 Footman for (Owner of (Triggering unit)) at L facing Default building facing degrees) else do (Do nothing)
        Custom script:   call RemoveLocation(udg_L)

Set L = ... and
Custom Script: ...
Are there to remove the memory leak.

If ((Level of (Triggering unit)) can be found under:
-New Action -> If/Then/Else -> Integer Compirasion -> Unit - Level of Unit
 

Marrusian

New Member
Reaction score
2
Hero is DreadLord :p (thx for trigger)

Eh idea it was this : When someone reach lvl 20 a Granite Golem (Level 20) appear from a portal. (surelly granite it will be editated to be more powerfull) and when someone kill him the game end with his victory ...
 

Exide

I am amazingly focused right now!
Reaction score
448
Ah, I see.
Well. Create a Custom Made Unit. Base of Granite Golem (or a Hero if you want it to use spells - it doesn't really matter much, but personally I use Heroes as bosses :p)
Ok. Once you've got your 'EndBoss' set.
Try mixing a little with the trigger.
Just a question. This Dark Portal of yours.. Is it pre-placed on the map? Or is it a special effect or something? Or is it a Unit? :p


Code:
Untitled Trigger 001
    Events
        Unit - A unit Gains a level
    Conditions
    Actions
        Set L = (Position of ('Dark_Portal'))
        Animation - Change (Triggering unit)'s size to (100.00%, 100.00%, 100.00%) of its original size
        If ((Level of (Triggering unit)) Equal to 20) then do (Unit - Create 1 'EndBoss' for (Player 12 (Brown))) at L facing Default building facing degrees) else do (Do nothing)
        Custom script:   call RemoveLocation(udg_L)

The Set Variable (Set L) part will surely change, depending on what/where your portal is. You could also place a Region at this portal (whatever it is :p) and do this:

Code:
        Set L = (Center of (Dark_Portal_Region))

-Or something similar.
Maybe you want to add a Special Effect or something nice, also?:


Code:
         Special Effect - Create a special effect at L using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation(udg_L)

-Be sure to place the Special Effect before you Destroy L. Or else it won't work :p
Also, choose a special effect that you like. ThunderClap is rather ugly ^^
Destroy (Last created Special effect) is to remove any Memory leaks (which might cause lag, etc.)

-I think that covers it :p
Good luck, have fun! ^^
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
For the animation size, I'm pretty sure setting it to the units original size wont do much :rolleyes:

You'll want to keep track of a real variable that starts at 100, and do this:

Code:
Set scalevar = scalevar + 10
Animation - Change (Triggering unit)'s size to (scalevar%, scalevar%, scalevar%) of its original size
Although, since a linear scale increase makes the unit appear to be getting exponentially bigger because it covers all three dimensions rather than a volume increase, you may want to use a square root function or something based on the unit's level to determine the scaling value.
 

Tom Jones

N/A
Reaction score
437
((Level of (Triggering unit)) wont work for heroes. Use (Hero level of (Triggering unit)) instead. It's also a integer condition.
 

Exide

I am amazingly focused right now!
Reaction score
448
"For the animation size, I'm pretty sure setting it to the units original size wont do much"

-Well it works.
 

Marrusian

New Member
Reaction score
2
Neah, I do something else I set the trigger with If/Then/Else and I make a different trigger for every scale for level 1, one trigger, for level 2 another trigger and so on and it work :)

But now I have some problems :

1.My hero (dreadlord) don't grow more than 5 levels. (he don't take exp) but if i attack building i get exp lol :|
2. He don't grow more than 10 level (in object editor I set his level at level 20).

How I fix this problems ?
 

Slapshot136

Divide et impera
Reaction score
471
go to advanced --> gameplay constants

look for hero - max level
and something to do with creep exp, hero's only get exp from creeps up to level 5, so change it or make the creeps an enemy player
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
"For the animation size, I'm pretty sure setting it to the units original size wont do much"

-Well it works.

No, it doesn't. Setting the scaling value to 100%/100%/100% means you are setting it to it's default value. It wont increase anything. Go test it if you don't beleive me.

Anyway, marrusian, don't get into the if/then/else habit when you can make something sooo much more efficiently.
Use a square root function.
EG:
Set heroscalevar= 100+squareroot(100*(hero level of (leveling hero)))
 

Marrusian

New Member
Reaction score
2
thx slapshot, uberfoop srry but i really don't understand nothing from heroscavelar :)

Complicated/Not Complicated I'm happy it works :)
 

Marrusian

New Member
Reaction score
2
Ok I make the endboss and where he start I fix the camera but one problem, how I can remove for few seconds the fog to see (when pan camera direct you) the monster ? and how I can add a victory action if I kill him ?
 

Exide

I am amazingly focused right now!
Reaction score
448
I'm not sure what fog you are talking about :p
Post your trigger and we can have a look at it.

To add a victory condition, however, is easy ^^
All you need to do is add a simple trigger:

Code:
Victory
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Dying unit)) Equal to 'EndBoss'
    Actions
        Game - Victory Player 1 (Red) (Show dialogs, Show scores)
        Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
        Game - Victory Player 3 (Teal) (Show dialogs, Show scores)
        Game - Victory Player 4 (Purple) (Show dialogs, Show scores)
        Game - Defeat Player 12 (Brown) with the message: Defeat!

Something like that.
Make sure You include all the Players (1-4, in this example).
I'm not sure if you even need the Defeat Player 12 -trigger, but I threw it in there just for good looks ^^ (Also make sure that, if you're gonna use that trigger, to have the right Player -12, in this example-)
 

Exide

I am amazingly focused right now!
Reaction score
448
No, it doesn't. Setting the scaling value to 100%/100%/100% means you are setting it to it's default value. It wont increase anything. Go test it if you don't beleive me.

Anyway, marrusian, don't get into the if/then/else habit when you can make something sooo much more efficiently.
Use a square root function.
EG:
Set heroscalevar= 100+squareroot(100*(hero level of (leveling hero)))

Of course 100% doesn't work.
But if you're not a complete idiot one would think of it.
I just showed him the trigger. And it DOES work.
 
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