Ceruulean Posted October 25, 2015 Share Posted October 25, 2015 (edited) A variable is a placeholder; you can put anything into it, as long as it's the same type. You can put in numbers, actors, pretty much anything for future use in your script. A property is similar, except it can link to stuff in the CK and it can be read by other scripts. A property is typically for external use (referencing the player, maybe a weapon, another script, etc), a variable for internal use (counting, random number generation, math, etc). Actor Base is like a template for an actor, a profile sheet with all their traits and personality and skills and relationships. An actor reference is the actual actor. You can have several copies of an actor, like 2 Lydias, but Lydia is marked "unique" on her actor base so having 2 Lydias is not recommended. It's more for those bandits and other miscellaneous npcs; you might see several copies of them, maybe not in the same location, but over the course of your game. Notice there's only one Chicken in actor base, but if you right click on "Use," you'll see many references of them. You might create a Rooster actor base, then place many references of the rooster in game. Edited October 25, 2015 by Ceruulean Link to comment Share on other sites More sharing options...
lofgren Posted October 25, 2015 Share Posted October 25, 2015 Scriptname dunTransmogrifySCRIPT extends ActiveMagicEffect This is the script name. It tells you the name of the script. This script is named dunTransmogrifySCRIPT. After the word "extends," there is another word. That word tells you what functions this script has access to. This script has access to the functions in the ActiveMagicEffect script. ACTORBASE PROPERTY chicken AUTO This is a property. In the magic effect that this script is attached to, this property is set to dunTransmogrifyChicken. ACTORBASE PROPERTY rabbit AUTO ACTORBASE PROPERTY mudcrab AUTO OBJECTREFERENCE objStore OBJECTREFERENCE newRefStore dunTransmogrifyAnimal mainScript The previous three lines are variables. They are set to nothing right now. EVENT onEffectStart(ACTOR akTarget, ACTOR akCaster) This is an event block. Everything between this line and the next EndEvent line will happen when the spell is cast. int rand = 0 This is another variable. It does nothing. objStore = akTarget This sets the objStore variable to point to the same actor as akTarget. akTarget was set when the spell hit a target. akTarget.disable() This disables the target. newRefStore = akTarget.placeAtMe(chicken) This creates a new chicken at the same location as the target, and sets the newRefStore variable to point to the new chicken. ; //setting the master script to be the one with the stored vars mainScript = newRefstore AS dunTransmogrifyAnimal This sets the mainScript variable to point to the same chicken as newRefStore. mainScript.storedActor = objStore This sets a property attached to the chicken, storedActor, to point to the same object as akTarget and objStore, i.e. the target of the spell. akTarget.stopCombat() This takes the (now disabled) target out of combat. If the player is not in combat with any other attackers, this will essentially end the combat state for the player. endEVENT EVENT onEffectFinish(ACTOR akTarget, ACTOR akCaster) ;newRefStore.disable() ;akTarget.moveTo(newRefStore) ;akTarget.enable() endEVENT Scriptname dunTransmogrifyAnimal extends ObjectReference OBJECTREFERENCE PROPERTY storedActor AUTO This property was set by the last script. It points to the target of the spell. EXPLOSION PROPERTY appearExplosion AUTO This property points to an explosion. EFFECTSHADER PROPERTY shader AUTO This property points to an shader. EVENT onLoad() Everything between here and the next EndEvent will happen when the object's art is loaded into the game. SELF.placeAtMe(appearExplosion) This will create an explosion at the same location as the chicken. shader.play(SELF, 2) This will cause the shader to play. utility.wait(15) This will cause the script to wait for 15 seconds. IF(SELF.isEnabled() == TRUE) This will check to see if the chicken is enabled. storedActor.moveTo(SELF) This will move the target of the spell to the chicken. storedActor.enableNoWait() This will enable the target. storedActor.placeAtMe(appearExplosion) This will place an explosion at the same location as the target. storedActor.moveTo(SELF) This will move the target to the chicken again. SELF.disableNoWait() This will disable the chicken. ENDIF endEVENT EVENT onHit(ObjectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) This event will fire if the chicken gets hit. IF(akAggressor == game.getPlayer()) This checks to see if the person who hit the chicken was the player. storedActor.moveTo(SELF) storedActor.enableNoWait() storedActor.placeAtMe(appearExplosion) shader.play(storedActor, 2) storedActor.moveTo(SELF) SELF.disableNoWait() These functions do exactly the same thing as they do up above. ENDIF endEVENT You're only driving me crazy in that this is how the conversation appears from my end: You: "How do I sail across the English channel?"Me: "First, you'll need a boat."You: "What's a boat?"Me: "A boat is an object that floats on the water."You: "Whoa, whoa! Cut out all the jargon!"Me: "You need to know what a boat is in order to sail."You: "I already tried learning about 'boats' and 'water' and 'floating.' I'll figure all that out when I get to France. Now please just tell me how to sail across the English channel!" Link to comment Share on other sites More sharing options...
TheObstinateNoviceSmith Posted October 25, 2015 Author Share Posted October 25, 2015 That may be how you see it, but that not only isn't how this has been occurring, but it demonstrates my point very much. The situation is off in that analogy first off. I am not asking how to sail. I am asking how to build a boat.To you, you're explaining it as simple as "a boat is an object that floats on water" but in reality, you've been telling me to look up the laws of buoyancy as well as physics since these are the base principals of how a boat works. Not only have I looked at those things before asking for help in a very specific manner, but you primarily repeat the things written there that mainly people who understand boating would understand in the first place. At this point, I took a very specific boat, one that is more complex than the ones I've built but probably far less complex than the boats people who regularly build boats. I am asking how the transmission on THIS boat works, but you consistently respond that I need to look up a transmission and when you explain it you speak about transmissions in general when all I am asking is what does the transmission do on THIS boat, how is it doing it, and why is it necessary for this SPECIFIC boat. That being said, I don't know why you go to explain things that I got right from the start. I said from the beginning what I thought the properties were in this case. Instead of just saying I was right, you proceeded to state how I knew nothing about them just because I asked why ACTORBASE instead of simply just actor in this specific script... which someone else actually took the time to explain. Right off the bat in your latest post, you're demonstrating why you didn't say a boat is an object that floats on water. Yes, you speak in general, like in your example which is what I have been complaining about profusely... but you also over complicate the explanation: ACTORBASE PROPERTY chicken AUTOThis is a property. In the magic effect that this script is attached to, this property is set to dunTransmogrifyChicken.ACTORBASE PROPERTY rabbit AUTOACTORBASE PROPERTY mudcrab AUTO When all you had to say was, "This is telling the script the forms it intends to use. In this case the script forms for a chicken, rabbit, and mudcrab. Not sure why because from what I can tell (and from what you said about what the spell has been doing in the game) the script only ever uses the chicken form." Of course this is what I already knew since that is what I said from the start but it still serves as a really good example of what I have been asking for vs. how you insist on responding. You could have even said "...This script (boat) uses ACTORBASE (hydraulic marine transmission) instead of ACTOR (Manual Marine Transmission) because for this script (boat) blah blah blah..." You just choose not to do so. But, like with all your previous posts, I am able to take more information away from this one even if a great deal of it is the same kind of response as before. Some of this post, just like your other ones, is really helpful to me and is actually aiding my understanding. Thank you again. Link to comment Share on other sites More sharing options...
lofgren Posted October 25, 2015 Share Posted October 25, 2015 (edited) When all you had to say was, "This is telling the script the forms it intends to use. In this case the script forms for a chicken, rabbit, and mudcrab. Not sure why because from what I can tell (and from what you said about what the spell has been doing in the game) the script only ever uses the chicken form." No, that is not all I had to say, because it is wrong. Inaccurate. False. Incorrect. If I told you that, I would not be explaining anything to you. I did not make the explanation more complicated than it needed to be. My explanation contained no jargon, other than the sentence "this is a property." My explanation did not speak in generalities or in concepts. I told you about this property, and exactly what it points to. It does not point to "a chicken," because there are many chickens in the game. It points to a specific chicken, whose name I gave you because it is rather important to to look at the right chicken. It does not tell the script what forms it intends to use. It creates placeholders for those forms, and the magic effect that the script is attached to tells the script which forms to use. (And in fact I DO know why there are multiple properties: the spell was clearly originally intended to randomly turn the target into one of four forms, although this feature was not implemented.) To elaborate on your analogy, if I had told you what you wrote above it would be the equivalent of telling you that "This transmission makes the boat go left." The transmission is certainly PART of an apparatus that makes the boat go, and one of the many directions it might potentially go is left, but I would be doing you a disservice if I told you that the role of the transmission is to turn the boat to the left. And surely if a person asked "What does this do?" while betraying no sign that they have any idea what a transmission is, the first thing that the teacher would do is say, "That's a transmission." And surely the teacher would be a little taken aback if the student then demanded to know what the device does without ever using the device's name because using the device's name is "too complicated." And surely if the teacher did give multiple explanations of what a transmission is and what it does, he would be a little annoyed with the student if the student then declared "All you had to do was say that the transmission makes the boat turn left!" Because a few seconds ago the student was begging for clarification of the most basic components of the boat, and now seems to think that they suddenly have such a thorough understanding that they can lecture the teacher not only about the functions of boat parts but also how boat parts should be taught, all while displaying that they are still fairly ignorant of both. The properties do not tell the script which forms to use. To understand what the properties do, you must understand, at least a little bit, what the properties are. Edit: To be clear, I'm not saying that the teacher is blameless for the student's lack of understanding. Edited October 25, 2015 by lofgren Link to comment Share on other sites More sharing options...
TheObstinateNoviceSmith Posted October 25, 2015 Author Share Posted October 25, 2015 I almost broke down what you said, but I am not going into this anymore with you. It's getting WAY off topic and actually distracting me from trying to learn what I am trying to learn the way I am trying to learn it. This post/thread isn't about you. It's about me and anyone else who may benefit from what I am asking if someone would answer the way I describe rather than the way you want. Doesn't matter if you agree with what I am saying. I don't want to hear about it because I am here trying to get help and you are not helping me. Doesn't matter if you are trying to help, because I said you aren't. Doesn't matter whose fault it is or who is right about what, the bottom line is, you are not equipped to help me just as I am not equipped to learn from you. Please just move on and stop posting here. Please. I've asked you politely before and I am politely asking you again. Please just move on. EDIT: Someone has answered me in PMs in a way that I found very helpful. Once I clarify some things, I'll be posting the answer here provided they are okay with that. This is not directed towards you lofgren, just putting this here so others do not attempt to answer now that I already have a solid answer. Link to comment Share on other sites More sharing options...
TheObstinateNoviceSmith Posted November 10, 2015 Author Share Posted November 10, 2015 I apologize for the delay for anyone else that was interested in a plain explanation of this script. The person who PMed me the answer did so a few days ago (and told me how to modify it so it would work as it was likely intended to work) but I was trying to figure out how I wanted to present it here. Hopefully this will be easy to understand. Spell's Description in Creation Kit: Turns a low level enemy into a harmless creature for 30 seconds or until they take damage. Explanation: So the spell is intended to transform an enemy into one of three animals chosen at random for 30 seconds or until they are hit by something such as a weapon or fists. But as written, it is currently written, it will only turn a target into a chicken. This is something, we'll aim to correct here while we break this down. It also only turns them into an animal at most for 15 seconds. The reason why will be clear, but we won't be changing that aspect. Also, it is important to note that while this is called a transformation spell, a true transformation is not what is taking place. It's more like a body swap than a transformation. Think of it as you hit Henry with this spell. Transformation would be Henry is now a chicken but int his case, Henry disappears and a chicken appears where Henry was standing. The chicken is not Henry and Henry is not the chicken. When the spell wears off, Henry will appear and the chicken will disappear so yeah... it's more of a swap. Scriptname dunTransmogrifySCRIPT extends ActiveMagicEffect Explanation: This is letting us know what kind of script this is and/or what it the script is intending to do. In this case it is an ActiveMagicEffect so it is a magic effect. The reason this is important is because this will tell you what kind of things (such as which functions, events, etc) will work in this script. I was also told that it is usually important/good practice to match the kind of script to the thing you're adding the script to so it is probably best not to put a script that extends ActiveMagicEffect directly on an actor. ACTORBASE PROPERTY chicken AUTO ACTORBASE PROPERTY rabbit AUTO ACTORBASE PROPERTY mudcrab AUTO Explanation: This is where the script is holding and/or defines the shapes/forms (in this case animals) it wants the spell to be able to turn the person (actor/object) hit with the spell into. Without this section, the script wouldn't know what animals to use for the transformation, which means this is essentially the part of the script that is telling the script the forms it intends to use. In this case the script is intended to be able to change a person struck by the spell into a chicken, rabbit, or a mudcrab. OBJECTREFERENCE objStore OBJECTREFERENCE newRefStore Explanation: Again, It's like the spell swaps one character for another rather than doing a true transformation. These will be used to hold the original form of the person hit by the spell while the chicken (or random between 3 animals once we're done) form is active where the original target. Also needed in the swapping process. dunTransmogrifyAnimal mainScript Explanation: For this spell to work as it is in game, it needs to call to another script. In this case it needs a script called dunTransmogrifyAnimal and that script should be on the animals mentioned earlier BUUUUT... ...one of the possible reasons this only turns people into chickens is because two of the animal properties (rabbit and mudcrab) do not have this script on them. The chicken that is used for chicken property has that script (dunTransmogrifyAnimal): http://i.imgur.com/aC5BQt5.jpg while the other two do not: http://i.imgur.com/V6v6ptd.jpg There are already versions of the mudcrab and rabbit that have the script attached to them so we are just going to change the rabbit and mudcrab properties to point to the version of these animals that have the proper script (dunTransmogrifyAnimal) on them. http://i.imgur.com/3zPnXWm.jpg http://i.imgur.com/OYX3AkM.jpg EVENT onEffectStart(ACTOR akTarget, ACTOR akCaster) ... endEVENT Explanation: Everything in between here is what the spell will do as soon as it hits a person and/or takes effect on a target/person. Remember different kinds of scripts have different kinds of things (scripts, events, variables, and functions) they automatically have access to and that they can already use. For a script that extends ActiveMagicEffects, onEffectStart (type of event) is one of those things. int rand = 0 Explanation: Here is the main reason why the animal that appears is not randomly generated. This isn't used by anything in the rest of the script as it is written. Though I didn't ask for clarification on this really, I believe this is simply saying that rand is an integer that is equal to 0. So if I am right, it wouldn't even matter if this line was ever called because the value of rand would always be 0. This won't do for us because we like what the spell was going to do originally and we are going to make it do what it was born to do and change those hit by this spell into a random animal. People will finally learn to fear Old McDonald! Mwahahahahah! Ahem. Sorry about that, but anyway, this is another step we are taking towards "fixing" this spell. We have 3 forms here, and we want the spell to choose one randomly so we are changing the above code to this: int rand = Utility.RandomInt(0,2) objStore = akTarget Explanation: Target's original form is being stored for safe keeping. It's storing it in the game, but not in the world. I suppose it is similar to when you add something new in the Creation Kit such as a weapon, but if you don't place it into the world somewhere, then the player won't be able to walk up to it or anything. The only way the player will be able to see it is if they use console commands. That is because the weapon may be int he game but it isn't physically in the world. Remember this is more of a form swap than a transformation so the script needs to keep the target's original form safe outside the world so it can be brought back into it once the spell wears off. akTarget.disable() Explanation: Now that the information for the target's original form is safely stored somewhere else, the target's form that is in the world can be disabled. newRefStore = akTarget.placeAtMe(chicken) Explanation: This line is placing a copy of the chosen animal (which as originally written, will always be a chicken) where the target's original form was before it was disabled. It's important to note that PlaceAtMe places a copy of the thing it is being used on at the specified location, while MoveTo moves the thing it is being used on to the specified location and so the thing being moved is not a copy. Say you have Henry and he's in Windhelm trying to woo a Stormcloak Guard. If you used PlaceAtMe on Henry, you would end up with two Henrys. One Henry that was still trying to woo that guard and another where you had Henry's copy placed. If you used MoveTo on Henry, that rather fetching Stormcloak guard would either be relieved that Henry was finally gone or disappointed that Henry had suddenly vanished because Henry would now be at the location you specified and there would still only be one of him... ...but in order to make this spell work in its intended glory we need to make more changes and those changes happen here. You see, as it is written now, even though we did change it so a random number is generated between three numbers (0, 1, or 2), nothing is actually putting that randomly generated number to use as things are currently written so we are going to put this to use now using If. Here is the change: If (rand == 0) newRefStore = akTarget.placeAtMe(chicken) ElseIf (rand == 1) newRefStore = akTarget.placeAtMe(rabbit) Else newRefStore = akTarget.placeAtMe(mudcrab) EndIf Now, if the randomly generated number (rand) is a 0 it will place a copy of the chicken where the target is/was standing, 1 it will place the a copy of the rabbit where the target is/was standing... ...and even though we didn't do a (rand == 2), because of the Else, if the value of rand is any value other than a 0 or 1, a 2 will swap the target with the mudcrab. mainScript = newRefstore AS dunTransmogrifyAnimal Explanation: Basically gives this script (dunTransmogrifySCRIPT) access to another script (dunTransmogrifyAnimal). This is necessary because this script (dunTransmogrifySCRIPT) needs to send the target's original form (that was safely stored away earlier) over to the other script (dunTransmogrifyAnimal) and it is this line that will make that possible. This line is telling this script (dunTransmogrifySCRIPT) what script it needs to work with (dunTransmogrifyAnimal) and where to get that script from (newRefstore) which (thanks to our changes) can be any one of three animals/forms (chicken, mudcrab, rabbit). So whatever newRefstore is, it should have the script dunTransmogrifyAnimal on it. Now the way this was written originally, it only used the chicken and that chicken at the time had the script but when we changed the script, we made it so that any of the three animals of the script could end up being newRefstore. This is why we had to change the properties for mudcrab and rabbit, because before, the property were set on versions of the mudcrab and rabbit that didn't have this script on it. Now what newRefstore is determined by the value of rand once the number is randomly generated. mainScript.storedActor = objStore Explanation: This is passing the target's original form over to the other script (dunTransmogrifyAnimal) so that it will be able to return the target to its original form. So basically, this spell uses two different scripts. The first/this one (dunTransmogrifySCRIPT), which happens as soon as the effect starts, handles swapping OUT the target's original form while the second/other script dunTransmogrifyAnimal, which happens when the animal enters the world and is located on the animal itself, handles swapping back IN the target's original form. It also handles the magical effects that the player sees... but we'll be breaking that down later. akTarget.stopCombat() Explanation: This ensures the target is not hostile. So if they are hostile, they won't be, and if they aren't, they still won't be. EVENT onEffectFinish(ACTOR akTarget, ACTOR akCaster) ;newRefStore.disable() ;akTarget.moveTo(newRefStore) ;akTarget.enable() endEVENT Explanation: It looks like when the spell was was initially this was going to be this part of the script that brought the target's original form back into the world once the effect wore off but because everything here is after a ; it does nothing and instead relies on the other script (dunTransmogrifyAnimal) to tell the spell how long the effect will last and to make the swap that brings the target's original form back into the world. Speaking of that other script, here it is: Scriptname dunTransmogrifyAnimal extends ObjectReference Explanation: This script is a different type than the other one because the other one dealt with magic effects, but this one is an ObjectReference and is on the animal forms we used for the properties in the previous script. This means the script has different things it is able to use that the other script wouldn't be able to use on its own and vice versa. OBJECTREFERENCE PROPERTY storedActor AUTO Explanation: We know that because of the previous script (dunTransmogrifySCRIPT), this is actually where this script (dunTransmogrifyAnimal) is going to hold the target's original form. EXPLOSION PROPERTY appearExplosion AUTO EFFECTSHADER PROPERTY shader AUTO Explanation: This is holding the pretty magic effects for the spell so we can use them later in this script. It's how this script is going to make the spell look magic... magic... ky... magicky? You know what I mean. Event OnLoad() ... EndEvent Explanation: Everything between here is what is going to happen when the animal this script is on(attached to), is brought in the world. So if it is the mudcrab that gets placed in the world, everything that is between Even OnLoad() and EndEvent is what happens as soon as the mudcrab is in the world. SELF.placeAtMe(appearExplosion) shader.play(SELF, 2) Explanation: Self is the thing the script is directly on. In this case whichever animal the other script (dunTransmogrifySCRIPT) has brought into the world. This is saying to place the defined spell effect where the chicken is and show it for 2 seconds. utility.wait(15) Explanation: This is telling the script to wait 15 seconds before doing anything else. Because of this, the animal (whichever one it is), now that is in the world (placed in it by the other script), will remain in the world for 15 seconds. IF(SELF.isEnabled() == TRUE) Explanation: This is making sure the chicken is still in the world because if it isn't than it makes what happens between this and ENDIF unnecessary. storedActor.moveTo(SELF) Explanation: Moves the target's original form to where the animal currently is. Remember this differs from placeatme which essentially creates a copy of something and then places it somewhere while moveto moves the object and doesn't copy it. storedActor.enableNoWait() Explanation: The target's original form is now back in the world making it visible to the player again. storedActor.placeAtMe(appearExplosion) Explanation: Places the graphics for magic spell where the original target's form has just appeared and since it is no wait this happens just as soon as the original form appears. storedActor.moveTo(SELF) Explanation: Moves the target's original form to where the animal is... again. Likely just to make sure the original form has appeared in the right spot before disabling the animal form. SELF.disableNoWait() ENDIF Explanation: Animal is removed now so only the target's original form is visible and in the world. EVENT onHit(ObjectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) Explanation: On this kind of script (one the extends a objectreference), onHit event is available for use. Everything in between here tells the script what to do when it is hit by anything listed in the parenthesis. In this case, if the animal form is struck by a weapon, ranged weapon, power attack, sneak attack, is bashed, or punched it will cause this part of the script to trigger. Everything in here is basically the same thing as what happens when the spell wears off due to the time expiring because of the wait function... except for the one line we will go over below. shader.play(storedActor, 2) Explanation: This plays a magic graphic that is played for 2 seconds on the original form of the target instead of on the animal form of the target. It only plays for when the chicken is struck so it is likely here to provide a slight visual difference between the spell wearing off and the spell being broken by someone striking the chicken. The Full Scripts: The ORIGINAL dunTransmogrifySCRIPT - Scriptname dunTransmogrifySCRIPT extends ActiveMagicEffect ACTORBASE PROPERTY chicken AUTO ACTORBASE PROPERTY rabbit AUTO ACTORBASE PROPERTY mudcrab AUTO OBJECTREFERENCE objStore OBJECTREFERENCE newRefStore dunTransmogrifyAnimal mainScript EVENT onEffectStart(ACTOR akTarget, ACTOR akCaster) int rand = 0 objStore = akTarget akTarget.disable() newRefStore = akTarget.placeAtMe(chicken) ; //setting the master script to be the one with the stored vars mainScript = newRefstore AS dunTransmogrifyAnimal mainScript.storedActor = objStore akTarget.stopCombat() endEVENT EVENT onEffectFinish(ACTOR akTarget, ACTOR akCaster) ;newRefStore.disable() ;akTarget.moveTo(newRefStore) ;akTarget.enable() endEVENT The MODIFIED dunTransmogrifySCRIPT - Scriptname dunTransmogrifySCRIPT extends ActiveMagicEffect ACTORBASE PROPERTY chicken AUTO ACTORBASE PROPERTY rabbit AUTO ACTORBASE PROPERTY mudcrab AUTO OBJECTREFERENCE objStore OBJECTREFERENCE newRefStore dunTransmogrifyAnimal mainScript EVENT onEffectStart(ACTOR akTarget, ACTOR akCaster) int rand = Utility.RandomInt(0,2) objStore = akTarget akTarget.disable() ; newRefStore = akTarget.placeAtMe(chicken) If (rand == 0) newRefStore = akTarget.placeAtMe(chicken) ElseIf (rand == 1) newRefStore = akTarget.placeAtMe(rabbit) Else newRefStore = akTarget.placeAtMe(mudcrab) EndIf ; //setting the master script to be the one with the stored vars mainScript = newRefstore AS dunTransmogrifyAnimal mainScript.storedActor = objStore akTarget.stopCombat() endEVENT EVENT onEffectFinish(ACTOR akTarget, ACTOR akCaster) ;newRefStore.disable() ;akTarget.moveTo(newRefStore) ;akTarget.enable() endEVENT dunTransmogrifyAnimal - Scriptname dunTransmogrifyAnimal extends ObjectReference OBJECTREFERENCE PROPERTY storedActor AUTO EXPLOSION PROPERTY appearExplosion AUTO EFFECTSHADER PROPERTY shader AUTO EVENT onLoad() SELF.placeAtMe(appearExplosion) shader.play(SELF, 2) utility.wait(15) IF(SELF.isEnabled() == TRUE) storedActor.moveTo(SELF) storedActor.enableNoWait() storedActor.placeAtMe(appearExplosion) storedActor.moveTo(SELF) SELF.disableNoWait() ENDIF endEVENT EVENT onHit(ObjectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) IF(akAggressor == game.getPlayer()) storedActor.moveTo(SELF) storedActor.enableNoWait() storedActor.placeAtMe(appearExplosion) shader.play(storedActor, 2) storedActor.moveTo(SELF) SELF.disableNoWait() ENDIF endEVENT EDIT: Some Odd Notes: - If you hit dead bodies with this spell, it will keep bringing random animals into the world. Dead body will stay where it is - Some NPCs will take multiple shots from you and instead of the original form going away, it will keep attacking you while animals keep appearing with every shot... this is mainly the case with guards - Sometimes an essential NPC's original form will reappear at that NPC's spawn point (I guess it is that) instead of where the animal was once the spell wears off or it is broken. - Not complaining or anything, just stating the weirdness. - It is fun changing NPCs into randm animals and watching a bunch of rabbits, mudcrabs, and chickens all about. Link to comment Share on other sites More sharing options...
nonoodles Posted November 10, 2015 Share Posted November 10, 2015 This reminds me of questions I got from someone who wanted to know only how something (script-related) works, or what it was doing to make it work like X and not work like B. It's not an invalid question but as I kept pointing them to the CK Wiki's beginner quest page, they kept getting frustrated. With all due respect to whatever was going on here, I think you're trying to leap into choppy waters without learning how to swim first. Or in your analogy, trying to learn a whole new language without learning its underlying grammar first. Which is fine, because no doubt many people have learned to swim or speak a new lingo that way. Theory, which is essentially what lofgren was trying to make you understand, is sometimes dismissed as less important than hands-on practical information, which is essentially what you wanted from the discussion. I suppose it /is/ harder to grasp and that's why some get frustrated and see no point in understanding these abstractions. If your scripting needs are not very extensive, I guess that's okay. If you mean to really delve into scripting, you may find yourself revisiting lofgren's explanations. Or, well, looking beyond the immediate need. However it goes, good luck and happy scripting. :) Link to comment Share on other sites More sharing options...
TheObstinateNoviceSmith Posted November 11, 2015 Author Share Posted November 11, 2015 You're right about language because everyone learns their first language by listening to others speak it first. Then it is explained to them. This script, is hardly choppy waters. This script is maybe a standard sized above ground pool. That was my point. I swam in a kiddie pool before, I want to eventually swim in the ocean and was asking how to swim in a smaller body of water first. Or, in my actual analogy, I would like to eventually build large ships. I have already built a small boat, I was asking how to build a significantly larger (and specific boat) boat than that, but much smaller than a cruise ship. Perhaps you were speaking in general, but here, understanding theory wasn't dismissed as less important than hands-on practical information. Practical hands-on information was requested in order to try to understand theory because simply reading theory wasn't getting me anywhere. If anything, the response given by Iofgren (and by you to the other someone) was dismissive to the idea of practical hands-on information and that isn't right. I won't be returning to Iofgren's explanations because (as he pointed out) he basically regurgitated what was available in the CK wiki, and in other tutorials. Information, which I pointed out, I already read multiple times and have bookmarked. Because of the above, now I understand things MUCH more than I did. Now understanding what I am reading regarding in the CK wiki and/or other places is much easier than it was before. I am starting to feel like I am truly grasping the basics. The point is, we don't all learn from simply reading the definition of a word repeatedly. Or learn what the definition of a word is when the word itself and/or other words we don't understand are being used to explain its definition. Some people, need to see the word used in a sentence... or several. But if you don't mind the advice (especially since you offered your take on the situation), when someone comes to ask for help (especially because they are already frustrated), if you don't have any intent of answering/helping them in the way they are asking, just move on. This is especially true after you attempt to help them the first time in a manner other than the one requested, and they don't find it helpful to them. It doesn't matter if you agree with what they want, learning scripting is already very frustrating for some people. And some only post as they are trying somewhere/something else after trying everything else. Better to just ignore them if you don't like their question than add to that frustration just to make some point. You aren't hurting them by moving on, and they aren't hurting you by asking whatever it is they are asking so there is no need to keep pointing them elsewhere. That is just my opinion. :wink: Good luck to you as well... though I know you don't really need it as I've seen a few of your posts and I believe you to be quite knowledgeable. Link to comment Share on other sites More sharing options...
Recommended Posts