
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.

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
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
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
Edited by Bomaz, 02 May 2012 - 01:17 PM.
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
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'.
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
endEventEdited by Altrunchen, 25 April 2012 - 12:18 AM.
Edited by Bomaz, 02 May 2012 - 08:50 PM.
0 members, 0 guests, 0 anonymous users