K
Kadgar
Guest
can i have a list for items thst need to be made?
Darthfett said:2. Setting up "security levels":
a. Will determine how far the King is allowed to travel away from the Palace.
b. Determines how many guards are on-duty
c. Determines how far guards will patrol.
I'll do this. Is this all the abilities you want me to make for the ActionBook?Darthfett said:3. Setting up the ActionBook abilities:
a. Thievery (Assassins) - Will cause security to go up a tiny bit, gives money, and can only be used on villagers.
b. Swim (?) - Will allow the unit to swim through the water. (We may not use this, so if you set up the actionbook, do this last.
Besides it wouldn't be very useful with how little water there is on the map.Darthfett said:b. Swim (?) - Will allow the unit to swim through the water. (We may not use this, so if you set up the actionbook, do this last.
Evan1993 said:I'll do this. Is this all the abilities you want me to make for the ActionBook?
Besides it wouldn't be very useful with how little water there is on the map.
Evan1993 said:Want me to send you the map, or wait till I’m done with the ActionBook?
Evan1993 said:Also, maybe we should just remove the normal command icons and not bother with making the ActionBook abilities in a Spell book. Just a thought .
Evan1993 said:Jump
- This only would work while walking. The faster you were walking the farther you would go.
Evan1993 said:Climb
For climbing up the ivy on the castle walls
Swim
For taking a swim in the moat.
Assassins:
Un-lock
For un-locking locked doors that we don’t have....
Not sure about this one...
Guards:
Track
constant function TrackPathId takes nothing returns integer
return 'hpea'
endfunction
function HandleTrackingPath takes nothing returns nothing
local unit current
local unit new = udg_NewTrackedUnit
local unit e
local group cycle
local integer id
local integer last
local integer index = 1
local string leftpath = "Objects\\Spawnmodels\\Other\\IllidanFootprint\\IllidanSpawnFootPrint0.mdl"
local string rightpath = "Objects\\Spawnmodels\\Other\\IllidanFootprint\\IllidanSpawnFootPrint1.mdl"
local string uid
local real x
local real y
local real cx
local real cy
local real angle
local real offset
if new != null then
call GroupAddUnit(udg_TrackedGroup, new)
set udg_NewTrackedUnit = null
set id = H2I(new)
set uid = I2S(id)
set x = GetUnitX(new)
set y = GetUnitY(new)
call StoreInteger(udg_TrackingCache, uid, "last", 1)
call StoreReal(udg_TrackingCache, uid,"1", x)
call StoreReal(udg_TrackingCache, uid, "201", y)
set new = null
endif
loop
set current = FirstOfGroup(udg_TrackedGroup)
call GroupAddUnit(cycle, current)
exitwhen current == null
set id = H2I(current)
set uid = I2S(id)
set last = GetStoredInteger(udg_TrackingCache, uid, "last")
set x = GetUnitX(current)
set y = GetUnitY(current)
set cx = GetStoredReal(udg_TrackingCache, uid, I2S(last))-x
set cy = GetStoredReal(udg_TrackingCache, uid, I2S(last+200))-y
if last >= 200 then
call StoreInteger(udg_TrackingCache, uid, "last", 1)
endif
if SquareRoot(cx * cx + cy * cy) >= 80 then
call StoreReal(udg_TrackingCache, uid, I2S(last+1), x)
call StoreReal(udg_TrackingCache, uid, I2S(last+201), y)
call StoreInteger(udg_TrackingCache, uid, "last", last+1)
endif
if udg_ShowTrackingPath then
set udg_ShowTrackingPath = false
loop
set cx = GetStoredReal(udg_TrackingCache, uid, I2S(index))
set cy = GetStoredReal(udg_TrackingCache, uid, I2S(index+200))
set x = GetStoredReal(udg_TrackingCache, uid, I2S(last+1))
set y = GetStoredReal(udg_TrackingCache, uid, I2S(last+201))
set angle = 57.3 * Atan2(y-cy, x-cx)
if angle >= 180 then
set offset = -10
else
set offset = 10
endif
set x = cx + 25 * Cos((angle + offset) * 57.3)
set y = cy + 25 * Sin((angle + offset) * 57.3)
set e = CreateUnit(Player(15), TrackPathId(), cx, cy, angle)
call UnitApplyTimedLife(e, 'BTLF', udg_TrackCasterLevel * TrackDurationMultiplier())
set e = CreateUnit(Player(15), TrackPathId(), x, y, angle)
call UnitApplyTimedLife(e,'BTLF', udg_TrackCasterLevel * TrackDurationMultiplier())
exitwhen index == last
set index = index + 1
endloop
endif
call GroupRemoveUnit(cycle, current)
endloop
set current = null
set e = null
endfunction
corvusHaunt said:lmao. rofl. lol.
I thought that "Track" ability thing sounded pretty cool, so I went ahead and made it. The funny thing is that I didn't even think about what I was doing. I didn't realize how dumb I was being until just before I tested it.
What it does is keep track of every unit in the tracked group's path, which you can show by setting a global boolean to true.
It does what it is supposed to. The thing is that I kinda forgot I was using units for the path model (I just made the peasant have the Illidan footprint model). I didn't even test it because I know that it can't be used. This will lag tons and tons and tons.
corvusHaunt said:The only thing I can think of now is to just rip out it's guts and use the skeleton for an ability. If you cast track on a unit, then for whatever seconds you can see the unit's footprints.
If I used special effects instead of units I could speed it up alot, but it still is a costly function to run so often and keep track of so many things (updates every x seconds, storing the virtual "footprints" of every unit in a certain group, up to 200 footprints for an unlimited amount of units; in theory)Evan1993 said:Oh, I thought that you would just track heroes so it wouldn’t lag. But making it so that you have to cast it on units is fine.
corvusHaunt said:I made it so it would keep track of their last 200 'moves', seperated by 'x' seconds.