BlueSteelRanger Posted April 20, 2023 Author Share Posted April 20, 2023 Cell reference? This bit? "BSRMarkerteleportHomeRef" Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted April 20, 2023 Share Posted April 20, 2023 Give a same reference to your marker and copy it your script after player.moveto Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted April 20, 2023 Author Share Posted April 20, 2023 Ah, that part. ::checks:: Yep, it matches. I even double checked just now, though I likely will again since technically it's late for me in my new time zone, haha. Link to comment Share on other sites More sharing options...
GamerRick Posted April 21, 2023 Share Posted April 21, 2023 (edited) What you are trying to do is simple, which means you are making a dumb mistake somewhere. My guess would be that you setup the spell incorrectly, assuming you figured out how to add an XMarkerHeading and how to give it its own RefID. My recommendation is that you find another spell that also just executes a script and compare your's to it. The only other idea I can think of is that you take and post a screen-shot of the pop-up windows for your spell and the XmarkerHeading item in the CS, and give us the details of every setting and how you set it. Other than that NO ONE can tell what you did wrong when all you say is "it didn't take". Edited April 21, 2023 by GamerRick Link to comment Share on other sites More sharing options...
RomanR Posted April 21, 2023 Share Posted April 21, 2023 If teleporting to your location isn't working, you can practice with teleporting to markers defined in Oblivion. For example this spell script will take you to XMarker in Testing Hall: scn RomRTeleportTestScript ref place begin ScriptEffectStart set place to "244eb" ;straight ID form of XMarker reference in Testing Hall MoveTo place ;ommiting reference before command will assign the one which spell hit ;MoveTo 244eb ;this single command will work too end I'm assuming that your spell is defined right - it contains one Scripted Effect which bears this spell script, and Scripted Effect is set to Self with Duration 1. When you manage this spell to make it work, you can change "244eb" to any editor ID of your reference you like. However your editor ID of reference must be unique to make it work. Link to comment Share on other sites More sharing options...
GamerRick Posted April 22, 2023 Share Posted April 22, 2023 (edited) I found a spell that works the way you want your's to work. Spell: DAHermaeusTrap Every time you cast it, it just fires a script to do its dirty work. Edited April 22, 2023 by GamerRick Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted April 22, 2023 Author Share Posted April 22, 2023 Hmm. Let me see if I can provide some visual references here. I admit, without my guide, I have to try to describe things verbally. Okay. So. I have some Spell Tomes to teach spells. Four of them work perfectly -- teaching non-scripted things like Invisibility or Cure Disease. So this thing won't let me upload the bloody images into the forum (ugh, sightie oriented....). I've uploaded four images to my User Images section, if those might assist. Anyway, the book simply won't teach the spell at all.The spell is targeted to Self, has the one Scripted Effect and its Duration is 2 seconds.My apologies for the late reply here. Let me navigate and listen to these other replies of you all's here. Link to comment Share on other sites More sharing options...
RomanR Posted April 22, 2023 Share Posted April 22, 2023 (edited) I made working example which is attached to "Guide to Cheydinhal" book and this book will teach you a spell when opened, if you choose so. Unfortunately I couldn't find a way to detect when player opens a book in inventory, so I cheated using OBSE command. Here it is: scn RomRBookTeachsSpell ; Guide to Cheydinhal book will teach you spell when opened short choice short wantteach short showbox short doOnce ref me begin OnActivate if GetActionRef == player ;print "Activated by player." if player.HasSpell RomRPushSpell == 0 set wantteach to 1 set showbox to 1 set choice to -1 endif Activate else Activate endif end begin MenuMode if MenuMode 1026 ; this part is for detecting particular book when opened by player if wantteach == 0 && doOnce == 0 && player.HasSpell RomRPushSpell == 0 let me := GetActiveMenuObject 1026 ;OBSE command if me == Book1CheapGuideCheydinhal ; "Guide to Cheydinhal" book set wantteach to 1 set showbox to 1 set choice to -1 set doOnce to 1 ;print "Yes this is a book." endif endif if wantteach != 0 if showbox != 0 MessageBox "As you opened this book, you feel as it wants to give you something. Will you accept?","Yes","No" set showbox to 0 endif set choice to GetButtonPressed if choice == 0 ;yes player.AddSpell RomRPushSpell endif if choice != -1 set wantteach to 0 set doOnce to 1 endif endif elseif MenuMode 1026 == 0 && MenuMode 1001 == 0 ;player selected an answer and closed a book set doOnce to 0 endif end Edited April 22, 2023 by RomanR Link to comment Share on other sites More sharing options...
qwertyasdfgh Posted April 22, 2023 Share Posted April 22, 2023 (edited) OnActivate block on a book will only run if book is read from the world. For it to work from inventory you need to use OnEquip.If you need a working example, just look at any script from official Spell Tomes DLC. Edited April 22, 2023 by qwertyasdfgh Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted April 22, 2023 Share Posted April 22, 2023 OnActivate block on a book will only run if book is read from the world. For it to work from inventory you need to use OnEquip.If you need a working example, just look at any script from official Spell Tomes DLC.You need to use OnAdd with a book, OnEquip only works for the armor, clothes or weapons you equip. https://wiki.nexusmods.com/index.php/An_introduction_to_Oblivion_scripting Link to comment Share on other sites More sharing options...
Recommended Posts