[ZScript] On(Un)Morph Virtual Function

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: [ZScript] On(Un)Morph Virtual Function

Re: [ZScript] On(Un)Morph Virtual Function

by Rachael » Sun Apr 30, 2017 1:29 pm

Re: [ZScript] On(Un)Morph Virtual Function

by Graf Zahl » Tue Jan 10, 2017 4:26 pm

This is already in the tracker.

Re: [ZScript] On(Un)Morph Virtual Function

by Major Cooke » Tue Dec 27, 2016 9:52 am

Sounds reasonable... I like that idea!

Re: [ZScript] On(Un)Morph Virtual Function

by ZzZombo » Thu Dec 22, 2016 7:48 pm

You know what I think? Alongside those functions must exist some event system to signal them globally. This way we don't have to create subclasses when we aren't going to change implementation, and more importantly allows to capture events in Actor cleanly.

[ZScript] On(Un)Morph Virtual Function

by Major Cooke » Wed Dec 21, 2016 10:47 am

Two virtual functions called whenever an (un)morph happens. Has two different cases for both of these based on if the actor to change from and the actor to change into.

I.e. a marine turns into a mega chicken.

Marine:
  • Calls OnMorph before changing into the morph.
  • Calls OnUnmorph after returning to the player self.
Mega Chicken:
  • Calls OnMorph just after switching bodies.
  • Calls OnUnmorph just before switching bodies.

Top