Jump to content

Lisselli

Members
  • Posts

    306
  • Joined

  • Last visited

Everything posted by Lisselli

  1. The last script is flawed and way out of scope for a GetItemCount example script. There's a lot of extraneous stuff that doesn't help explain what GetItemCount does, it makes unwarranted assumptions about who the activator is (it's usually the player, but not always), and it has an obsolete comment from when you copied from the steel arrow script directly above it. Flawed it maybe and you sound a little burned and you don't need to be. I removed the examples and change accordingly later, however it doesn't make "unwarranted" assumptions. Most of the time people just care about the player, but then people also aren't stupid. You don't need to make unnecessary checks with akActionRef and I told how you can avoid that with GetPlayer(). If all you want is for it to run when the player activates it. If it's not the player, it wont fire. For other objects you obviously need the checks. Furthermore you can even use the PlayerKeyword on the form itself, but no one ever mentions that. Seriously most of you guys think you're the only ones that knows stuff. If you want to talk about flawed, whats with you guys using functions several times to do the same damn thing when it should only be called once? Don't answer that, let the newbie have the slowest script in the world, but you wont tell them that. But then while you were throwing fire at my example, you didn't make an account to go in and change it or add something better. In addition to that, you yourself didn't explain what GetItemCount does. The wiki page in plain sight explains this anyway.. It's just me on that wiki and has been for a long time. No one, not even you shares anything there anymore. One thing I noticed is when someone wants scripting help, often no one who knows their s*** will even answer. And it's only til I pop up that someone says anything, but it's mostly just to one me up. As bad as it sounds, I've often did this on purpose, just so someone can get proper help, and it's worked almost every time. Be honest, the stuff you guys know, you mostly want to keep it to yourself (and that is EXACTLY why the wiki is in the state it is) until you see an opportunity to prove someone wrong. I'm not a programmer, I'm not a developer, and I think you're either one of those. Honestly I dislike both. You carry a cancerous attitude and act as if you can never be wrong. Now I have said my piece, and I apologize the poster I responded to with my "flawed" script, but at least I admit I am wrong.
  2. If this much pants s***ing is happening over SKSE, I can only imagine the reaction when there is no more Unofficial patches. No one would buy TES anymore? The project is dead people. Let's this go and move on. The two of them obviously don't come to this forum anymore. As for F4SE, for reasons unknown 4.2 was unannounced on reddit(and the link on the side not changed to reflect that), yet 4.2 is available on silverlock. So that lead me to believe, these guys just wants to be left alone now. So leave them be.
  3. It looks like Form could be universal, but I'm not entirely sure. Casting might be needed. Lots of events have form parameters but accept certain types passed into them. GetItemCount() being an example, or even PlaceAtMe() Forms are the objects defined in the Creation Kit. Otherwise known as the base object. An ObjectReference is a Form that has been(and if it can be) placed in the world. Type casting is something I still don't have a firm grasp of yet, so I don't want to steer you in the wrong direction. Some examples of casting I know for sure: Integers can be cast to a float and vice versa. ObjectReference can be cast to an actor if the ObjectReference is an actor. I'm not sure about casting to or from Form. Script casting works in a different way. You can declare an object's script as a property and access its script properties and function in another script. I'll use a quest as an example, since I've worked with these: Quest A has a scriptname ScriptAQuestScript extends Quest and I want to call it/s properties and functions in Quest B.. ; Quest B Quest property QuestA auto ScriptAQuestScript property ScriptA auto Event SomeEvent() ; let/s say you just want to directly use Quest A/s script without casting. ScriptA.ScriptAproperty ; but what you don/t? You just need to know Quest A/s script name instead and do this: (QuestA as ScriptAQuestScript).ScriptAProperty EndEvent
  4. No, arrays in papryus don't support that. Arrays can accept all the types in papyrus(ObjectReference, Form, Int, Float, String, Bool, MiscObject, Message, etc). No custom types. You can't mix and match types in an array either, the types must match. If you want a Float array you must create the property in array format, like so: Float[] property myArray auto ; or even a variable and fill it locally Float[] myArray As a property it will have a special UI in the property manager on the script in the CK for you to add elements. However once it's set, you can't change the elements at run time that way. So it's best to leave it empty and fill it at run time. It may sound restricting, but arrays are fast an efficient, and you can just all kinds of crazy s*** with arrays. However the best practices you may have learned about them in Java, still applies. Infinite loops and all that can still happen.
  5. The wiki is mostly on auto-pilot. I contribute there a lot, but I'm only one person unfortunately. The problem is that the nature of scripting since the beginning of Skyrim modding has been cryptic. Most of the functions and events were written in a non cryptic way, while the majority of others aren't. When you see examples like that, it is indeed frustrating, because the person who did that expects that the reader will know exactly how to use such a line in a code, and this to me is a bad way to think when editing an article. If you want to make a change, you are free to make an account to help out. I changed the example on that page to be more beginner friendly with details to the best of my understanding on how it should work, along with sample(full) script that tells how to remove all gold from OnActivate or even through a menu: https://www.creationkit.com/index.php?title=GetItemCount_-_ObjectReference#Examples
  6. A game just isn't a game anymore when you want it to be as real as real life...
  7. I don't help out in threads anymore since there's better people for it.
  8. :ermm: I just realized I'm no help to anyone here, regardless of what I know.
  9. Oh, yeah, AddItem can also add specific references, I forgot that. If what you say is true, how could an alias ever create an item on its own in an inventory and point to that? ("Create Reference To Object") I believe it's calling PlaceAtMe internally.
  10. Ninja'd by LoneRaptor :smile: But if he wants this done at run-time... that's going to be a real slow function.
  11. I don't know anything particular dangerous about using OnInit. I've only been told that isn't an event that you want to put your main code in, or any significant amount of coding for the that matter, just small enough to kick things off(like in Reneer's post). That said, I use it checking first time of 'something', or quick testing. Otherwise, I don't use it.
  12. Perk is the way to go and you probably did not set it up correctly. I've worked on this, tested, and it works. Create the spell/effect you want to cast. Make sure the CastingType is Fire and Forget and the Delivery is Contact. Effect ArcheType should be Script(you can't control the magnitude of the spell being cast from a script anyway). Add a small script that will cast the spell. Do not add OnUpdates or any of those other things, they aren't needed for this to work. This is at its very basic, no kidding. Just OnEffectStart(usual params) and a ThisSpell.Cast(akTarget). For the PerkOwner tab(make sure you add the spell to cast from the perk entry point), add the following conditions: IsPowerAttacking == 1.00 There all done. This will only fire if the player is power attacking(actually if the power attacking connects). You can get creative and instead use isAttackType if you only want specific types of Power Attacking to activate the perk, like PowerAttackSide(will only fire if the power attack was from a side position, and not fire if the player is doing a running power attack, or from a standing position). It's not completely perfect but you don't need polling and OnEffectFinish is not needed. Also as a tip: UnregisterForUpdate() is not needed for RegisterForSingleUpdate(). It's only used for RegisterForUpdate(), which no one should be using anymore due to its known nature to break save games if the mod is removed(OnUpdate will keep calling itself).
  13. Couldn't you just run your function from another quest that doesn't need to be shut down? In your second quest, set this up: ReferenceAlias property AliasToCopy auto myFirstQuestScriptName property refScript auto ;fill this property with your quest in the CK editor ;... actor myCopyActor = refScript.CreateAliasCopy(AliasToCopy) ; then delete it when you want from here myCopyActor.Disable() myCopyActor.Delete()Yeah I changed things around to do just that, but thanks anyhow. :)
  14. Any suggestions on how to go about deleting an actor that was created at run time via placeatme? I know storing the actor to a variable and then calling disable/delete on that variable will do the trick, but the problem is I need to shut the quest down. Making another quest with an actor property and storing him there will make him persistent. Really wish variables can be accessed by outside scripts. Here's my function: Actor Function CreateAliasCopy(ReferenceAlias akAliasToCopy) Actor kOrigAlias = akAliasToCopy.GetReference() as Actor if kOrigAlias != none Actor CopyActor = kOrigAlias.PlaceAtMe(kOrigAlias.GetActorBase()) as Actor SetCurrentStageID(10) ; shuts this quest down return CopyActor else SetCurrentStageID(10) return none endif EndFunction
  15. Check your bloom and/or HDR settings.
  16. There is no AddKeyword for any version of Skyrim. And I don't want to crush your dreams, as I know where you got AddKeyword from, but.. no function that was implemented into papyrus for Fallout 4 will work with Skyrim. The closest you can get is adding the NPC/player to a quest with the keywords on the alias.
  17. Oh yeah, the FadeToBlackBack property is for the FadeToBlackBackImod form. Maybe I should have used their actual names so all he needed to do was hit auto-fill all. Other than that, I don't know why it would stop after a certain amount of times. I use the same method(getting the screen to fade back in after being moved with moveto) with my version of mark and recall and have no problems with it.
  18. Try use the console command paycrimegold: http://www.creationkit.com/index.php?title=PayCrimeGold Just because you have no bounty in your journal, doesn't mean you don't have one. Hard to explain.
  19. I like Riverwood, and while I always go there even with alternate start, I don't go off to Whiterun after. I figure since Riverwood is the archetype that all cities and towns are based upon, Beth would naturally want people to go there first. It doesn't mean you need to go straight to Whiterun though.
×
×
  • Create New...