Jump to content

i need some help with my mod!


glad0s98

Recommended Posts

So im making custom armor thats kinda like nanosuit from crysis. I need help scripting sounds for it. I need script to play different sounds in these conditions:

 

Player has equipped nanosuit AND

. -- player has 75% health left

. -- player has 50% health left

. -- player has 25% health left

. -- player dies

. -- player enters combat

- player equips nanosuit

- player unequips nanosuit

 

I also need to do magic effect that constantly drains magicka while active and disappears when magicka bar is empty.

And also, how do you increase player's jump height with spell?

 

I know im asking (maybe) too much, but help is appreciated! :)

Link to comment
Share on other sites

Just going to track this topic. I'm also interested in getting it so certain abilities slowly drain magicka and then dissapear once out of magicka. Just adding the effect 'damage magicka' and setting it to 1 works pretty good to slowly drain magicka as it effective blocks any magicka regen. But no idea how to make the spell shut off, I guess it'll need to be scripted effect.

Link to comment
Share on other sites

I think I can help with the 75%, 50%, 25% stuff. On the armor piece, you could try a script like:

 

 

 

float Property UpdateInterval auto
Sound Property Sound01 auto
Sound Property Sound02 auto
Sound Property Sound03 auto
int PlayerMaxHealth = 100
player = Game.GetPlayer()

Event OnEquipped(Actor akActor)
if akActor == player
PlayerMaxHealth = akActor.GetAV("Health")
RegisterForUpdate(UpdateInterval)
endif
endEvent

Event OnUpdate()
if (player.GetAV("Health") / PlayerMaxHealth) <=0.75 && (player.GetAV("Health") / PlayerMaxHealth) > 0.5
Sound01.Play(player)
elseif (player.GetAV("Health") / PlayerMaxHealth) <=0.5 && (player.GetAV("Health") / PlayerMaxHealth) > 0.25
Sound02.Play(player)
elseif (player.GetAV("Health") / PlayerMaxHealth) <= 0.25
Sound03.Play(player)
else
;do nothing
endif
endEvent

Event OnUnequipped(Actor akActor)
UnregisterForUpdate()
endEvent
 

 

 

I believe that this should work, but I'll test it first.

Link to comment
Share on other sites

I also tried doing that myself:

 

HealthsoundsSkript extends ObjectReference
SOUND property 75%sound auto
float playersHealth = Game.GetPlayer().GetActorValuePercentage("health")
Event
if (Game.GetPlayer().IsEquipped())
if (playersHealth = 0.75)
int Function Play(75%sound)
Endevent
Link to comment
Share on other sites

Now, it's working (as far as the Creation Kit is able to compile it):

 

 

 

Scriptname TestArmorScript001 extends ObjectReference  


float Property UpdateInterval auto ;probably best to set it to 1 or longer
Sound Property SoundEquip auto ;the sound that plays on equipping the item
Sound Property Sound01 auto ;the sound that plays if the player has between 0.50 and 0.75 health
Sound Property Sound02 auto ;the sound that plays if the player has between 0.25 and 0.50 health
Sound Property Sound03 auto ;the sound that plays if the player is below 0.25 health
Sound Property SoundUnequip auto ;the sound that plays on unequipping the item
float PlayerMaxHealth = 100.0


Event OnEquipped(Actor akActor)
if akActor == Game.GetPlayer()
SoundEquip.Play(Game.GetPlayer())
PlayerMaxHealth = akActor.GetAV("Health")
RegisterForUpdate(UpdateInterval)
endif
endEvent


Event OnUpdate()
if (Game.GetPlayer().GetAV("Health") / PlayerMaxHealth) <=0.75 && (Game.GetPlayer().GetAV("Health") / PlayerMaxHealth) > 0.5
Sound01.Play(Game.GetPlayer())
elseif (Game.GetPlayer().GetAV("Health") / PlayerMaxHealth) <=0.5 && (Game.GetPlayer().GetAV("Health") / PlayerMaxHealth) > 0.25
Sound02.Play(Game.GetPlayer())
elseif (Game.GetPlayer().GetAV("Health") / PlayerMaxHealth) <= 0.25
Sound03.Play(Game.GetPlayer())
else
;do nothing
endif
endEvent


Event OnUnequipped(Actor akActor)
UnregisterForUpdate()
SoundUnequip.Play(Game.GetPlayer())
endEvent

 

 

I'm not sure if you wanted it, but this script will continuously play those sounds at the interval set by "UpdateInterval" if the criteria is met.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...