Jump to content

Various Questions About Creating Script For Armor/Clothing


RetralRX

Recommended Posts

EDIT: Since those line inside gamemode block and gamemode check conditions for every frame, this explains that why sound comes out like that because engine spamming it in every frame. Now that out of the way.. New question: How do I set delay for that lines. I would like it repeat every 5 minutes instead of every frame

 

Hi
First of all here is my script; (Warning Its a mess though lol)

 

ScriptName MKIIAssassinsSuitScript

Short PowerUp
Float SayTimer

Begin OnEquip Player
	Set PowerUp to 1
     Set Saytimer to 1
End

Begin OnUnequip
	Set PowerUp to 0
End

Begin GameMode
	If PowerUp == 1
		MKIISuitVoice.Say MKIISuitStart 1 CrMisterGutsy 1
		Set PowerUp to 0
	EndIf
	If Player.getAV radiationrads >=30
		MKIISuitVoice.Say MKIISuitCondition 1 CrMisterGutsy 1
        ElseIf SayTimer < GameDaysPassed
     	        MKIISuitVoice.Say MKIISuitCondition 1 CrMisterGutsy 1
     	        MKIISuitVoice.Set SayTimer to GameDaysPassed + 0.1
	EndIf
	If Player.getAV InventoryWeight >=90
		MKIISuitVoice.Say MKIISuitCondition 1 CrMisterGutsy 1
	EndIf
	If playerRef.getav health <100
	        MKIISuitVoice.Say MKIISuitCondition 1 CrMisterGutsy 1
	EndIf
End

I've been trough a lot of tutorials and sources past few days. I've never created a script before. I was trying to create a script for my custom armor through mimicking Prototype Medic Armor's script. My aim was to make armor verbally comment on player's stats such as accumulated radiation, inventory weight, health state via using necessary audio file. Here comes the questions:

 

When the audio file starts to play (for example my character's radiation above 30), it comes out buggy, echoing like thousand times, It almost like engine try to play the same audio file 100 times at the same time. What is causing this? If It does on repeat, how do I put some kind of delay to this.(For example if conditions are met, repeat every five minutes)

 

I also wonder how this getAV function work. It Is percentage based like 1=%100 or direct value that shows in game.

 

Edited by RetralRX
Link to comment
Share on other sites

  • Recently Browsing   0 members

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