Immersive Magic

Post » Mon Sep 16, 2013 11:24 am

I am working an overhaul of the magic system and one of the features will introduce Spell Tome, much like you get in Skyrim. I have them working great through a script, but one minor issue I have is that once they are dropped as a world object they cannot be picked up again which would be a bit annoying for anyone who wants to drop them and sell later, for example.

Here is my script layout
Spoiler

Scriptname (name)short doOncebegin onactivate	if doOnce == 0		Activate		playsound (sound)		Player.AddSpell (spell)		set doOnce to 1	endifendbegin onequip	if doOnce == 0		Activate		playsound (sound)		Player.AddSpell (spell)		set doOnce to 1	endifend

What would I need to edit to prevent the tome from being disabled once it becomes a world object? I am pretty much a noob with scripting, it's something I am currently still learning so need help now and then.
User avatar
Shirley BEltran
 
Posts: 3450
Joined: Wed Jul 26, 2006 4:14 pm

Post » Mon Sep 16, 2013 10:35 am

Aren't spell tomes introduced by the Spell Tomes DLC? Or are you doing something else?

User avatar
Quick draw II
 
Posts: 3301
Joined: Thu Nov 08, 2007 4:11 pm

Post » Mon Sep 16, 2013 11:24 am

They are but I don't have that one, but from what I have seen they don't have tomes for all the spells which mine does plus mine adds levelled variants of vanilla ones - for example the absord agility novice spell now has apprentice, journeyman, expert, master, and grand master versions which will also be sold by merchants and maybe added to scrolls. I am also adding a buttload of new spells which I know the DLC does too, but like I said I don't have that one and I would like to make my own and a LOT more.

This mod will also have more enchants with new equipment, NPCs and creatures will take advantage of the new magic, new powers, and anything I feel like adding down the line, so it's not like i'm copying the DLC it will be an overhaul.

User avatar
Matthew Aaron Evans
 
Posts: 3361
Joined: Wed Jul 25, 2007 2:59 am

Post » Mon Sep 16, 2013 3:43 am

Do they have collision? If an object lacks collision, you won't be able to pick up again.

User avatar
laila hassan
 
Posts: 3476
Joined: Mon Oct 09, 2006 2:53 pm

Post » Mon Sep 16, 2013 11:37 am

Yes, it's just using a regular book with a new texture. It can be picked up initially but the script prevents from repeating, it's something to do with the 'DoOnce' so maybe it's just a case restructuring the script but i'm not sure.

User avatar
Pumpkin
 
Posts: 3440
Joined: Sun Jun 25, 2006 10:23 am

Post » Mon Sep 16, 2013 10:41 am

Try this instead:

Scriptname (name)short doOncebegin OnActivate	if doOnce == 0		playsound (sound)		Player.AddSpell (spell)		set doOnce to 1	endif        Activateendbegin OnEquip	if doOnce == 0		playsound (sound)		Player.AddSpell (spell)		set doOnce to 1	endifend
User avatar
Sabrina Schwarz
 
Posts: 3538
Joined: Fri Jul 14, 2006 10:02 am

Post » Mon Sep 16, 2013 5:43 am

Cool i'll try it out later, i'm out all day today so will probably not be able to test this out until tomorrow.

Thanks :)

User avatar
R.I.P
 
Posts: 3370
Joined: Sat Dec 01, 2007 8:11 pm


Return to IV - Oblivion