Jump to content

Photo

Membrane shader problem

script shader actor automaton alive effect membrane glow living papyrus

  • Please log in to reply
39 replies to this topic

#21
CALEB2

CALEB2

    Old hand

  • Premium Member
  • 527 posts

Now I have a working nif, and I think I know where to attach the script in CK. (I'll attatch spell to race, magic effect to spell and script to magic effect)

 

There are 5 animations in the nif. (in this order):

 

AnimIdle01 (no glow)

AnimTrans01 (glow fades in)

AnimIdle02 (full glow)

AnimTrans02 (glow fades out)

AnimPulse (pulsating glow)

 

 

I need to make a script that has following properties:

 

Non-living, clutter or scrap type automatons use AnimIdle01 (no glow), automatons in sleeping state or on the loading stand (centurions) use AnimPulse, when waking up, use AnimTrans01, when alive (not dead) use AnimIdle02 (full glow), when dying, use AnimTrans02 (glow fades out).

 

 

Can I use these animation sequences in the script directly, without creating the hkx files ? (There is no movement, just some glow strength changes)

 

What do I need to write into script properties and variables sections ?



#22
maxarturo

maxarturo

    What does this even mean?

  • Supporter
  • PipPipPipPipPip
  • 2,730 posts
"Can I use these animation sequences in the script directly, without creating the hkx files ?"
This depends of what and how you have done it.
 
Here you have a simple draft script to test if your actor will play the animations, this needs a different scripting set up which includes creating an 'Ability Spell', but for now this is a shortcut, do not load a save that you will be in the same cell with the actor because the "OnLoad()" event will not fire.
Draft test script:
EVENT OnLoad()
         Self.PlayAnimation("AnimPulse")
ENDEVENT
 
EVENT OnCombatStateChanged(Actor attacker, int aeCombatState)
   If ( aeCombatState == 1 )
        Self.PlayAnimation("AnimTrans01")
        Utility.Wait(2.0)
        Self.PlayAnimation("AnimIdle02")
EndIf
ENDEVENT
 
EVENT OnDying(ACTOR killer)
        Self.PlayAnimation("AnimTrans02")
ENDEVENT
 
EVENT OnDeath(Actor killer)
        Self.PlayAnimation("AnimIdle01")
ENDEVENT
 
* Add the script to the 'Base Actor'.

Edited by maxarturo, 31 May 2021 - 08:41 PM.


#23
CALEB2

CALEB2

    Old hand

  • Premium Member
  • 527 posts

Can't compile script: "PlayAnimation is not a function or does not exist"



#24
maxarturo

maxarturo

    What does this even mean?

  • Supporter
  • PipPipPipPipPip
  • 2,730 posts
The script must extend "ACTOR".
Example:
Scriptname MyScript extends Actor


#25
CALEB2

CALEB2

    Old hand

  • Premium Member
  • 527 posts

Ok, now it worked. But this way I guess I cannot add the script to the race ?

 

What's a "Base Actor" ?

 

 

What are the base actors for all the Dwemer automatons ?



#26
maxarturo

maxarturo

    What does this even mean?

  • Supporter
  • PipPipPipPipPip
  • 2,730 posts
This is a "Test Script" that you need to use on a "Test Actor" on a "Test Cell" on a "Test ESP", you need to do this to ensure that your actor will play the animations and that your nif is working and not causing bugs or ctds, when you are sure that your nif is working fine, then you will start creating the 'Ability' to insert it on the 'Race'.
 
When we say "insert the script on the Base Actor': Double click on the actor from the actor "Object Window Menu", and add the script on the script's section of the actor.
 
"Base Actor" it's also the "Template Actor", when you insert a script to a "Template Actor" all actors that use that actor as the template will also inherit / use everything that's set up on that actor, if the actor that is using a template actor has all the corresponding 'Flags Ticked'.


#27
CALEB2

CALEB2

    Old hand

  • Premium Member
  • 527 posts

Thanks for helping me.

 

 

I have no idea how to create test actor or test cell or test esp, and how to use them. It's easier for me to test in game. (Current mod I'm working on, is an exception - I usually work on models, textures and effects only)

 

 

 

In the object window, there are no dwemer actors directly in the actors list under the name dwemer or dwarven. Only the custom ones that are under the name DwarvenCenturionRace, DwarvenSphereRace, DwarvenSpiderRace, ect.

 

There are, however LvlDwarvenCenturion (and others like this) - these are the leveled actors I presume ?   

I tested with the LvlDwarvenCenturion, added the script in the Sripts window, but it did not work in game. Do I have to add Properties to the script ?

 

 

Do I have to add something ? I replaced the animation names with animation order numbers - that's how the "magic tablets" are set up. (Did not work either way)

This is the whole script:

 

 

Scriptname AUTOMATON_GLOW extends actor

 

 

EVENT OnLoad()
         Self.PlayAnimation("playanim05")
ENDEVENT

EVENT OnCombatStateChanged(Actor attacker, int aeCombatState)
   If ( aeCombatState == 1 )
        Self.PlayAnimation("playanim02")
        Utility.Wait(2.0)
        Self.PlayAnimation("playanim03")
EndIf
ENDEVENT

EVENT OnDying(ACTOR killer)
        Self.PlayAnimation("playanim04")
ENDEVENT

EVENT OnDeath(Actor killer)
        Self.PlayAnimation("playanim01")
ENDEVENT



#28
maxarturo

maxarturo

    What does this even mean?

  • Supporter
  • PipPipPipPipPip
  • 2,730 posts
You will need to learn how to because you will need it if you want to make your idea work someday, i'll bet 100$ that your nif isn't working and it's all wrong, you can't just copy paste here and just because you see it in NifSkope does not mean that is a nif that can work in game.
This is the biggest trap that all modders fall into, they see it in NifSkope and they assume that it's a working nif.
 
Don't you think that if it was that simple, an experienced modder would have already done this over the years, there are just a handful of mods out there that have something like this, and this is because it's not that simple to do!!.
 
Please do be offended with this and i say it with the best intentions, but:
- Just because you saw the space shuttle doesn't mean that you can drive it... You can, but you need to invest time and learn a lot / educate yourself to get there, now you are just trying to go from A to Z without learning all the alphabet.
 
Good luck my friend and we're always here to answer questions.

Edited by maxarturo, 03 June 2021 - 11:13 AM.


#29
CALEB2

CALEB2

    Old hand

  • Premium Member
  • 527 posts

If you bet 100$, you lose.

 

My nif is working just fine. And it's the opposite - it doesn't seem to work in nifskope, but it works in game. How do I know ? - Simple, if there are animations in nif, the first animation plays in game by default, if no script is attatched. So I tested by changing the animations orders to first in nif and loading the game - the animations worked. Other users have confirmed this.

At first there were some problems like CTD and game freeze, but I fixed them all. (I can send you the nif so you can check it out.)

 

 

I'm not offended, I just need some information about the script. (Sripting and CK are the things I'm not very experienced with)



#30
maxarturo

maxarturo

    What does this even mean?

  • Supporter
  • PipPipPipPipPip
  • 2,730 posts
The fact that your nif plays the first default animation does not mean that it will play the animation sequence.
 
Anyway, the script i posted will prove you if your sequence animation will play in game or not, according always with the order you first provided. If the actor does not play the animations, then the animation sequence will just NOT PLAY!.
 
"... and CK are the things I'm not very experienced with"
Then you haven't done the first fundamental step towards modding, which makes you dangerous. Learning how to create a test actor, cell and esp it's a must when it comes to modding and especially VANILLA ACTORS!!!.

Edited by maxarturo, 03 June 2021 - 04:12 PM.






Also tagged with one or more of these keywords: script, shader, actor, automaton, alive, effect, membrane, glow, living, papyrus

IPB skins by Skinbox
Page loaded in: 1.010 seconds