-
Posts
402 -
Joined
-
Last visited
Everything posted by Masterofnet
-
[LE] Will this script work as intended?
Masterofnet replied to Masterofnet's topic in Skyrim's Creation Kit and Modders
The player will receive an item via quest or crafting that does not have an object reference. That item is removed and replaced by the same item in a reference alias for the quest. Update: 1. I could not find a way to create the array inside a function, which you have to do and define it outside. So I used an array property as you can see. Can I fill it this way? I don't know I am going to fill the properties of the array in script properties Can I remove the forms this way? Yes Could I have filled it in the script properties and still removed the forms? With a form list you can not. Yes Is there a way to create the array within the script and define it outside the function? Not that I have been able to find. Most likely, No. Will this thing actually work? Yes it does. I am still open to any feedback or ideas on how to better implement the script. And thanks to Chesko The Snowman. Good work on the functions Here is the final fully Tested Version of the script. -
I am not all that familiar with Arrays, I almost only use form lists. This script compiles. A couple of questions. 1. I could not find a way to create the array inside a function, which you have to do and define it outside. So I used an array property as you can see. Can I fill it this way? Can I remove the forms this way? Could I have filled it in the script properties and still removed the forms? With a form list you can not. Is there a way to create the array within the script and define it outside the function? Will this thing actually work? Scriptname B2CraPlayerAlias extends ReferenceAlias ReferenceAlias[] Property RefArray Auto ReferenceAlias Property ArrowRef Auto ReferenceAlias Property BowRef Auto ReferenceAlias Property Slab Auto ReferenceAlias Property Blade Auto ReferenceAlias Property Mace Auto ReferenceAlias Property BallBreaker Auto Event OnInit() Bool InitGate If InitGate == False RefArray[0] = ArrowRef RefArray[1] = BowRef RefArray[2] = Slab RefArray[3] = Blade RefArray[4] = Mace RefArray[5] = BallBreaker Int i While i < 6 AddInventoryEventFilter(RefArray[i].GetReference().GetBaseObject()) I += 1 EndWhile InitGate = True EndIf EndEvent Event OnItemAdded(Form Item, int IC, ObjectReference ItemRef, ObjectReference NA) GoToState("Done") ObjectReference SelfRef = GetReference() Int i = 0 While Item != RefArray[i].GetReference().GetBaseObject() i += 1 EndWhile SelfRef.RemoveItem(Item,1,True) SelfRef.AddItem(RefArray[i].GetReference(),1,True) RemoveInventoryEventFilter(RefArray[i].GetReference().GetBaseObject()) RefArray[i] = None ArraySort(RefArray) Int Count = ArrayCount(RefArray) If Count < 1 GoToState("Done") Else GoToState("") EndIf EndEvent State Done Event OnItemAdded(Form Item, int IC, ObjectReference ItemRef, ObjectReference NA) EndEvent EndState bool function ArraySort(ReferenceAlias[] RefArray, Int i = 0) ;-----------\ ;Description \ Author: Chesko ;---------------------------------------------------------------- ;Removes blank elements by shifting all elements down. ;Optionally starts sorting from element i. ;-------------\ ;Return Values \ ;---------------------------------------------------------------- ; false = No sorting required ; true = Success bool bFirstNoneFound = false int iFirstNonePos = i while i < RefArray.Length if RefArray[i] == none if bFirstNoneFound == false bFirstNoneFound = true iFirstNonePos = i i += 1 else i += 1 endif else if bFirstNoneFound == true ;check to see if it's a couple of blank entries in a row if !(RefArray[i] == none) ;notification("Moving element " + i + " to index " + iFirstNonePos) RefArray[iFirstNonePos] = RefArray[i] RefArray[i] = none ;Call this function recursively until it returns ArraySort(RefArray, iFirstNonePos + 1) return true else i += 1 endif else i += 1 endif endif endWhile return false endFunction int function ArrayCount(ReferenceAlias[] RefArray) ;-----------\ ;Description \ Author: Chesko ;---------------------------------------------------------------- ;Counts the number of indices in this array that do not have a "none" type. ;-------------\ ;Return Values \ ;---------------------------------------------------------------- ; int myCount = number of indicies that are not "none" int i = 0 int myCount = 0 while i < RefArray.Length if RefArray[i] != none myCount += 1 i += 1 else i += 1 endif endWhile ;notification("MyCount = " + myCount) return myCount endFunction
-
If you are going to post a script please post the whole script. Who is this script on?? The script is asking if it the NPC killed them self. Also why would you do this? Actor MyKillerActor = Self If akKiller == MyKillerActor Just do this. If akKiller == Self ; Whatever self is.
-
If you are attempting you use that in the Skyrim kit it does not work. That function is only available in the Fallout 4 Kit.
-
SSE Script to block shouts and remove spells
Masterofnet replied to Manway's topic in Skyrim's Creation Kit and Modders
If fixed up the script a little. The only way that could be happening is if you are not filling the properties of the script. Did fill then and save? Scriptname TestTriggerScript extends ObjectReference Spell Property Candlelight_Stronger Auto Event OnTriggerEnter(ObjectReference akActionRef) Actor PlayerRef = Game.GetPlayer() Debug.Notification("The trigger works") If akActionRef == PlayerRef ; This condition ensures that only the player will trigger this code if PlayerRef.HasSpell(Candlelight_Stronger) Debug.Notification("Player has Stronger Light") PlayerRef.RemoveSpell(Candlelight_Stronger) else Debug.Notification("Player does not have Stronger Light") PlayerRef.AddSpell(Candlelight_Stronger) endIf EndIf EndEvent -
[LE] Why is the script not working?
Masterofnet replied to Masterofnet's topic in Skyrim's Creation Kit and Modders
A couple of things. Remove item will always remove the equipped weapon first. That is why you must remove it and then the other weapons. Also the potion being < 4000) from the player is a way of determining if it has been dropped or used on a weapon. If there is no new container and the distance is > 4000 the potion has been applied to a weapon. This is done because if you attempt to poison a weapon and decide not to, or you attempt to use a potion and do not have a weapon equipped, the on item removed event will fire but the potion will still be in the players inventory. IF (selfRef.GetItemCount(akBaseItem) > 0) RETURN ; - STOP - /1 player has still left one potion ENDIF Some interesting work as usual. I will need time to go over it all. Redragon , Here is my update of the Player Alias Script. I don't change the names to much because it effects auto filling of the properties. This is in my option a huge improvement. Thanks The first script is another script needed on the player alias. Player Alias The Potion Alias The Weapon Alias If you had two scripts on one alias and both had add and remove item events. Would an inventory event filter you put on one script also effect the events on the other script? I have read some conflicting information about this. However the answer is Yes, It will effect other on item add or remove events on that reference alias. -
SSE Actor.MoveTo() Won't move a horse
Masterofnet replied to PowderedSugar's topic in Skyrim's Creation Kit and Modders
Would you mind if I asked where you found that? I am going to be looking into the horses in the near future. What you are doing should be done via quest. The horse the player chooses should be forced to an Alias and that is just for starters. You really need to get a much better grasp of what you are doing. Look at how the game deals with Horses. You may even want to have a look at the dialogue follower quest. Watch the videos bellow, they will give you a wide range of information. https://www.youtube.com/user/doughamil/videos -
SSE Script to block shouts and remove spells
Masterofnet replied to Manway's topic in Skyrim's Creation Kit and Modders
I find it hard to believe that increasing the radius of that light does not do anything. But I have never tried it. Why don't you try a different light? -
That would not be obvious from this post. I just went into the kit and did exactly what IsharaMeradin has been telling you to do and it worked perfectly. I found and actor in a cell. I looked at script attached to them and I did this. MyScript Property ActorRef Auto ;I would find the exact ref name in the cell and use that. That is what I did but it did not auto fill. The Magic effect script compiled and then I opened up the properties and added the object reference property to the script. BTW the script was placed on the actor base. You need to stop wasting time and post exactly what you have set up so you can be helped. _HC_HorseManager Let us see this script.
-
I think IsharaMeradin was only using MyScript as a place holder for your actual script name. You would paste this into the script, save it, then fill the property. IsharaMeradin has provided you with very clear instructions, I will ask you to please up your game a little bit and not waste her time. Script01 Property managerObj Auto
-
SSE Script to block shouts and remove spells
Masterofnet replied to Manway's topic in Skyrim's Creation Kit and Modders
Also check out the link. https://www.youtube....oughamil/videos These are good videos they cover a wide range of things. I have a feeling your trigger box issue is a game save issue. You are placing the trigger box into a cell that you have already loaded. Travel to MixwaterMill. Walk over to the MIxwatermill workers house. Do not enter it!!! Make about 30 game saves Then create a new Mod, a test mod. Before you go back into the game. Create a trigger like yours and place it inside Mixwatermillworker house. Set it up and then load the last game save you made, enter the workers house and test your trigger. Scriptname Test extends ObjectReference Event OnTriggerEnter(ObjectReference akActionRef) Debug.Notification("The trigger works") EndEvent As far as the candlelight it is very simple. You can see very clearly on the MagicEffect Template. Assoc. Item 1 - MagicLightLightSpell01 That is a light that can have it's Raduis very easily adjusted. -
[LE] Why is the script not working?
Masterofnet replied to Masterofnet's topic in Skyrim's Creation Kit and Modders
what does it mean: "B2C" infront of your script names? Nothing I actually use something else but I want to keep it secret for now. It would be the 3 letters I identify my mod with. 1 "B2CquWildMan" I guess, you forgot the quest script That quest script is not the quest script for this quest. It is a quest that I use to manage all my other quests. VM quest variables and other things. Like reducing the properties I have on a script. By simply adding that Quest Script I have access to all kinds of things so I can significantly modify a large # of scripts without having to refill any properties. 2) What formID have the chests, what is the container object? I have a cell I made that I keep the things for my quests in. That is where the chests are. They are empty small draugr chests. 3) I found script code issue! Yes, I made a couple of small changes to the scripts today and found that. It is just = now. 4) Scriptname B2CameKrosisPotion extends activemagiceffect All it does is make an invulnerable NPC vulnerable for a set amount of time. It is the effect for the Potion. 5) You wrote: "I can not get a weapon to not be a objectreference when it is dropped from the player." No matter how I add an item to the players inventory, when I drop it and use OnItemRemoved to get the form or object reference, the item always has an object reference. -
I have no role on the Nexus and I will never be as witty, charming and helpful as Redragon and Cooley. It was not even fair for you to compare me to them. I did not mean any offense when I refereed to you as "this person". I only meant the person who started the thread and I was just letting CdCooley know there may be more to this than you attempting to use SleepQuest.GetAlias(I) 0-5 when your aliases are in the 40s and 50s. Please do not give up on your quest and do take the advice I attempted to give you.
-
Redragon Thanks CdCooley, This person claims to have manually filled a ref alias property and was still unable to get a RefAlias to work on the script.
-
Your IDs are in the 40s and 50s. I never talk down to anyone. I do confront people with their behavior and in this case I have been 100% correct about yours. I am not going to be able to help you anymore. However I hope other people continue to and you eventually get the quest running.
-
Interesting work. i = i + 1 Why do you prefer this to: I += 1 ? Why do you prefer to do this? Function() Actor aRef = aktarget EndFunction Instead of this? Actor aRef Function() aRef = aktarget EndFunction They do and that is something you could test in about 5 min. To be honest I am a bit disappointed in the way you continue to waste the time of people who have come here to help you, Cooley tells you that you have a problem with your aliases and you keep running scripts. Now it is the Magic effect? However, this has turned out to be an interesting thread. There are several things that can be going on here. Including game save issues. I was going to suggest you check that your quest is running but I noticed it was start game enabled. You may want to check it anyway I do not work with start game enabled quests so I don't know. This is what I would suggest. It seems like a long list but should only take you a couple of Min. Make a couple dozen saves of your game. 1. Duplicate your magic effect. Rename it, clear all of the script properties and save it Then attach the new template to your spell. 2. Make a new quest. Allow repeat stages, uncheck only run once. Do not start game enable. Select Player remove Item event. 3. Go into Story Manager and create a quest node under Player Remove Item and then add a condition. In the condition select run on event data and then pick an Item you have only one of in your inventory and put that in the condition. Do not pick up an item like that again during testing. 4. Do not have any stages so you do not have a quest script. - We are only filling aliases. 5. Create 6 aliases. Do what Cooley told you and look up their number on the quest and name them accordingly. "The ID column on the Quests Aliases tab of the Quest window is between the Alias Name and Optional columns. You have to widen it to see the numbers."
-
Don't worry I won't. And yes I am joking with you. However you should have run this Alias issue down hours ago. There seems to be something wrong with your quest. You are not even able to fill an alias property on a script and get it to work. I have never had that problem so I don't know how to help you.
-
How many people have to tell you it is not the script????? Cooley very clearly told you your problem is with your alias not filling.
-
That is because you are not even able to get a referencealias. It has nothing to do with the script. With all do respect you are acting like you have never even seen the kit before. Your first script was something a 5 year old would have come up with. After seeing that I am sure the something that is not working is your work. LOL Since you have shown some initiative I will help you. Run this and lets see what is going on. BTW - Someone who was not in there first rodeo would not be running these tests on a start game enabled quest and would have been able to run down the mysterious "something" that is not working hours ago. ReferenceAlias Property YourAlias Auto; Fill this with the alias from your quest at the 0 location. Quest Properly YourQuest Auto ReferenceAlias BigMan Event OnEffectStart(Actor akTarget, Actor akCaster) BigMan = SleepQuest.GetAlias(1) as ReferenceAlias If BigMan Debug.notification("BigMan - I am not as dumb as I look") Else Debug.notification("BigMan - I can not even get a refalias") EndIf Bigman.ForceRefTo(AkTarget) If BigMan.GetReference() Debug.notification("BigManRef - I might make it out of first grade!!!") Else Debug.notification("BigManRef - Back to kindergarden.") EndIf If YourAlias Debug.notification("YourAlias - My refs seem to be wroking") Else Debug.notification("YourAlias - I can not even get a refalias to work!!") EndIf YourAlias.ForceRefTo(AkTarget) If YourAlias.GetReference() Debug.notification("YourAlias - For some reason Get-Alias(1) No Work") Else Debug.notification("YourAliasRef - I can not even get a refalias to work!!") EndIf Debug.notification(" Someday I will get this right!! I won't give up!!!") EndEvent
-
The person does not need a new script. They are not even returning a referencealias. They need to get a better understanding of what they are doing. Quest Property SleepQuest Auto ReferenceAlias BigMan Actor Givemeabreak Event OnEffectStart(Actor akTarget, Actor akCaster) int I = 0 ; This will cycle until Bigman is empty or until you have checked all 6 aliases. They Start at 0. While I < 6 BigMan = SleepQuest.GetAlias(I) as ReferenceAlias Givemeabreak = Bigman.GetReference() As Actor I += 1 If Givemeabreak If Givemeabreak == aktarget Return ;If your target is already an Alias this will end the function. EndIf Else I = 6 EndIf EndWhile ;When the while ends bigman should be empty, then you fill it. BigMan.ForceRefIfEmpty(akTarget) EndEvent