Help - Search - Members - Calendar
Full Version: Need Help With A Script
The Nexus Forums > Specific Games > Oblivion > General Oblivion > General Oblivion
Ihoe
Hello Guys.I am Currently Making A mod And It's 75% Done.But I Am Stuck With Creating a script that I can't Find Instructions For.I Don't Have Much Of Scripting Experience.Frankly I am A newbie to Scripting.
I Really Need Help to Create This Script Because I Don't Know Where To Begin.To Say it correctly I need Help To create a script for a potion that when player drinks it the script takes effect and take the player to the World Space I created.And Another Script for another potion that takes the player from my world to tamriel again when it's used.I Know There Are Some Tutorials About scripting Right here On Nexus Or Construction set Wiki But I don't find enough instructions in them to create what I Want to.Please If anyone Knows the answer post it here.I Will be thankful to the person that does that.
LoginToDownload
The simplest way of going about this would be to create a couple of MarkerTeleport statics in your new worldspace where you want the player to teleport to, give them real names, (for the purposes of this tutorial, MyTeleportMarker and MyReturnTeleportMarker) and set them to Persistent References. Now we can head for Gameplay/Edit Scripts. Keep in mind, both of these scripts should be Magic Effect scripts (There's a drop-down box at the top that determines what type of script it is). The "Teleport To Worldspace" script should go like...

CODE
scn MyTeleportPotionScript
;scn stands for Scriptname.  All scripts need to be named on their first line.

Begin ScriptEffectStart
;All of a script's functions need to take place in a Begin/End block that determines when they run.
;ScriptEffectStart blocks run when the associated Magic Effect begins.

     MyReturnTeleportMarker.MoveTo player
    ;With this at the player's old location, we can teleport them right back later.

     MoveTo MyTeleportMarker
    ;If a specific being isn't specified for MoveTo, it uses the effect's subject.
end


And the Return Teleport script...
CODE
scn MyReturnPotionScript

Begin ScriptEffectStart
     MoveTo MyReturnTeleportMarker
end


If you haven't done so already, add a Script Effect (a Magic Effect, not just a script on the potion) to the potions and set their Script to the appropriate one. If they don't appear as options, you didn't set them as Magic Effect scripts, so go back and do that.
Ihoe
Thanks A lot LoginToDownload!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.