1 (edited by jerreldulay 2016-04-15 19:02:21)

Topic: Editing move scripts to allow for character transformations

G'day!
I would like to implement moves that allow temporary character transformations that achieve the following:

-Change character material / main texture
#Trigger a "transformed" state which automatically drains energy over time. If this is too complicated to implement, then a "timed" transform period is an acceptable alternative.
-Plays a definable particle prefab for the duration of transformation. The prefab is destroyed after character Reverts to normal. 
-Increases move Speed and Attack Power by a certain percent
-Reverts character back to normal after energy (or time) runs out.

Can you please advise which scripts I should be working on in order to implement these features?

Thank you very much.
Cheers
Jerrel

Share

Thumbs up Thumbs down

Re: Editing move scripts to allow for character transformations

Oh, hey guys. I've figured it out. Thanks for checking. big_smile

Share

Thumbs up Thumbs down

Re: Editing move scripts to allow for character transformations

Care to share your approach? I tend to try to leave ufe code untouched as much as possible, maybe use things like mecanim events and whatnot. Also there is the stance change...

Share

Thumbs up +2 Thumbs down

Re: Editing move scripts to allow for character transformations

Could you share how you did this?  or at least point us towards the scripts to modify.  I havent tried it yet but im guessing you add this to the editor window and implement a temporary stance change that lasts X amount of frames.

Re: Editing move scripts to allow for character transformations

jerreldulay wrote:

Hi mate,
you're on the right track.
It's best if you create a new topic and PM me the link. That way other people can see the discussion and benefit from it.
You will need to modify the moveset script as well. You'll need to give moves a bool value on whether or not they trigger transformations. Animelee features temporary transformations and a reversion process, so we implemented a value for that duration. You're right about exposing the values in editor so you can adjust them per character easily. That sort of code you can easily copy and paste what is existing in the source files.

You can create new values for the physics and controlscript scripts to use instead of the default values. It just depends on personal preference. Personally, we use percentage modifiers. For example, when Chicken transforms, his transformSpeedMod changes from 1f to 1.75f. This way, our physics script can just include the transformSpeedMod into the original equation to save us from having to write an if...then and make multiple equations. (speed = moveForwardSpeed * transformSpeedMod), etc.

Best of luck! Cheers!

Ok Im attempting to do this over the weekend I think I know where to start.  Ill be posting to this thread with my progress thank you very much!

Re: Editing move scripts to allow for character transformations

I would love to know this too... since I have moves in my game that will change the states of the opponent and character...

Re: Editing move scripts to allow for character transformations

Oh hi fellas, I totally forgot this post existed.
We'll be posting our discussions regarding transformations in immortalfray's topic here: http://www.ufe3d.com/forum/viewtopic.php?id=784

Cheers!

Share

Thumbs up Thumbs down