User Tools

Site Tools


assets:scripting_with_stateanimator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
assets:scripting_with_stateanimator [2019-11-17 21:37]
skyjake [onStateChange (animator, state)]
assets:scripting_with_stateanimator [2019-11-17 21:52] (current)
skyjake [StateAnimator methods]
Line 29: Line 29:
     end     end
 end</​code>​ end</​code>​
-  * The model asset'​s ''​animation''​ block can define named [[model#​timelines|script timelines]]. These can be started when a model animation sequence starts, or separately using the [[script:StateAnimator.startSequence]] method.+  * The model asset'​s ''​animation''​ block can define named [[model#​timelines|script timelines]]. These can be started when a model animation sequence starts, or separately using [[#StateAnimator ​methods]].
   * Any state sequence trigger defined in the model asset can have an embedded [[model#​timelines|script timeline]].   * Any state sequence trigger defined in the model asset can have an embedded [[model#​timelines|script timeline]].
 ===== StateAnimator variables ===== ===== StateAnimator variables =====
Line 51: Line 51:
  
 ===== StateAnimator methods ===== ===== StateAnimator methods =====
 +
 +Objects of the Render.StateAnimator class have the following methods.
  
 #​@Identifier_HTML~playingSequences~@#​ ( ) #​@Identifier_HTML~playingSequences~@#​ ( )
Line 66: Line 68:
 #​@Identifier_HTML~thing~@#​ ( )  #​@Identifier_HTML~thing~@#​ ( ) 
  
 +Returns a World.Thing representing the mobj that the animator belongs to.
  
 ===== Asset callbacks ===== ===== Asset callbacks =====
Line 71: Line 74:
 StateAnimator will call methods defined in the model asset when certain events occur. StateAnimator will call methods defined in the model asset when certain events occur.
  
-==== onInit (animator) ​====+#​@Identifier_HTML~onInit~@# ( 
 + #​@Arg_HTML~Render.StateAnimator,​animator~@# )
  
-==== onDamage (animator, points, inflictor) ​====+#​@Identifier_HTML~onDamage~@# ( 
 + #​@Arg_HTML~Render.StateAnimator,​animator~@#,  
 + #​@Arg_HTML~Number,points~@#,  
 + #​@Arg_HTML~World.Thing,inflictor~@# )
  
 #​@Identifier_HTML~onStateChange~@#​ ( #​@Identifier_HTML~onStateChange~@#​ (
assets/scripting_with_stateanimator.1574019453.txt.gz · Last modified: 2019-11-17 21:37 by skyjake