#Deployables help

1 messages · Page 1 of 1 (latest)

haughty plover
#

I can't figure out how to use the Module_Deployable with my gameobject. Mainly, what parameters I need to set in the Animator.

I just need to extend the heatshield, and retract the heat shield when the player toggles it.

I've included the .json for the part.

  1. What am I missing in the .json? Did I do something wrong?
  2. What are the parameters I need to use from Module_Deployable?
  3. Do I need an idle state, and if so does it need an animation clip attached?
#

I don't see any reason to make a custom data/module as I'm not modifying the behaviour or adding any additional functionality to this. im simply trying to use the modules the dev's already have in game and struggling to figure out how to implement it

deft dagger
#

@austere steeple might be the best to help you with this

haughty plover
#

pretty sure I have to have 3 scripts in my mod to make it work properly otherwise the game cant find my gameobject. testing it out now

austere steeple
#

You only need to use the isDeployed trigger

#

Your transitions seems correct tho

#

Tomorow by 4pm GMT ill be home, then i cal help u a bit more

whole heron
#

Hy cvusmo. I use 4 states : deploy, retract, deployed, rétracted (defaut)
Retracted -> retract : boolean isDeployed
Retracted & Deployed : add animstateinformer
I'm at work. I ll send you screenshoot this evening.

#

Deployed->retract: boolean isDeployed

#

I don't use scripts With my parts

#

Deploy : animation
Retract : animation
I use an unity script which automatic frame inverse of an animation
Retracted & deployed : animation with only one frame

#

Hope it helps you

austere steeple
#

use the trigger

#

animationReverseTrigger or smth similar

#

it automatically does that for you

whole heron
#

exact Lux.
boolean isDeployed becomes True when toggle on, and false when toggle off
Trigger **animationReverseTrigger **is activated when toggle is changed during deployement ou rectracting animations

whole heron
austere steeple
#

wait so you use 2 diffrent animations?

whole heron
#

i can change one if i need/want, but it s not necessary

#

i m not using speed -1 to play reverse

#

it's better for sound, i can place sound events like i need on each one

whole heron
# austere steeple you dont need a unity script for that

The script I was talking about is a unity editor script. It reverses the frames of an animation. I copy the retract animation then I rename it deploy. The script then allows me to reverse all the frames of the animation. I don't know if my explanations are clear...

austere steeple
#

you can just make the other animation have a speed of -1

#

and it will reverse it for you :D

whole heron
#

yes, i know . Problem for me is that events for sound (play / stop) and when i put speed -1, the first sound event is stop 🙂 et the last on is play

haughty plover
#

this makes me happy to see. i just woke up. thank you!

haughty plover
#

Before reading this I did a lot of learning. I figured out the -1 trick I also went through Data_Deployable and Module_Deployable. I saw the animationReverseTrigger thing. I realized I'm going to need to have a custom module to deploy, decouple, and do heatshield things. Why? Maybe I don't need to, but I want to? If I can access those modules with my module, then i should be able to customize my heatshields.

For example, I want my origami heat shield to start with a fairing and decouple when told to, then be able to extend and retract. Right now im on the getting it to extend and retract phase.

I've attached the scripts I have for the mod. It's definitely overkill and would be much easier to just use Module_Deployable.

But, this is helping me learn a lot. I also enjoy making custom modules and I think it gives me far more control over my parts than just using stock modules.

haughty plover
haughty plover
whole heron
#

I m not a King in coding c#

austere steeple
#

you dont need that, thats all already included on the Module_Deployement