The RP maps use a list of damage bonus abilities that are added to the unit with a trigger.
You generally have 13 invisible damage buffs with the values of:
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096.
These values, added together properly, can equal any number from 1 to 4096.
This...
X[i] & Y[i] are the distance the unit is supposed to be moved on either axis.
The testX & testY are to make sure the unit doesn't fly out of the area.
function VMoveUnit takes unit u returns nothing
local integer i = GetUnitUserData(u)
local real testX = GetUnitX(u)+X[i]
local...
The following is an example of the problem I'm having:
function Example_Function takes group g returns nothing
local group g2
call DisplayTextToForce(GetPlayersAll(),"Trigger Activated")
call GroupAddGroup(g,g2)
call DisplayTextToForce(GetPlayersAll(),"Group Added")
endfunction
This function...
I forgot to make an endloop at 0, thanks for pointing that out.
I've actually capped the max number at around 500, and that's never lagged on me even with 500 aiming at the 1, so I'm just going to add an "if num == 0 then set b = true" to it.
This is what I call the following functions with:
Special Effect - Create a special effect attached to the AttachPoint of TempUnit using SFXString[TempInteger]
Set SFX = (Last created special effect)
Custom script: call SFX(udg_TempUnit,udg_SFX)
^^In GUI, this part works perfectly^^
In a...
Immediately Noticeable: You only set the random number (TempInteger) once, yet go through a large number of loops using it.
Was this intentional?
Edit: For efficiency, you should place the Set TempReal = ((Real((Integer A))) x 32.00)
Outside of the B loop, but inside the A loop.
Also...
If you can potentially have multiple of this unit type running around, use the following:
First, make a unit group variable (Select the X in the trigger editor, make new, go down til you find 'Unit Group').
Event: Game - in game time becomes >= 6
Set UnitGroupVariable to Units of Type HeroGuy...
(Current research level of Iron Forged Swords for Player 1 (Red)) Equal to 0
//Integer Condition - Player
Maybe?
Saying 'Equal to 1' or 'Equal to 0' is a simple boolean check if that is what you needed.
Otherwise, I think it's self-evident.
Just use an invisible spellbook with permanent immolation in it.
With some simple usage of local variables and a loop you can make it remove itself after the buff disappears.
The only event is 'unit learns a skill'.
You need to make another trigger with the event:
Game - in game time becomes >= 6
This will detect the game time entering Day
Game - in game time becomes >= 18
This will detect the game time entering Night
The previous 2 code strings were events.
You need...
False. Ever played an RP map?
Which reminds me, you will want to make the actual hero ability invisible and use totally different ones for the effects.
The fact that the hero can learn the ability can't be removed, but the ability itself CAN be removed from the unit.
This means that if you use...
To add and remove a variable amount of health in my RP map, I used the following system.
I used the 'health bonus' item ability and set it to a unit ability
I make a huge number of them using the following values.
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096.
I then make an array...