Jump to content

Problems with casting from Activator


theuseless

Recommended Posts

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 DamageType

short Magnitude

 

begin onActivate

 

;torture types:

;0=no effect

;1=fire

;2=frost

;3=shock

;4=deadly

set DamageType to OblivionCitadelFireSwitchREF.torturetype

 

;Torture Damage Amplitude:

;0=Low

;1=Medium

;2=High

;3=Maximum

set 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

endif

endif

 

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 by theuseless
Link to comment
Share on other sites

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

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

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,

theuseless

Jesse 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 by theuseless
Link to comment
Share on other sites

  • Recently Browsing   0 members

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