theuseless Posted July 4, 2012 Share Posted July 4, 2012 (edited) Hi, once again I am here asking for help. I ran into a problem that I cannot figure out. I have tried to use different activators and have the same problems. I have set up a script to run damage spells of different types and magnitudes on prisoners. I can get all the parameters to check properly, just cannot get the spell to focus on the X marker I have placed. I am currently using one of Puff's Invisible Light Switches as my casting activator and an OblivionCitadelSwitch as my trigger (yes, all the objects have unique editor id's). My code looks like this: scn PrisonTortureSwitchAscript short DamageTypeshort Magnitude begin onActivate ;torture types:;0=no effect;1=fire;2=frost;3=shock;4=deadlyset DamageType to OblivionCitadelFireSwitchREF.torturetype ;Torture Damage Amplitude:;0=Low;1=Medium;2=High;3=Maximumset Magnitude to OblivionCitadelLOWref.TortureAmp if DamageType == 0 message "You must select a damage type"endif if DamageType == 1 if Magnitude == 0 PrisonSwitchAref.cast StandardFireDamageTarget1Novice XmarkerPrisonA endifendif end I think that I am casting it properly, the end of the code is where I should have a simple fireball hit towards the Xmarker. All that happens is the invisible activator casts the spell horizontally towards some other location, always the same. I have even tried flipping the activator, rotating it, everything but setting up x,y,z co-ordinates. This script will be modified and applied to a total of 8 switches. Any help will be appreciated,theuseless Edited July 4, 2012 by theuseless Link to comment Share on other sites More sharing options...
Lanceor Posted July 4, 2012 Share Posted July 4, 2012 I can't see anything wrong with the script. I'd probably use some PrintC or Messagebox commands to report what the variables are. I'd also try swapping the activators/XMarkers around to see if they're the culprit. (Using Player as the target is a reliable choice for testing.) Anyone else see anything wrong with the script? Link to comment Share on other sites More sharing options...
WarRatsG Posted July 5, 2012 Share Posted July 5, 2012 There's no logical errors at least. A lot of the functions have little quirks though, especially the vanilla ones. When using cast, I have never used markers, and usually I use an object that is enabled at the time of casting but has a scale of around 0.00000000001 so that you can barely see it. It seems to work for me, so maybe it will work for you. Link to comment Share on other sites More sharing options...
theuseless Posted July 9, 2012 Author Share Posted July 9, 2012 (edited) Thanks, I can't get online every day now, but I will try both options asap. Kudos for the replies. I have found many bugs in the cs and I'm sure that there will be a workaround. Now I have direction. It is nice to have such a great place to get fresh opinions. Thanks again,theuselessJesse Williams -edit- It seems that the engine doesn't like using xmarkers as targets, but doors, activators and npc's work fine. Thanks. I actually streamlined my code a lot by using activators. I also learned how to properly use some more functions! Thanks a lot. Edited July 14, 2012 by theuseless Link to comment Share on other sites More sharing options...
Recommended Posts