Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Launius

Allies
  • Posts

    3
  • Joined

  • Last visited

About Launius

  • Birthday 10/30/1984

Profile Information

  • Gender
    Male
  • Location
    Kingsville, TX

Launius's Achievements

Layman

Layman (1/11)

0

Reputation

  1. There is one base object, but I gave them each unique Reference EditorIDs. When using the GetSelf function on an item that has a Reference Editor ID, it returns the Reference Editor ID instead of the object's base reference ID. So I'll note that when I use the GetSelf.disable, it will only disable that one item. Just for the sake of pointing it out, I have already tested it. Anyhow, basically there are a combination of about 6 scripts and they work like this. When the player attacks the ground with a shovel, a dirt pile appears. If they place a tree seed in the dirt pile, then wait 1 game day, a tree will appear. The trees are set up like activators, so that if the player clicks on them, they can move them on the X, Y, or Z axis. If the player attacks a tree with a woodaxe, they will gain wood. ::this is where this particular script starts:: I need the trees to randomly be replaced with tree stumps as the tree is being attacked. So let TargetRef == whichever tree is being interacted with, and let NewObject == one of ten tree stumps that will replace said tree. The script MUST be placed on the tree or I won't be able to use the GetSelf function to register which tree is being interacted with. Furthermore, I'd prefer to use a GameMode block. I've considered using an OnMagicEffectHit on the tree, then placing a scripted enchantment on the woodaxe, but I'm not sure it would work. I hope that gives more information as to what I'm trying to accomplish and how I'm trying to accomplish it. Thanks for reading, thanks for helping. Update: I've tried using the OnMagicEffectHit on the tree and it only worked if I used the effect as a spell. Is it possible to set up a variable in one script and then read it with another? If so, I can use an on add block on the wood that is added as the player is attacking and "set Mode to 1", then with a GameMode block on the tree "if (mode == 1)".
  2. I've used those lines in a script before and they didn't seem to give me any problems. I tend to stick with what works, lol. Actually, I'm desperate, so I'll try using the 'set' way and see if I can't make this thing work its magic. UPDATE: Okay, I've continued to try it several different ways with little luck. I did get it to kick off by using an OnActivate block, but that doesn't help me much.
  3. This is a bare bones version of a script I've been working on, based on what I've narrowed the problem down to. Ideally, it would replace a certain object when it was attacked by the player. I have a hunch that my problem may lie in using the GetSelf function. The script will be placed on the base object (an activator), but the player will interact with 1 of 10 references placed in the game world. Any thoughts as to why my script won't fire? Begin GameMode If ( onControlDown 4 ) let rCrosshairs := getCrosshairRef let rWeapon := player.getEquippedObject 16 if (nameIncludes "Weapon" rWeapon && player.isAttacking && rCrosshairs.nameIncludes "Object") Set TargetRef to GetSelf TargetRef.disable NewObject.moveto TargetRef endif Endif End
×
×
  • Create New...