-
Posts
13 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by codeyhanson
-
-
Hey! I am quite a newbie with scripting and hadn't had any luck creating a working version of following script.
I have tried to create a script which would teleport the player to another location (area) when a custom shout would be casted upon an object.
Cast custom shout on an object --> teleport player to another area.
I would appreciate any help!
Ok this is what you got to do find the actor called player add a new script to that actor like the one below anything with quotes is what you're name is for that thing also anything that property before it make sure you add it in by going to add properties .
You will need to make a object where you are going to teleport to can be anything just make sure there is only one of that object
Scriptname "scriptname" extends ObjectReference
SPELL Property "name of shout" Auto
ObjectReference Property "name of object you are going to teleport to" Auto
ObjectReference Property Player Auto
Event OnSpellCast(Form akSpell)
Spell spellCast = akSpell as Spell
if spellCast && spellCast == "name of shout"
Player.MoveTo("name of object you are going to teleport to")
endif
endEvent
-
1) Click on the Actor list in the CK then type "player" in the filter field in the top-left corner of the window. Alternatively, use the "Edit->Find Text" menu option and search for "player".
2) if it is greyed out, don't worry about it, it's not essential :)
Thank you It now works
-
The script needs to go on an NPC or the player.
It should work "as is" if you put it directly on the player's Actor form. However I'm not sure if there would be a compatability problem if another mod also tried to put a script directly onto the player (I haven't tested for that situation).
The other way is to create a quest alias for the player, then attach a script to the alias. But in this case, I suspect that the script might need to extend ReferenceAlias (I'm not 100% sure about this). If it does, then the script might need to be modified a little. So if your script doesn't work on the alias, you could try this:
Scriptname Blood2 extends ReferenceAlias SPELL Property SpellBloodSpike Auto ReferenceAlias Property Player auto Event OnSpellCast(Form akSpell) Spell spellCast = akSpell as Spell if spellCast && spellCast == SpellBloodSpike Player.GetActorRef().DamageAV("health", 5) endIf EndEvent
To create a player alias:
1) Create a new Quest form under "Character", "Quest" in the Object Window tree in the CK (just right-click and select "new").
2) In the Data tab, put in an ID for your quest. Tick "start game enabled".
3) In the Alias tab, create a "New Reference Alias" and call it "Player". Tick "Allow Reserved". For the Fill Type, choose "Specific Reference" and click the "Select Forced Reference" button. Under "Cell" choose "any", and "Ref" should default to PlayerRef(Player). If not, pick it from the drop-list.
http://www.creationkit.com/images/3/3d/DASPlayerAlias-1.png
Now you might have to close the quest form, save the mod, then reopen the quest form. Edit the player alias in the Quest Alias tab again and you should be able to attach your script to it. Don't forget to fill the Properties afterwards. Now close the quest tab, save the mod and test it out in-game.
Ok last 2 ?'s One player's Actor form where is it, 2 Allow Reserved is grayed out for me
-
Oops. Try changing the script to extend Actor instead of ObjectReference, or, change "DamageAV" to "Game.GetPlayer().DamageAV".
Alright that last part worked here is the new script
Scriptname Blood2 extends ObjectReference
SPELL Property SpellBloodSpike Auto
Event OnSpellCast(Form akSpell)
Spell spellCast = akSpell as Spell
if spellCast && spellCast == SpellBloodSpike
Game.GetPlayer().DamageAV("health", 5)
endIf
endEvent
now do I just put this one the Magic Effect or Do I have to put this on an actor such as the player and if I do have to put it on the player how would i do that I pretty new.
-
Scriptname TEST1 extends ObjectReference Spell Property FireballSpell auto Event OnSpellCast(Spell SpellCast) If SpellCast == FireballSpell DamageAV("health", 5) EndIf EndEvent
You have to put this script on the player or NPC that will cast the spell.
And how would you put the Script on the player when you cast just that spell the name of the real spell under magic effects is Bloodspike
Also I get an error for DamageAV("health", 5) when trying to save that seems to only work on ActiveMagicEffect
-
Scriptname TEST1 extends ObjectReference Spell Property FireballSpell auto Event OnSpellCast(Spell SpellCast) If SpellCast == FireballSpell DamageAV("health", 5) EndIf EndEvent
You have to put this script on the player or NPC that will cast the spell.
And how would you put the Script on the player when you cast just that spell the name of the real spell under magic effects is Bloodspike
-
Ok so Im trying to make a spell where every time you cast it it will take 5 health away I have made a script that sort of works but its not what I want here it is
Scriptname test2 extends activemagiceffect
Event OnEffectStart(Actor Any , Actor Caster)
caster.damageav("health", 5)
endEvent
now what it does is when you hit someone with the spell it will take 5 health but when you miss or just cast in the air it does noting
also tryd this but cant get this to work at all
Scriptname TEST1 extends ObjectReference
Event OnSpellCast(Actor Castor)
Spell spellCast = Spell as Spell
if spellCast && spellCast ==FireballSpell
caster.damageav("health", 5)
endEvent
-
Ok so Im trying to make a spell where every time you cast it it will take 5 health away I have made a script that sort of works but its not what I want here it is
Scriptname test2 extends activemagiceffect
{This should work}
Event OnEffectStart(Actor Any , Actor Caster)
caster.damageav("health", 5)
endEvent
now what it does is when you hit someone with the spell it will take 5 health but when you miss or just cast in the air it does noting
also tryd this but cant get this to work at all
Scriptname f*#@ifiknow extends ObjectReference
Event OnSpellCast(Actor Castor)
Spell spellCast = Spell as Spell
if spellCast && spellCast ==FireballSpell
caster.damageav("health", 5)
endEvent
Help with scripting
in Skyrim LE
Posted