This vjass library allows you to create and manage rotating models.
- Copy trigger RotatingModel.
- Copy custom Effect unit. If the unit rawcode has changed ('h000'), then change the static integer unitid in RotatingModels to the new one.
- Import yourself a model from a map in the Import Manager. Check that the Effect unit has an imported model installed in the Model file column.
- Create a sample
local RotatingModel obj = RotatingModel.create()
- Change default parameters before start
set obj.z = real // height relative to terrain
set obj.scale = real // model scale
set obj.radius = real // radius from center
set obj.count = integer // number of models
set obj.red = integer // red color (0-255)
set obj.green = integer // green color
set obj.blue = integer // blue color
set obj.alpha = integer // model transparency (0-255)
set obj.pcolor= playercolor // for models with timcolor
set obj.model = string // path to the model
set obj.dangle = real // rate of change of angle (radian)
set obj.timeout = real // animation update time
- Run rotating model
call obj.start(x, y) // real x, real y - coordinates
call obj.startUnit(target) // unit target - attach to unit
- Pause animation
call obj.pause()
- Resume animation
call obj.resume()
- Change parameters of rotating models during animation
set obj.x = real // center on X
set obj.y = real // center on Y
set obj.target = unit // attached unit
call obj.reCount(count) // integer count - change count
call obj.reScale(scale) // real scale - change scale
call obj.reColor(red, green, blue, alpha) // integer - change colors
call obj.rePlayerColor(pcolor) // playercolor pcolor - timcolor
- Accessing rotating model data
set integer = obj.count
set unit = obj.unit[1] // first element
set unit = obj.unit[obj.count] // last element
- Stop and delete a rotating model
call obj.destroy()
local RotatingModel obj = RotatingModel.create()
set obj.scale = 0.5
call obj.start(0,0)
1.mp4
local RotatingModel obj = RotatingModel.create()
set obj.count = 2
set obj.model = "Abilities\\Weapons\\SentinelMissile\\SentinelMissile.mdl"
call obj.startUnit(unit)