Jump to content

Photo

Script Requests


  • Please log in to reply
177 replies to this topic

#1
Tonycubed2

Tonycubed2

    Senior Member

  • Senior Allies
  • 40 posts


Users Awards

Posted Image


This topic will be pinned and used for script requests. I do not think we will have quick responses until the forum grows and users know it exists. But you are welcome to posts any requests.
  • 0

#2
WillieSea

WillieSea

    Senior Scholar

  • Skyrim Scholars
  • 4,805 posts


Users Awards
:smarty: Smarty says: If your going to request a script, you should be prepared to explain every step you need to happen, down to the smallest details.
Programming requires the minute details in order to do what you want.

And please remember, we are all learning, so we may not know how to do something yet, or it may be impossible to do what you want in script.
  • 0

#3
ElisHere

ElisHere

    Novice

  • Allies
  • 10 posts
I have more things to do than I have time for. So I am hoping this idea will appeal to someone who has the knowledge to write the script (I don't, yet) and then I can learn from what they write.

I would like to see some automatic clothes swapping done whenever the player enters or exits his home. If it works the way I think it should, it would involve a mannequin, a hidden chest, and the player-enter-exit activator (I forget the exact name). It should be written so it can be enhanced to include the player's follower, if there is one.

When the PC enters the house and the activator fires, the clothing/armor on the PC should go to the hidden chest. The clothing/armor on the mannequin would be worn by the PC, not just placed in inventory. Then the clothing/armor in the chest would be placed on the mannequin.

When the PC exists the house, then the process would reverse itself.

Does this sound doable?
  • 0

#4
DarkRider

DarkRider

    Site Commander

  • TESA Team
  • 10,514 posts


Users Awards
I would like to see an example script for a basic activator that presents choices like:

1) Player activates object

2) Message asks "Would you like to do this?" "yes" "no"

3) If Yes, do something

4) If No, do nothing

If the player chooses yes, the script shouldn't run again if activated later. If they choose no, they should be able to return later and choose yes or no.

Please and thank you. XD
  • 0

#5
WillieSea

WillieSea

    Senior Scholar

  • Skyrim Scholars
  • 4,805 posts


Users Awards
Hi Rider,
This exact thing is covered in class #1. The 'do once' can be added with a simple variable added to the final script. The class also covers how to create and attach the messages to the script.

int doOnce

EVENT onActivate(objectReference akActionRef)
	If ( akActionRef == Game.GetPlayer() && doOnce == 0 )
		Button = question.show()
		if Button == 0
			Yes.show()
			doOnce = 1
			Game.GetPlayer().AddItem(Gold001, 1000, true)
		elseif Button == 1
			No.show()
		endif
	EndIf
endEVENT

:smarty: Smarty Says: '==' is a condition check, where '=' sets the left variable name to the value of the right variable name.
  • 0

#6
DarkRider

DarkRider

    Site Commander

  • TESA Team
  • 10,514 posts


Users Awards
Perfect thanks mate :good:
  • 0

#7
KahjiitRaj

KahjiitRaj

    Layman

  • Allies
  • 5 posts
I'm trying to get a script working and could really use a hand from someone with a bit more experience. What I need it to do is to keep track of how many of an object has been found but it need to be able to be applied to different objects. I want it to pop up with a message window and say "You have found object 1", "You have found object 2" etc, until the last one is found when it says "Congratulations! You have found the last Object". The script is a modified version of the "hello world" tutorial script, thats how much of a beginner I am. I've tried adding the script to a few different objects and when each is picked up I receive the first message no matter how many I have already picked up. I'm not sure how to make the count keep track when the script is applied to multiple objects and I will also need to figure a way to make the count remain the same if an object is dropped and/or picked back up again. Thanks in advance for any help!

Scriptname ObjectCountScript extends ObjectReference  
{Script to keep track of # of objects discovered}

 int count  ;stores the number of objects discovered
 
 Event OnActivate(ObjectReference akActionRef)
    count = count + 1
 
    if count == 1
       Debug.MessageBox("You have discovered your first Hidden Object!")
    elseif count == 2
       Debug.MessageBox("You have discovered your second Hidden Object!")
    else
       Debug.MessageBox("Congratulations! You have found them all!")
    endif
 endEvent

  • 0

#8
tunaisafish

tunaisafish

    Layman

  • Allies
  • 6 posts
You're on the right track, but each script has its' own variables (so you'll have 3 different 'count' values).
The easiest way for the 3 items to share the count value is to use a global.

Then add this script to each of your 3 secret objects.
Scriptname ObjectCountScript extends ObjectReference  
{Script to keep track of # of objects discovered}

GlobalVariable Property MyCounter Auto ;You need to create the Global and assign it to this property in the CK

auto State waiting	
	Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
		if (Game.GetPlayer() == akNewContainer) ; the player has picked up the object
			GoToState("inactive") ; Ensures this only ever happens once
			Int count = Mycounter.Mod(1.0) As Int ; Add 1 and then fetch the total
			if count == 3
				; Woohoo!
			endif
		endif
	EndEvent
EndState

State inactive
EndState

  • 0

#9
KahjiitRaj

KahjiitRaj

    Layman

  • Allies
  • 5 posts
Perfect! Thank you very much. I'll be sure and throw you a credit when the mods done. I really appreciate the work.
  • 0

#10
Altrunchen

Altrunchen

    Initiate

  • Allies
  • 36 posts
Hello there I would appreciate some help with a script that doesn't exist and yet still has many other scripts that come close to resembling its function. I have searched high and low for a script that could meet this end, and the closest I could come was a script that would only fire once. I am terrible at programming, but I deeply love making things, especially in the Creation Kit. I am on a mission of mercy here. I am also posting this here because I have a hunch that I'm not the only one who could use a script that would do the following. Please if someone is willing to help, I hope you find this post. I would like it if someone could make a script that:

Activates when:
  • The Player enters a triggerbox.

Plays the special effect:
  • The Eye of Magnus Open Explosion Visual Effect. Or any visual effect of the user's choosing.
  • A sound effect of the user's choosing.

And does this:
  • Every time an actor enters the triggerbox.
  • Or as many times as the user desires.

  • 0

#11
Bomaz

Bomaz

    Layman

  • Allies
  • 9 posts
ignore

Edited by Bomaz, 02 May 2012 - 01:17 PM.

  • 0

#12
WillieSea

WillieSea

    Senior Scholar

  • Skyrim Scholars
  • 4,805 posts


Users Awards

Activates when:

  • The Player enters a triggerbox.

Plays the special effect:
  • The Eye of Magnus Open Explosion Visual Effect. Or any visual effect of the user's choosing.
  • A sound effect of the user's choosing.

And does this:
  • Every time an actor enters the triggerbox.
  • Or as many times as the user desires.


Scriptname MyTriggerBoxScript extends ObjectReference  
{Attached to triggerzone}
Sound Property QSTAstrolabeButtonPressX  Auto

Event OnTriggerEnter (objectReference activateRef)
	if activateRef == Game.GetPlayer()
		QSTAstrolabeButtonPressX.Play(Self)
		;Depends on what you want to do
	endif
endEvent

This script would be attached to an activator with no mesh. Then create a trigger zone box and attach the activator with the script on it to the trigger zone.

There are Effect Shaders: http://www.creationk..._-_EffectShader
And you can use PlaceAtMe if its an 'explosion'.
  • 0

#13
Altrunchen

Altrunchen

    Initiate

  • Allies
  • 36 posts

Scriptname MyTriggerBoxScript extends ObjectReference  
{Attached to triggerzone}
Sound Property QSTAstrolabeButtonPressX  Auto

Event OnTriggerEnter (objectReference activateRef)
	if activateRef == Game.GetPlayer()
		QSTAstrolabeButtonPressX.Play(Self)
		;Depends on what you want to do
	endif
endEvent

This script would be attached to an activator with no mesh. Then create a trigger zone box and attach the activator with the script on it to the trigger zone.

There are Effect Shaders: http://www.creationk..._-_EffectShader
And you can use PlaceAtMe if its an 'explosion'.


Thank you so very much! I really appreciate it. Let me just see if I understood you though because I'm not entirely sure that I did.

Alright so first I need to make a trigger box.

Then an activator without a mesh. Which I think means like a primitive that activates itself upon entry. There is, confusingly, a triggerbox that will do this. So I am not sure what you meant exactly.

Then I need to place the script you so generously made on the activator box. And "attach" it, I can only assume that means using the option that says "Attach refernce" on the properties window. Is that correct?

Then in order to set up the effects that I want I will need to select the sound in the script properties tab, as well as write in a property for the explosion data with [*********.Play.(PlaceAtMe)].

Do I have this correctly understood? Thanks again for helping me this far already.

EDIT:

Alright so I got it to work perfectly. Thank you so much. Here let me try to copy and paste the script...

Scriptname MODPlayEffectonEnterTrigger extends ObjectReference    
{Attached to triggerzone}

Sound Property QSTAstrolabeButtonPressX  Auto
Explosion Property MGEyeOpenExplosion Auto

Event OnTriggerEnter (objectReference activateRef)
        if activateRef == Game.GetPlayer()
                QSTAstrolabeButtonPressX.Play(Self)
			placeAtMe(MGEyeOpenExplosion)
                ;Depends on what you want to do
        endif
endEvent

Again thank you so much. You're a life-saver. If there's anything you ever need from me, just ask.

Edited by Altrunchen, 25 April 2012 - 12:18 AM.

  • 0

#14
Bomaz

Bomaz

    Layman

  • Allies
  • 9 posts
I am trying to do a "fists of steel" fix. So far I have an ok armor rating calculator and to continue I would would need two script functions

1 that adds a bonus to unarmed damage for the player equal to some integer set in the script

2 one that removes the above bonus

Any help would be much appreciated

Edited by Bomaz, 02 May 2012 - 08:50 PM.

  • 0

#15
WillieSea

WillieSea

    Senior Scholar

  • Skyrim Scholars
  • 4,805 posts


Users Awards
You can modify the players unarmed damage bonus, and take it away when you don't want it anymore.

Give
Game.GetPlayer().ModActorValue("unarmeddamage", 25)

Take away
Game.GetPlayer().ModActorValue("unarmeddamage", -25)
  • 0

#16
Bomaz

Bomaz

    Layman

  • Allies
  • 9 posts
Excellent, thank you then I can get things working. Do you know how to get the quality (from smithing) of an item as well?
  • 0

#17
WillieSea

WillieSea

    Senior Scholar

  • Skyrim Scholars
  • 4,805 posts


Users Awards
If there is a way to get the quality of an item, I am not aware of it.
  • 0

#18
Bomaz

Bomaz

    Layman

  • Allies
  • 9 posts
How unfortunate. Is there any way to attach a parameter to the item at the time of smithing to be retrieved by my script?

Then I can at least make a dirty fix on that problem.
  • 0

#19
Groucho

Groucho

    Layman

  • Allies
  • 1 posts
I can't seem to figure this stuff out at all. Can anyone help me with creating a script that does this?

When I select or equip a particular item in my inventory I want the player controls to be disabled while the camera perspective changes to third person and the player performs a certain animation. Then after the animation plays for a few seconds it switches back to first person and enabled controls. Sort of like how the pick ax works with mining.

Thanks!
  • 0

#20
GKalian

GKalian

    Initiate

  • Allies
  • 20 posts


Users Awards
Requests thread is ok.

I need a script (maybe there is another way to do what I want, but I don't know) for npc (1) and for npc's group (2). The 1 simply runs in a straight line (forward), the 2 trying to catch him.
The group consist of 4-5 npc.
And also, the same with npc and group of creatures.

Thanks.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users