Skip to content

This vjass library allows you to create and manage rotating models

License

Notifications You must be signed in to change notification settings

Vlod-github/Rotating-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rotating model

This vjass library allows you to create and manage rotating models.

Installation

  1. Copy trigger RotatingModel.
  2. Copy custom Effect unit. If the unit rawcode has changed ('h000'), then change the static integer unitid in RotatingModels to the new one.
  3. 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.

Description

  1. Create a sample
local RotatingModel obj = RotatingModel.create()
  1. 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
  1. Run rotating model
call obj.start(x, y) // real x, real y - coordinates
call obj.startUnit(target) // unit target - attach to unit
  1. Pause animation
call obj.pause()
  1. Resume animation
call obj.resume()
  1. 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
  1. Accessing rotating model data
set integer = obj.count
set unit = obj.unit[1] // first element
set unit = obj.unit[obj.count] // last element
  1. Stop and delete a rotating model
call obj.destroy()

Example 1

local RotatingModel obj = RotatingModel.create()
set obj.scale = 0.5
call obj.start(0,0)
1.mp4

Example 2

local RotatingModel obj = RotatingModel.create()
set obj.count = 2
set obj.model = "Abilities\\Weapons\\SentinelMissile\\SentinelMissile.mdl"
call obj.startUnit(unit)
2.mp4

About

This vjass library allows you to create and manage rotating models

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages