heroko Posted February 23, 2017 Posted February 23, 2017 soo the other day i found out id try making myeslf an mod and made myself an island and stuff.but then i figured id try scripting and have an button conected to an Xmarker that is conected to some crates for enabling and disabling em.where did i go wrong? since atm the button doesnt do annythingScriptname iinntriger extends ObjectReference ObjectReference property iinnmarker1 autoEvent OnActivate(ObjectReference akActionRef) if(iinnmarker1.isenabled()) iinnmarker1.disable() else iinnmarker1.enable() endifendevent
heroko Posted February 23, 2017 Author Posted February 23, 2017 hahaha aparently i cant use nordic button
Guest Posted February 23, 2017 Posted February 23, 2017 The script looks good. But probably the object you attached the script to does not support the activation. Create or duplicate in CK an activable object. Then you can alter is NIF to point to the nif used by the object you want to replicate (Nordic button?) Attach your script to the base object and place it somewhere. It should work. And remember to fill the property, better if you fill it in the ObjectReference and not in the base form, so you can reuse the object in different cells to enable/disable different objects.
heroko Posted February 23, 2017 Author Posted February 23, 2017 The script looks good. But probably the object you attached the script to does not support the activation. Create or duplicate in CK an activable object. Then you can alter is NIF to point to the nif used by the object you want to replicate (Nordic button?) Attach your script to the base object and place it somewhere. It should work. And remember to fill the property, better if you fill it in the ObjectReference and not in the base form, so you can reuse the object in different cells to enable/disable different objects. i ment imperial changed it for an dwemerbutton and it worked. yea atm im at the point where im following darkfox's toturials on youtube got the idea for this script from his lightswitch. and i just found ur guide soo im thinking of having an look at that tomorow need full focuse for that. btw if i conect more boxes to the xmarker now and put them at oposit will that change those i already have conected to it?
Bazinga Posted February 23, 2017 Posted February 23, 2017 Are you sure you didn't forget to fill the iinnmarker1 property with the xmarker in the Creation Kit? edit: Nevermind, CPU was faster.
heroko Posted February 23, 2017 Author Posted February 23, 2017 also 1 think iv been wondering about is it possible to make an soultrap like teleport spell that teleports the enemy to an spot upon death and ressurects em in an slave like faction ?i could always just use fire and forget teleport and then force em into another faction but sending dead people to another plane to serve seems soo much better
heroko Posted February 23, 2017 Author Posted February 23, 2017 awsome then i have something to lookforward too
heroko Posted February 28, 2017 Author Posted February 28, 2017 soo im trying myself as scripting again and i have no idea what im doing but i think im at the right track soo if somone could help me out it would be awsome this is my script i want to add an npc to be an follower after she gets down to 10% hp Scriptname AddtoFaction extends ObjectReference Actor property ACTORref_01 autoFaction property Faction_01 autoFaction property Faction_02 autoFaction property Faction_03 auto Float Function GetActorValuePercentageEX(Actor ACTORref_01, String asValueName) Float CurrentHealth =ACTORref_01.GetActorValue(asValueName) Float BaseHealth = ACTORref_01.GetBaseActorValue(asValueName) Float HealthPercent = (CurrentHealth / BaseHealth) * 100 return HealthPercentEndFunction GetActorValuePercentageEX(Game.GetACTORref_01(), "health") if (GetActorValuePercentage("health") < 0.1) isinn() elseendiffunction isinbool Function IsInFaction(Faction akFaction) native if Actorref_01.isinfaction(Faction_01) else Actorref_01.AddToFaction if Actorref_01.isinfaction(Faction_02) else Actorref_02.AddToFaction if Actorref_01.isinfaction(Faction_03) else Actorref_03.AddToFaction endifendfunctionendfunction
Recommended Posts
Archived
This topic is now archived and is closed to further replies.