ABVXYzackattack Posted August 15, 2011 Share Posted August 15, 2011 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 5ZDancer1Ref.pms ZEcstacyShaderZDancer2Ref.pms ZEcstacyShaderZDancer3Ref.pms ZEcstacyShaderZFakeDoorRef.pms ZEcstacyShaderZEcstacyObject1.pms ZEcstacyShaderZEcstacyObject2.pms ZEcstacyShaderZEcstacyObject3.pms ZEcstacyShaderZEcstacyObject4.pms ZEcstacyShaderZEcstacyBeam1.enableZEcstacyBeam2.enableZEcstacyBeam3.enableZEcstacyBeam4.enableZEcstacyBeam5.enableZPartyRoomDoor.disable set count to (count + 1) End Begin ScriptEffectUpdate if count >= 1 player.triggerhitshader 5ZDancer1Ref.pms ZEcstacyShaderZDancer2Ref.pms ZEcstacyShaderZDancer3Ref.pms ZEcstacyShaderZFakeDoorRef.pms ZEcstacyShaderZEcstacyObject1.pms ZEcstacyShaderZEcstacyObject2.pms ZEcstacyShaderZEcstacyObject3.pms ZEcstacyShaderZEcstacyObject4.pms ZEcstacyShaderZEcstacyBeam1.enableZEcstacyBeam2.enableZEcstacyBeam3.enableZEcstacyBeam4.enableZEcstacyBeam5.enableZPartyRoomDoor.disable endif if count >= 2 ZEcstacyTier11.pms ZEcstacyShaderZEcstacyTier12.pms ZEcstacyShaderZEcstacyTier13.pms ZEcstacyShaderZEcstacyTier14.pms ZEcstacyShaderZEcstacyTier15.pms ZEcstacyShaderZEcstacyTier16.pms ZEcstacyShader endif if count >= 3 ZEcstacyTier21.pms ZEcstacyShaderZEcstacyTier22.pms ZEcstacyShaderZEcstacyTier23.pms ZEcstacyShaderZEcstacyTier24.pms ZEcstacyShaderZEcstacyTier25.pms ZEcstacyShaderZEcstacyTier26.pms ZEcstacyShaderZEcstacyTier27.pms ZEcstacyShaderZEcstacyTier28.pms ZEcstacyShaderZEcstacyTier29.pms ZEcstacyShaderZEcstacyTier210.pms ZEcstacyShaderZEcstacyTier211.pms ZEcstacyShaderZEcstacyTier212.pms ZEcstacyShader endif if count >= 4 ZEcstacyTier31.pms ZEcstacyShaderZEcstacyTier32.pms ZEcstacyShaderZEcstacyTier33.pms ZEcstacyShaderZEcstacyTier34.pms ZEcstacyShaderZEcstacyTier35.pms ZEcstacyShaderZEcstacyTier36.pms ZEcstacyShaderZEcstacyTier37.pms ZEcstacyShaderZEcstacyTier38.pms ZEcstacyShaderZEcstacyTier39.pms ZEcstacyShaderZEcstacyTier310.pms ZEcstacyShaderZEcstacyTier311.pms ZEcstacyShaderZEcstacyTier312.pms ZEcstacyShaderZEcstacyTier313.pms ZEcstacyShaderZEcstacyTier314.pms ZEcstacyShaderZEcstacyTier315.pms ZEcstacyShaderZEcstacyTier316.pms ZEcstacyShaderZEcstacyTier317.pms ZEcstacyShaderZEcstacyTier318.pms ZEcstacyShader endif if count >= 5 player.kill endif End Begin ScriptEffectFinish player.triggerhitshader 0ZDancer1Ref.sms ZEcstacyShaderZDancer2Ref.sms ZEcstacyShaderZDancer3Ref.sms ZEcstacyShaderZFakeDoorRef.sms ZEcstacyShaderZEcstacyBeam1.sms ZEcstacyShaderZEcstacyBeam2.sms ZEcstacyShaderZEcstacyBeam3.sms ZEcstacyShaderZEcstacyBeam4.sms ZEcstacyShaderZEcstacyBeam5.sms ZEcstacyShaderZEcstacyObject1.sms ZEcstacyShaderZEcstacyObject2.sms ZEcstacyShaderZEcstacyObject3.sms ZEcstacyShaderZEcstacyObject4.sms ZEcstacyShaderZEcstacyBeam1.disableZEcstacyBeam2.disableZEcstacyBeam3.disableZEcstacyBeam4.disableZEcstacyBeam5.disableZPartyRoomDoor.enableZEcstacyTier11.sms ZEcstacyShaderZEcstacyTier12.sms ZEcstacyShaderZEcstacyTier13.sms ZEcstacyShaderZEcstacyTier14.sms ZEcstacyShaderZEcstacyTier15.sms ZEcstacyShaderZEcstacyTier16.sms ZEcstacyShaderZEcstacyTier21.sms ZEcstacyShaderZEcstacyTier22.sms ZEcstacyShaderZEcstacyTier23.sms ZEcstacyShaderZEcstacyTier24.sms ZEcstacyShaderZEcstacyTier25.sms ZEcstacyShaderZEcstacyTier26.sms ZEcstacyShaderZEcstacyTier27.sms ZEcstacyShaderZEcstacyTier28.sms ZEcstacyShaderZEcstacyTier29.sms ZEcstacyShaderZEcstacyTier210.sms ZEcstacyShaderZEcstacyTier211.sms ZEcstacyShaderZEcstacyTier212.sms ZEcstacyShaderZEcstacyTier31.sms ZEcstacyShaderZEcstacyTier32.sms ZEcstacyShaderZEcstacyTier33.sms ZEcstacyShaderZEcstacyTier34.sms ZEcstacyShaderZEcstacyTier35.sms ZEcstacyShaderZEcstacyTier36.sms ZEcstacyShaderZEcstacyTier37.sms ZEcstacyShaderZEcstacyTier38.sms ZEcstacyShaderZEcstacyTier39.sms ZEcstacyShaderZEcstacyTier310.sms ZEcstacyShaderZEcstacyTier311.sms ZEcstacyShaderZEcstacyTier312.sms ZEcstacyShaderZEcstacyTier313.sms ZEcstacyShaderZEcstacyTier314.sms ZEcstacyShaderZEcstacyTier315.sms ZEcstacyShaderZEcstacyTier316.sms ZEcstacyShaderZEcstacyTier317.sms ZEcstacyShaderZEcstacyTier318.sms ZEcstacyShaderset 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 More sharing options...
viennacalling Posted August 16, 2011 Share Posted August 16, 2011 Try putting all the contents of the ScriptEffectUpdate block inside the ScriptEffectStart block. Link to comment Share on other sites More sharing options...
tunaisafish Posted August 16, 2011 Share Posted August 16, 2011 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 More sharing options...
ABVXYzackattack Posted August 16, 2011 Author Share Posted August 16, 2011 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 More sharing options...
stevie70 Posted August 16, 2011 Share Posted August 16, 2011 ZEcstacyObject4.pms ZEcstacyShaderman, your stuff sure got a LONG side fx list...hehe... ;-)) Link to comment Share on other sites More sharing options...
ABVXYzackattack Posted August 17, 2011 Author Share Posted August 17, 2011 hehehe...giggity giggity...alright. :) u just made my day dude. i was all pissed off that i couldnt get this s*** working, and now i got a good laugh. thnx Link to comment Share on other sites More sharing options...
Recommended Posts