Jump to content

Recommended Posts

Posted

Does anyone know how to make a script reduce a float value in another script by a specific amount, is it possible/easy?

scripting it the same way as to change a 'short' does not work.

 

these are the relevant parts of my scripts (which work in place):

 

--------------------------------------------------

;this is for a potion effect

 

scn VTWEAKvampirefeedscript

 

ref vampirefeedREF

 

Begin ScriptEffectFinish

set vampirefeedREF to GetSelf

If ( PCVampire >= 1 && vampirefeedREF.GetIsReference Player == 1 )

set VTWEAKhungry.hungry -50 ;##this line not work##

MessageBox "That hits the spot!!"

endif

end

 

--------------------------------------------------

;part of vampirescript

 

If ( PCVampire >= 1 )

if ( Player.HasVampireFed == 1 )

set VTWEAKhungry.hungry -100 ;##this line not work##

MessageBox "Your hunger for blood has been satisfied... for now."

endif

endif

 

--------------------------------------------------

;hungry timer script excerpt

 

scn VTWEAKhungryscript

 

float hungry

float fQuestDelayTime

 

begin gameMode

set fQuestDelayTime to 0.001

 

if (pcvampire <=0 )

return

endif

 

if (pcvampire >= 1 )

if ( hungry < 180 ) ;this is a plceholder time until i get things running smoothly

set hungry to hungry + getsecondsPassed

else

Message "you are hungry"

endif

endif

----------------------------------------------------

 

any suggestions will be appreciated

Posted
In Oblivion scripting language, variables do not seem to readily carry over from one script to another unless they are global variables. Have you tried it with global variables yet?
Posted

Qquix- i tried that, it does not recognise the 'hungry' variable :(

 

David - i had not tried a global.... but just tried your suggestion and it works, thanks!! ......but... i would like to be able to REDUCE the amount rather than SET it to something if possible, any ideas?

  • Recently Browsing   0 members

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