Jump to content

Armor Making Problems


bomo99

Recommended Posts

Well, if I recall correctly, chests can just be remote-activated from everywhere in the world regardless of where they are themselves.

 

So whenever you want to open your chest, just issue "<your-chest-editor-id>.activate player" or something along that line from inside your script, and the container dialog for your chest should open.

 

(Activate works a little different than what you would expect. You don't say who activates what but what is activated by whom, so "<your-chest-editor-id>" is activated "by the player". You can also omit the who-activated-it part of the call, as activators which don't interact with their openers, like doors, switches, or some such, don't really need a reference to who activated them. But in your case it's required, of course, as not only the player can open a chest.)

 

Maybe you'll have to first move the chest into your area, by issuing a "<your-chest-editor-id>.moveTo player" or something along that line before you can activate it, but I think to recall that wasn't needed.

Link to comment
Share on other sites

  • Replies 74
  • Created
  • Last Reply

Top Posters In This Topic

so this part "<your-chest-editor-id>.activate player" would be on the spell script correct?

Now im getting an issue

Syntax error. Invalid Reference 'The Storage name here'(Only object references and reference variables are allowed in this context)

when i copy the midas chest remote script type but if i change it to magic effect same thing happens and this is my code for it

scn Chestsummoning

BEGIN onActivate
'The Storage name here'.activate player 0
End

Edited by bomo99
Link to comment
Share on other sites

Uhm, well, this 'The Storage name here' is the same as my <your-chest-editor-id>, just a placeholder, nothing to be used literally like you did. In its place you have to put the EditorID of the container you want to open.

 

If your container's EditorID is for example "LowerClassChest01" (not an actual existing ID as far as I know, but you get the drift), what you have to enter in that line is

LowerClassChest01.activate player

I don't know if you need this "0" they're using there, or if not using it at all wouldn't be exactly the same here, but it's not like you can't just try out both ways and see if any one works differently in the end.

Link to comment
Share on other sites

the editor id i have for the chest that i want to put as the target is this DremoreCache(Editor id) but i keep getting the error

also i now have an issue with the armor when i give it to a female companion i get this

i have isolated the problem to the mask but nothing seems to be wrong in the nif file or through the construction set

Edit: nvm fixed it it was a problem with the construction set i got it fixed

Edited by bomo99
Link to comment
Share on other sites

this is what i put

scn Chestsummoning

BEGIN onActivate
DremoreCache.activate player
End

 

and i keep getting this Error

---------------------------
Script Error
---------------------------
Script 'Chestsummoning', line 4:
Syntax error. Invalid reference 'DremoreCache' (only object references and reference variables are allowed in this context).
---------------------------
OK
---------------------------
i tried object and magic effect type of script and thats what i get

Edited by bomo99
Link to comment
Share on other sites

Is the DremoraCache a container that you have placed in the world, and that is marked as "persistent" (there is a checkbox). The container needs to be a reference (an instance of its base object) placed in the gameworld. The reference needs to be marked as "persistent", and the reference needs to have a unique Editor ID, and you need to use the reference Editor ID in your script (not the base object Editor ID for example). Hopefully that make sense.

 

If you want to use a magic effect script, then you could use it a bit like this:

scriptname ChestSummoningSpellScript

begin ScriptEffectStart
    ; this is the start block if you want to do something here,
    ; like playing visuals as below (uncomment of you want to test them)
    ; they are called on the ref on which this spell effect script runs,
    ; presumably only player at the moment
    ;PlayMagicShaderVisuals effectEnchantMysticism 2.0
    ;PlayMagicEffectVisuals DSPL 2.0
end

begin ScriptEffectFinish
    DremoraCacheRef.Activate PlayerRef ; activate the reference by its editor ID
end

Good luck with your mod! :thumbsup:

 

Edit: Oooops. Removed a variable from the script.

Edited by Contrathetix
Link to comment
Share on other sites

thank you so much the code you gave worked

but now i am trying to have the player read a book to get the spell but unfortunately when i do this

scn ChestGiver

 

Begin OnActivate

Player.addspell DMRChest

End

when you read the book you dont get the spell

Edited by bomo99
Link to comment
Share on other sites

i dont wanna go to far with my mod until i can get the Book script fixed but i wanted to create a summon spell that summon a npc (that i made for the summon) here is the code

scn DMRSummonDremore

ref caster
ref summoned

begin scripteffectstart
set caster to getself
set summoned to caster.placeatme DMRDremore, 1, 32, 1
summoned.moddisposition caster 100
summoned.pme zdre
end

begin scripteffectupdate
if summoned.getdead == 1
summoned.removeme
endif
end

begin scripteffectfinish
if summoned.isactor == 1
summoned.removeme
endif
end

now i gave the npc 3 Ai packages

aaaCreatureExterior1500AllowFalls

aaaCreatureInterior512AllowFalls

FollowPlayer

but when i summon it, it just wanders and doesnt follow the player also if you resummon it before the timer runs out you can get 2 summons when i want it to act like a normal summon. can anyone help me fix this issue.

Link to comment
Share on other sites

For the book script, you could use OnEquip:

scriptname DMRSpellBookScript

begin OnEquip PlayerRef
    if ( PlayerRef.HasSpell DMRChest == 0 )
        PlayerRef.AddSpell DMRChest
    endif
end

As for the summon: you could also use a permanent, sort of "static" actor. Just like the chest. You can have it stored away in a special holding cell, disabled, and then enable and move it to player when the player summons it. When the spell ends, you can move it back to the cell, reset its stats and inventory and such, and then disable it again. Of course it will not work if you need more than one actor to use the spell, but assuming it is for the player only, it might work (getting other actors to use it might also take somemore work).

scriptname DMRSummonDremoraEffectScript

begin ScriptEffectStart
    YourStaticDremoraRef.Enable
    ; perform any inventory and stat resets here, maybe?
    YourStaticDremoraRef.MoveTo PlayerRef
    YourStaticDremoraRef.PlayMagicEffectVisuals ZDRE
end

begin ScriptEffectFinish
    YourStaticDremoraRef.Kill
end

You could then add all the death-related things to your Dremora itself. For example an actor script:

scriptname YourDremoraActorScript

begin OnDeath ; you might want to add a delay somewhere here... OnDeath triggers almost immediately!
    Resurrect 0 ; this might also reset something
    MoveTo AnXMarkerPlacedInYourHoldingCell
    Disable
end

None of that has been tested, though, but maybe it could give you an idea of what the thing might look like. The actor script needs some serious rework, as the OnDeath block executes almost immediately and does not look too great. And I would not recommend running lots of commands in the same frame for one actor, either, if the commands are complicated, as it cometimes can cause an issue or two (crashing). It could also work fine, though. Using a static actor ref would make the spell usable by only player, but it would solve both the issue with two actors being summoned and the use of PlaceAtMe. RemoveMe is for items, not actors. There is currently no scripting command to delete an actor.

Link to comment
Share on other sites

for the book script you gave me i am getting this error
Script Error
Script 'DMRChestSummoner', line 4:
Unknown variable or function 'HasSpell'.

for the summon it works great but the summon doesnt follow the player is there a certain ai package or script that i need to put?

Edited by bomo99
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...