Jump to content

Need help fixing a damned script!!! >:(


Recommended Posts

Hey I've been working on a script for my custom ecstacy. I want it to increase the effects for each one you "consume" during the duration. And at 5 doses, you die. Here's what it looks like:

 

scn ZEcstacyEffectBackupScript

 

short count

 

Begin ScriptEffectStart

 

player.triggerhitshader 5

ZDancer1Ref.pms ZEcstacyShader

ZDancer2Ref.pms ZEcstacyShader

ZDancer3Ref.pms ZEcstacyShader

ZFakeDoorRef.pms ZEcstacyShader

ZEcstacyObject1.pms ZEcstacyShader

ZEcstacyObject2.pms ZEcstacyShader

ZEcstacyObject3.pms ZEcstacyShader

ZEcstacyObject4.pms ZEcstacyShader

ZEcstacyBeam1.enable

ZEcstacyBeam2.enable

ZEcstacyBeam3.enable

ZEcstacyBeam4.enable

ZEcstacyBeam5.enable

ZPartyRoomDoor.disable

 

set count to (count + 1)

 

End

 

Begin ScriptEffectUpdate

 

if count >= 1

 

player.triggerhitshader 5

ZDancer1Ref.pms ZEcstacyShader

ZDancer2Ref.pms ZEcstacyShader

ZDancer3Ref.pms ZEcstacyShader

ZFakeDoorRef.pms ZEcstacyShader

ZEcstacyObject1.pms ZEcstacyShader

ZEcstacyObject2.pms ZEcstacyShader

ZEcstacyObject3.pms ZEcstacyShader

ZEcstacyObject4.pms ZEcstacyShader

ZEcstacyBeam1.enable

ZEcstacyBeam2.enable

ZEcstacyBeam3.enable

ZEcstacyBeam4.enable

ZEcstacyBeam5.enable

ZPartyRoomDoor.disable

 

endif

 

if count >= 2

 

ZEcstacyTier11.pms ZEcstacyShader

ZEcstacyTier12.pms ZEcstacyShader

ZEcstacyTier13.pms ZEcstacyShader

ZEcstacyTier14.pms ZEcstacyShader

ZEcstacyTier15.pms ZEcstacyShader

ZEcstacyTier16.pms ZEcstacyShader

 

endif

 

if count >= 3

 

ZEcstacyTier21.pms ZEcstacyShader

ZEcstacyTier22.pms ZEcstacyShader

ZEcstacyTier23.pms ZEcstacyShader

ZEcstacyTier24.pms ZEcstacyShader

ZEcstacyTier25.pms ZEcstacyShader

ZEcstacyTier26.pms ZEcstacyShader

ZEcstacyTier27.pms ZEcstacyShader

ZEcstacyTier28.pms ZEcstacyShader

ZEcstacyTier29.pms ZEcstacyShader

ZEcstacyTier210.pms ZEcstacyShader

ZEcstacyTier211.pms ZEcstacyShader

ZEcstacyTier212.pms ZEcstacyShader

 

endif

 

if count >= 4

 

ZEcstacyTier31.pms ZEcstacyShader

ZEcstacyTier32.pms ZEcstacyShader

ZEcstacyTier33.pms ZEcstacyShader

ZEcstacyTier34.pms ZEcstacyShader

ZEcstacyTier35.pms ZEcstacyShader

ZEcstacyTier36.pms ZEcstacyShader

ZEcstacyTier37.pms ZEcstacyShader

ZEcstacyTier38.pms ZEcstacyShader

ZEcstacyTier39.pms ZEcstacyShader

ZEcstacyTier310.pms ZEcstacyShader

ZEcstacyTier311.pms ZEcstacyShader

ZEcstacyTier312.pms ZEcstacyShader

ZEcstacyTier313.pms ZEcstacyShader

ZEcstacyTier314.pms ZEcstacyShader

ZEcstacyTier315.pms ZEcstacyShader

ZEcstacyTier316.pms ZEcstacyShader

ZEcstacyTier317.pms ZEcstacyShader

ZEcstacyTier318.pms ZEcstacyShader

 

endif

 

if count >= 5

 

player.kill

 

endif

 

End

 

Begin ScriptEffectFinish

 

player.triggerhitshader 0

ZDancer1Ref.sms ZEcstacyShader

ZDancer2Ref.sms ZEcstacyShader

ZDancer3Ref.sms ZEcstacyShader

ZFakeDoorRef.sms ZEcstacyShader

ZEcstacyBeam1.sms ZEcstacyShader

ZEcstacyBeam2.sms ZEcstacyShader

ZEcstacyBeam3.sms ZEcstacyShader

ZEcstacyBeam4.sms ZEcstacyShader

ZEcstacyBeam5.sms ZEcstacyShader

ZEcstacyObject1.sms ZEcstacyShader

ZEcstacyObject2.sms ZEcstacyShader

ZEcstacyObject3.sms ZEcstacyShader

ZEcstacyObject4.sms ZEcstacyShader

ZEcstacyBeam1.disable

ZEcstacyBeam2.disable

ZEcstacyBeam3.disable

ZEcstacyBeam4.disable

ZEcstacyBeam5.disable

ZPartyRoomDoor.enable

ZEcstacyTier11.sms ZEcstacyShader

ZEcstacyTier12.sms ZEcstacyShader

ZEcstacyTier13.sms ZEcstacyShader

ZEcstacyTier14.sms ZEcstacyShader

ZEcstacyTier15.sms ZEcstacyShader

ZEcstacyTier16.sms ZEcstacyShader

ZEcstacyTier21.sms ZEcstacyShader

ZEcstacyTier22.sms ZEcstacyShader

ZEcstacyTier23.sms ZEcstacyShader

ZEcstacyTier24.sms ZEcstacyShader

ZEcstacyTier25.sms ZEcstacyShader

ZEcstacyTier26.sms ZEcstacyShader

ZEcstacyTier27.sms ZEcstacyShader

ZEcstacyTier28.sms ZEcstacyShader

ZEcstacyTier29.sms ZEcstacyShader

ZEcstacyTier210.sms ZEcstacyShader

ZEcstacyTier211.sms ZEcstacyShader

ZEcstacyTier212.sms ZEcstacyShader

ZEcstacyTier31.sms ZEcstacyShader

ZEcstacyTier32.sms ZEcstacyShader

ZEcstacyTier33.sms ZEcstacyShader

ZEcstacyTier34.sms ZEcstacyShader

ZEcstacyTier35.sms ZEcstacyShader

ZEcstacyTier36.sms ZEcstacyShader

ZEcstacyTier37.sms ZEcstacyShader

ZEcstacyTier38.sms ZEcstacyShader

ZEcstacyTier39.sms ZEcstacyShader

ZEcstacyTier310.sms ZEcstacyShader

ZEcstacyTier311.sms ZEcstacyShader

ZEcstacyTier312.sms ZEcstacyShader

ZEcstacyTier313.sms ZEcstacyShader

ZEcstacyTier314.sms ZEcstacyShader

ZEcstacyTier315.sms ZEcstacyShader

ZEcstacyTier316.sms ZEcstacyShader

ZEcstacyTier317.sms ZEcstacyShader

ZEcstacyTier318.sms ZEcstacyShader

set count to (count - 1)

 

End

 

 

The problem is that after 1 dose, it stops keeping track, so new effects don't load. What can I do to ensure that it keeps adding to the total dose count?

Link to comment
Share on other sites

You'll need to keep the 'count' variable outside of the effect script.

Use either a global or a quest variable for that.

 

Each tab of X is getting it's own instance of the script, so each instance of 'count' within will never be greater that 1.

 

BTW, There's a mod that is very similar to what you are doing.

It adds visuals to the alcoholic drinks. More drinks = more visuals.

Drinking by majinshinsa.

Link to comment
Share on other sites

alright. i get what ur saying i think.

 

so if i made a personal script to the actual object, not the effect that looked like:

 

Begin OnEquip Player

 

set ZEcstacyEffects.count to (ZEcstacyEffects.count + 1)

 

End

 

And then change all the ( count ) variables inside the effect script to ( ZEcstacyEffects.count )

Link to comment
Share on other sites

  • Recently Browsing   0 members

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