Re: Temporary power up/ transformation moves during fights
I've gotten as far as exposing my transformation modifiers in the character editor. I have a bool in the moveset script for when a character uses a transformation. Right now I'm trying to figure out how to manipulate the physics and control script once the player transforms. I'm thinking maybe a switch statement so I can go back and forth easily between normal and trasformed state.
Also once I get speed and power working I need to figure out if I can activate a particle effect/ change the characters texture.
3 2016-06-27 19:39:59 (edited by xFTLxKingPhoenix 2016-06-27 19:42:59)
Re: Temporary power up/ transformation moves during fights
You can use the stance change feature
The main thing you need to work on is switching prefabs to the transformed version
The stances already let you change the "walk speed" and you can also change the attack damage of the moves.
The main problem is the shift of prefab when you activate the stance switch . And also put a timer to auto change back when it runs out
Also particle affect can already be added to basic walk and idle animations no coding needed
Current Projects:
Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.
Re: Temporary power up/ transformation moves during fights
Thanks for the suggestion. The reason I can't rely on stance changes is because I want the effect to only last for a short amount of time.
Re: Temporary power up/ transformation moves during fights
You could potentially change the move editor to make a move that is time sensitive can't you.
It's seems like that would be easier with less coding than the way your going about currently.
Current Projects:
Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.
6 2016-07-02 12:06:04 (edited by immortalfray 2016-07-02 12:08:39)
Re: Temporary power up/ transformation moves during fights
Ok so i decided to try it that way with the stance changes and I began by modding character editor window to look like this
I added these lines to CharacterEditorWindow.CS
I had to add some public variables to CharacterInfo.CS
I then modded MoveSetScript.CS
I havent touched the physics or control scripts yet because I thought just using stance changes would be enough.
When I try to test the game I get an UnassignedReferenceException in DefaultCharacterSelectionScreen.CS
It keeps pointing to these lines for both player 1 and 2 when I start the selection screen or if I try to move the cursor when I unpause after the initial error
If anyone has a better way of doing this or could guide me in the right direction I would love that and would be more than happy to share this for the benefit of UFE developers.
I know I for sure assigned the character prefab to legacy mike under hitbox set up so Im confused as to why im getting this error. does it have something to do with previewing the characters at selection screen? how do I fix something like that lol?
Re: Temporary power up/ transformation moves during fights
Hi mate,
I'm trying to wrap my head around the approach you are taking with this functionality. Do you want a completely different character model for the transformation, or do you want just a few different body parts visible (ie. glowing golden hair, a tail, etc.)?
The error you are getting COULD be caused by accidentally setting the "prefab object" by dragging and dropping the instance of the object from the Heirarchy, instead of the Prefab object which would be in your Project tab. It's a pretty easy mistake to make when you're so focused on 100 things at once. If this isn't the problem, then try to track down any code you may have added or changed and start commenting things out until the game runs properly again.
Re: Temporary power up/ transformation moves during fights
You know what I bet that's it. Thank you so much I don't know why i haven't tried commenting out my changes. Im self taught thank you.
Also right now my goal is to just see any change period. I'd prefer the visible body parts feature. I was hoping to just reuse that function once I can trigger the transformation.
Re: Temporary power up/ transformation moves during fights
How did it go? Were you able to get it up and running?
I usually have 3 or 4 backups of my project so I can go back a few hours or a few days if there's problems. If your project keeps having that problem, you might want to create a new UFE project just to get a clean copy of any classes you might have accidentally broken. Replace one file at a time if commenting out changed code doesn't work. Try also taking out any new properties you may have added to classes (for example, new prefabs for transformation forms), cleaning, building and loading the game, and see if it boots up.
Re: Temporary power up/ transformation moves during fights
Interested in this as a way to do the whole Prince Adam transforming into He Man thing. Keep up the detective work.
11 2016-07-06 10:15:22 (edited by immortalfray 2016-07-06 14:18:16)
Re: Temporary power up/ transformation moves during fights
How did it go? Were you able to get it up and running?
I usually have 3 or 4 backups of my project so I can go back a few hours or a few days if there's problems. If your project keeps having that problem, you might want to create a new UFE project just to get a clean copy of any classes you might have accidentally broken. Replace one file at a time if commenting out changed code doesn't work. Try also taking out any new properties you may have added to classes (for example, new prefabs for transformation forms), cleaning, building and loading the game, and see if it boots up.
Hey thank you so much! You were right about assigning a prefab from the heirarchy rather than a prefab in the assets folder.
So I cleared that first error, and now I get this response. The game spits these errors now. The weird animation thing is just to use as a test
So im happy the game can run at the start. My goal currently is just to have the consol print out that Ive triggered a move that triggers a stance change as a power up like in the image below
so these are the lines each error points to
this is what prints out to the console from MoveSetScript.CS from line 315 and i get another error on Line 316
Thank you so much for your help. Yea I made sure to have at least 2 other back ups of previous versions before I make huge changes. I try to put all of my free time into this since I work full time at a hospital right now. Im currently tracing through these errors and trying to knock one out at a time.
Re: Temporary power up/ transformation moves during fights
What sounds like is happening based on the error message is that the character model that the MecanimControl relies on is being removed or destroyed due to the DestroyImmediate. Destroying anything related to the player prefab is an extremely bad idea. It's best to use visibility to achieve the affected of transforming using different bodies or body parts.
Best of luck!
13 2016-07-10 15:19:14 (edited by immortalfray 2016-07-11 13:34:14)
Re: Temporary power up/ transformation moves during fights
What sounds like is happening based on the error message is that the character model that the MecanimControl relies on is being removed or destroyed due to the DestroyImmediate. Destroying anything related to the player prefab is an extremely bad idea. It's best to use visibility to achieve the affected of transforming using different bodies or body parts.
Best of luck!
Ok so im thinking I should move away from stance changes like i originally thought because MoveSetScript calls the function FillMoves which tries to destroy the MecanimControl component.
I tried commenting these out for now but it breaks the game completely.
You say visibility, and I remember you mentioned to add a percent modifier, a bool in MoveSetScript and a duration for the transformation. I havent changed physics or control script yet because im a little confused on how to modify values in those scripts during a transformation.
Could you guide me a little bit more? Ive been poking at different resolutions to these errors, but it seems to always boil down to using a stance change as a bad choice.
14 2016-07-14 16:41:43 (edited by immortalfray 2016-07-14 16:41:57)
Re: Temporary power up/ transformation moves during fights
Ok im taking a step back and trying a different approach. So im just going to trigger the effect inside of a move that only increases the movement speed of a character for testing purposes. I have the move editor window here showing the options so Im trying to linke this to the physics and control script when the move is activated
Re: Temporary power up/ transformation moves during fights
I hope this works.
Current Projects:
Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.
Re: Temporary power up/ transformation moves during fights
Just brainstorming, would it be possible to have say two meshes in the same prefab but the "move stance" change determines which one is visiblity set to 0 or 100?
Re: Temporary power up/ transformation moves during fights
I was thinking this myself, and it seems like it would work if you have the two meshes as long as both are deformed with same armature (i.e. One set of bones). But this would require the imported model itself have both meshes built in. That's a whole lot of "back to the drawing board". If I had such a model it would be easy to animate the change
18 2016-07-17 06:41:08 (edited by immortalfray 2016-07-17 06:42:18)
Re: Temporary power up/ transformation moves during fights
I'll be able to put some time into this today since I'm not working. Once I can get the move to print out that a transformation has happened during the move and make the duration timer count down then my plan in theory was to implement the body part visibility function and a particle effect.
Re: Temporary power up/ transformation moves during fights
No worries. For Animelee's transformation speed modification, we use a float such as transformationSpeed;
By default, this value is always 1f, especially in non-transformed state. We do this because it substantially reduces the amount of modifications we need to make to the existing equations.
I'm not a different machine that doesn't have our source code so I don't have our project on hand. What you'll want to do is just insert your "transformationSpeed" float value into the PhysicsScript functions that affect movement speed. You'll want to modify both the move forward, move backward, and jumping distance. Simply multiply those values by your "transformationSpeed".
We use a targetTransformationSpeed and expose that in the character editor. When the character transforms, we set transformationSpeed = targetTransformationSpeed;
That way, you can set the targetTransformationSpeed to anything you like in the editor. If you set that value to 1.25f, the character will be 25% faster. If you set it to 2f, that character will be twice as fast as fast.
That's how Freiza does it, that's how Goku does it, so that's how we do it.
Re: Temporary power up/ transformation moves during fights
Ok i think i understand what youre saying now and thank you for clarifying on how to implement the modifier in the physics script. My school finals are almost over and Ill be able to try this soon.
Re: Temporary power up/ transformation moves during fights
I was thinking this myself, and it seems like it would work if you have the two meshes as long as both are deformed with same armature (i.e. One set of bones). But this would require the imported model itself have both meshes built in. That's a whole lot of "back to the drawing board". If I had such a model it would be easy to animate the change
For mesh model changes in the character, that is how I would advise doing it. You can toggle the meshRenderer for each character state (normal, transformed), by building a functionality into the moves. Naturally, the easiest way to manage that is to have both meshRenderers rigged to the same joint, but it seems like you know what you're doing there.
We added a bool value to moves, (specifically in the particle effect section), so that the controlScript function of creating a particle effect can trigger the transformation. This isn't necessary and there are much neater ways to do it, but for Animelee, it saved us a lot of time to attach the transformation this part of the script, since all transformations occur the exact same way and are always attached to a "special effect". Also, this part of controlScript is very reliable, easy to understand, easy to edit, and never fails due to unexpected overlaps of actions and states.
22 2016-07-24 21:10:50 (edited by Meractus 2016-07-24 21:58:47)
Re: Temporary power up/ transformation moves during fights
Hello Guys. After some time messing around with the code, I came up to a solution to the FillMoves() problem.
I posted it here: http://www.ufe3d.com/forum/viewtopic.php?pid=3960
Re: Temporary power up/ transformation moves during fights
christougher wrote:I was thinking this myself, and it seems like it would work if you have the two meshes as long as both are deformed with same armature (i.e. One set of bones). But this would require the imported model itself have both meshes built in. That's a whole lot of "back to the drawing board". If I had such a model it would be easy to animate the change
For mesh model changes in the character, that is how I would advise doing it. You can toggle the meshRenderer for each character state (normal, transformed), by building a functionality into the moves. Naturally, the easiest way to manage that is to have both meshRenderers rigged to the same joint, but it seems like you know what you're doing there.
We added a bool value to moves, (specifically in the particle effect section), so that the controlScript function of creating a particle effect can trigger the transformation. This isn't necessary and there are much neater ways to do it, but for Animelee, it saved us a lot of time to attach the transformation this part of the script, since all transformations occur the exact same way and are always attached to a "special effect". Also, this part of controlScript is very reliable, easy to understand, easy to edit, and never fails due to unexpected overlaps of actions and states.
That is so helpful to know thank you. My semester is about to end so Ill be full time on this until it works for the next month.
Re: Temporary power up/ transformation moves during fights
K semester's over. Taking another stab at this now.
Re: Temporary power up/ transformation moves during fights
I finally have the skinned mesh renderers switching in between the transformed and non transformed states.
Next I need to modify the stats for speed and damage.
Also I am still stumped on why particle effects wont stick to my player.
[media]https://www.youtube.com/watch?v=NCZ1PLU … e=youtu.be[/media]