Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Script Requests


Tonycubed2
 Share

Recommended Posts

yes, i have it setup as an active magic script. That's all the script actually .-. I had changed the target actor to the variable name before, but it didn't work, changed it again now. I have no idea why i didn't leave it with the variable name .-. Anyways, i changed it to the variable name, but i still don't know what's wrong, it still doesn't work

 

 

Edit:

 

It's actually working now. Thanks for the help. It didn't work before when i had changed the actor target to the variable because of my save .-.

Edited by Grohiik
Link to comment
Share on other sites

This is a simple one for you.. how do i make npcs in skyrim disapear and then reapear.I know its a event on activate script but i dont know the rest. The script is goin to be activated by a trigger box once the npc's enter the trigger box NOT THE PLAYER.

EXAMPLE

"They will be chasing you, you run through the trigger box, they go through and they disapear, and then reapear in another part of the same cell ahead of you somewhere" with a x marker placed on the floor to signify where they will reapear.

Link to comment
Share on other sites

You place a trigger box zone.

Your script will activate based on the entry trigger of the NPC.

Scriptname LevelersForceFieldScript extends ObjectReference

Actor Property LevelersShanara  Auto 
Actor Property LevelersBilboBaggins  Auto 

ObjectReference Property myMarkerEndREF  Auto  

Event OnTriggerEnter(objectReference activateRef)
	if activateRef == LevelersShanara
		LevelersShanara.MoveTo myMarkerEndREF
	endif
	if activateRef == LevelersBilboBaggins
		LevelersBilboBaggins.MoveTo myMarkerEndREF
	endif
EndEvent
Link to comment
Share on other sites

ah thanks but there is one tiny problem its giving me an error .

 

C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\npcMoveScript.psc(11,18): no viable alternative at input 'MoveTo'

C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\npcMoveScript.psc(14,23): no viable alternative at input 'MoveTo'

 

any reason why?

Edited by vinny1919
Link to comment
Share on other sites

Uhm trying to figure out what's wrong with my attempt:
 

Scriptname equipaggiaarmatura extends ObjectReference  
{Primo test da 0}

Actor Property Lydia  Auto  

Armor Property ornamentalhelmet1  Auto  


Event OnEquipped(Actor akActor)
	if akActor == Lydia
		Game.GetPlayer().EquipItem(ornamentalhelmet1)
		Lydia.EquipItem(ornamentalhelmet1, true)
	endif
EndEvent

That's just an experiment, nothing more, but at last I expected that could work since it's simple, but not;
As you can see if i wear a certain armor part the npc ref will do the same, but no.

 

Link to comment
Share on other sites

Uhm still don't work or I didn't understand well the functions on papyrus:
 

Scriptname equipaggiaarmatura extends ObjectReference  
{Primo test da 0}

Actor Property Lydia  Auto  

Armor Property ornamentalhelmet1  Auto  


Event OnEquipped(Actor akActor)
	if akActor == Lydia
		Game.GetPlayer().EquipItem(ornamentalhelmet1)
                Lydia.AddItem(ornamentalhelmet1)
		Lydia.EquipItem(ornamentalhelmet1, true)
	endif
EndEvent

 

Link to comment
Share on other sites

OnEquipped happens when the item is equipped by akActor. In other words, the actor has to equip the item, and THEN the event will be called. The event was not happening because nobody had yet put on the helmet.

 

Your script checks to see if Lydia put on the helmet (which she can't do by herself), and then puts it on your character, as well as putting it on Lydia again.

 

If you want Lydia to put on the helmet whenever you do, then you would need something like:

Scriptname equipaggiaarmatura extends ObjectReference 
{Primo test da 0}

Actor Property Lydia Auto 

Armor Property ornamentalhelmet1 Auto 


Event OnEquipped(Actor akActor)

    if akActor == Game.GetPlayer()
        Lydia.AddItem(ornamentalhelmet1)
        Lydia.EquipItem(ornamentalhelmet1, true)
    endif

EndEvent

You do not need to use EquipItem on your character, because it was your character putting on the helmet that started the script, so it is already equipped on your character.

Edited by BrettM
  • Upvote 1
Link to comment
Share on other sites

Where does 'ornamentalHelmet' armor piece come from? Is it usable?

 

Also, when you do an 'addItem', you should wait a quarter of a second before trying the equip. The Item 'must' be in the inventory before the equip.

 

And the AddItem sometimes takes a few FPS to actually be added.

  • Upvote 1
Link to comment
Share on other sites

Where does 'ornamentalHelmet' armor piece come from? Is it usable?

It's a custom helmet, playable of course

 

About the wait, maybe I should integrate the same event of the mannequin about the time start up on cell load:

 


	
	;Trace("DARYL - " + self + " Waiting a bit because it's the only way to get code to run in OnCellLoad it seems")
	wait(0.25)
	

But I don't know how actually integrate on my script and that's commented as far as i know.

I'll try with a vanilla helmet just like Brett saying, just to be sure.

Link to comment
Share on other sites

 

Also, make sure you have the script activation correct.

 

This, how, an event to start if i good understand..umm on cell load will be ok?

 

EDIT: Wait give me a debugging error.

 

EDIT2: figure out, it's:

 

Utility.wait(....)
Edited by Veinwolf
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...