Jump to content

Need a script? Maybe I can help.


fg109

Recommended Posts

@ChampionOfHircine

 

Search for an xMarkerHeading. Should be a red box with an arrow pointing off a side. Drop that in the render window where you want to travel to and set the home marker property to that xMarkerHeading. Give the marker a name you can find easy.

Link to comment
Share on other sites

  • Replies 272
  • Created
  • Last Reply

Top Posters In This Topic

Thanks for offering to help people. You're awesome.

 

I actually could use help as well. I don't really need a new script from scratch, but I need to modify (an) existing one(s). I made a post about it in the troubleshooting subforum, link is here:

 

http://forums.nexusmods.com/index.php?/topic/649749-help-request-modding-proving-honor-quest/

 

I really tried, but this whole scripting thing is going way over my head, and I lack experience of any kind at it. So if you, or anyone, could help me or maybe just give me some pointers/basics, I'd appreciate it a lot.

 

Cheers,

 

T.

Link to comment
Share on other sites

Script to see if the item in the player view/crosshairs is a wield-able weapon or not.

 

Script to aggro a single target without setting off the alarm for everyone in the cell.

 

Script to activate on death and protect player for a variable amount of time.

 

Script to adjust gravity to push in whichever cardinal direction the player is facing.

 

Script to see if area in player crosshairs is accessible to player via walking/jumping/lockpicking and not through the use of a switch/specific key/actor opening the way to it.

 

A script/spell which conjures an enlarged large sword out of the ground to deal damage for a split second while moving the player back 3 feet before disappearing.

 

A ridiculously complex AI script, if those weren't hard enough :tongue:

 

 

Any of those would be INCREDIBLY helpful :thumbsup:

And, according to my Masterful Modding partner with whom I'm making the project, basically impossible. I'm not even sure if all of those are scripts! :unsure:

Edited by Jakisthe
Link to comment
Share on other sites

@Fury947

 

Basically, you'd need two scripts. One for the spell that you cast, and one for the ability:

 

 

Scriptname SpellScript extends ActiveMagicEffect

Spell property CustomAbility auto

OnEffectStart(Actor akTarget, Actor akCaster)
akCaster.AddSpell(CustomAbility, false)
EndEvent

 

 

 

Scriptname AbilityScript extends ActiveMagicEffect

Spell property CustomDisease auto
MagicEffect property AlchCureDisease auto
MagicEffect property CureDiseaseEffect auto
MagicEffect property dunHallOfTheVigilantCureDiseaseEffect auto

OnEffectStart(Actor akTarget, Actor akCaster)
akTarget.AddSpell(CustomDisease, false)
EndEvent

Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
if (akEffect == AlchCureDisease || akEffect == CureDiseaseEffect || akEffect == dunHallOfTheVigilantCureDiseaseEffect)
	Utility.Wait(1)
	GetTargetActor().AddSpell(CustomDisease, false)
endif
EndEvent

OnEffectStart(Actor akTarget, Actor akCaster)
akTarget.RemoveSpell(CustomDisease)
EndEvent

 

 

@ChampionOfHircine

 

Check scrivener07's post.

 

@MrMino

 

Put down an Xmarker and set it to be initially disabled. Put your NPCs down somewhere out of sight and set their enable parent as the Xmarker. Create a trigger volume and use the "defaultPlayerEnableDisableLinkedRef". Set the trigger's linked ref to the Xmarker.

Edited by fg109
Link to comment
Share on other sites

Thanks for your time fg but there are a few issues:

First of all the system container -> create potion is not so usefull , if an activator object could do all this it would be much better, so the player doesn't have to do all fus in the inventory menu, meaning, once again : the player activates the object ( some activator like WeTempActivator ) , a potato is removed from the player inventory and another appears at a dummy marker ( are we refering to dummy markers as leveled items or just plain potions? in this case entry: FoodPotato )

Secondly for some reason the proprieties aren't showing up, maybe i've forgotten something? I did insert FoodPotato instead of WitchObject in the script etc. but no luck :(

If this system is too tricky then there is an alternative, i will try to make it myself nonetheless if you can pull the first variant off, otherwise your help would be much appreciated: i'll make a invisible container ( for player's confort ) to interact with and if within there is a certain number of potatoes in the container, then the proper static mesh can be visualised ( if there are 3 potatoes in the basket than a mesh that has 3 potatoes in appears saving all the fus with IDing and making the potatoes show up in the basket like in the first variant, see 3rd page for a more thorough eg. ) Hopefully i've been clear, i'm no english or american etc so my english may be a wee creepy.

Or maybe the potatoes are just having a bad year ?

Link to comment
Share on other sites

@avenger404

 

You don't want to do this through scripting, or at least not only through scripting, because the scripting command for casting a spell doesn't use any animation, and doesn't use up any magicka.

 

I messed around with AI packages a couple weeks ago and I also had trouble with combat override packages. I did manage to get them working some of the time in the end, but not through the combat override package list.

 

Instead, I just put the packages inside the NPC's default packages, and used the condition "IsInCombat" for them. They all had "Interrupt Override" set to "Combat" and the only flag I had checked was "Ignore Combat". For each of them, I put in a script fragment at the end:

 

akActor.EvaluatePackage()

Link to comment
Share on other sites

@tmanthewhite

 

NPCs' default armor is determined by their "Outfits". You can't change that through scripting except by using SetOutfit. But since you'd need to set properties in a script in order to use that, in your case it would be easier to just change the outfits by editing the actors' inventories.

 

@Jakisthe

 


  1.  
  2. Yep, this is impossible.
  3. This might be possible. Not sure exactly what you mean though. All the time, or only when a certain ability is active? Or did you mean you want a specific spell to only alarm one person?
  4. This should be possible. Someone told me it's possible to set the player to essential. So just do that, listen for the bleedout event, wait a specific length of time, set unessential.
  5. Yeah, not really possible. Although I suppose you can use ApplyHavokImpulse to apply small amounts of force very frequently to try and simulate it. Probably not going to work very well though.
  6. Don't think this is possible. But I would have to check out how Clairvoyance works to tell you for sure.
  7. Quite possible. It'd be better if someone create the animation of a large sword doing that though so I wouldn't have to use scripting to move a sword like that.
  8. You'd have to be more specific than that. :tongue:

Edited by fg109
Link to comment
Share on other sites

@bobbythecamel

 

If you want to use an activator instead of a script, use this:

 

 

Scriptname ExampleObjectScript extends ObjectReference

;;;;;;;;;;;;;;;;
;; Properties ;;
;;;;;;;;;;;;;;;;

Potion Property WhichObject Auto
{Potatoes are potions.  You will need to change the property type to weapons if you're looking for weapons, etc.}

ObjectReference[] Property DummyMarkers Auto
{Array of the dummy potatoes to control potato placement.}

;;;;;;;;;;;;;;;
;; Functions ;;
;;;;;;;;;;;;;;;

;returns which marker is 'empty' (-1 if all are full)
Int Function FindEmptyMarker()
int index = 0
while (index < DummyMarkers.Length)
	if DummyMarkers[index].IsDisabled()
		Return index
	endif
	index += 1
endwhile
Return -1
EndFunction

;;;;;;;;;;;;
;; Events ;;
;;;;;;;;;;;;

Event OnActivate(ObjectReference akActionRef)
if !(akActionRef == Game.GetPlayer())
	Return
elseif !(akActionRef.GetItemCount(WhichObject))
	Return
endif
int index = FindEmptyMarker()
if (index >= 0)
	DummyMarkers[index].Enable()
	akActionRef.RemoveItem(WhichObject)
endif
EndEvent

 

 

I don't know what you mean when you say the properties aren't showing up.

Edited by fg109
Link to comment
Share on other sites

I guess i have to put the bigger script on the dummy marker, if so how do i point them to the activator? By linking, parenting or script property ?

Also, about the DummyMarker , does it have to be a potion, leveled item or a simple marker(trigger box) ?

Edited by bobbythecamel
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...