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...

Critterman

Allies
  • Posts

    943
  • Joined

  • Last visited

Posts posted by Critterman

  1. So some of you may have heard that I'm making a flashlight. Well, I think I am at the point where a [WIPz] is in order :P

    I have made a video for your viewing pleasure :P. Tell me what you think:

    The whole mod is pretty self explanatory. You cast a spell, much like vanilla oblivion's light spell, and then there is a light in front of you (well to be exact there are two lights). What is special about this light is that it will always be in front of you AND it will (almost) always stay in your view. Meaning if you walk up to a tree, the light will illuminate the tree, not the area behind it; just like a flashlight XD . Cast the spell again and the lights vanish, it is a toggable spell (though I can make it timed if anyone wishes it).

    The way I did it isn't really important, but if you want I can explain how. (it involves two tiny invisible men holding torches laugh.gif oh the beauty of making work-arounds for oblivion's limitations!)

    But I should thank QQuix for the valuable code from his's GetLOS Test Environment mod, which made this mod possible :D .

    Unfourtunatly this mod is not flawless. Doing something the oblivion engine wasn't meant for can cause problems. Most noteably the flashlight hardly works in interiors. In the video, you can see how it illuminates the walls in the entryway but if you look closely, further down the cave the lights cease to illuminate the statics, only actors and inventory items. So, for some odd reason, only some interior peices are illuminated by the flashlight; which is quite frustrating, as a dark dungeon would be the perfect place for a handy flashlight. If anyone knows a solution please, do tell.

    Additionally, the further light has a tendency to go underground. This of course is no good as it cannot illuminate anything down there. I have sort of half fixed this by making it so that if the light is not at its limit (750 units) then it will be adjusted 150 units up (along the Z axis). This makes it so that if you look down near your feet the light will not dissapear underground but stay above ground illuminating the area. The drawback to this is that this makes the light seem off-center when you point it at a close object; this is because it is 150 units above center. If the light is at its limit then it is centered, however it can dip underground as well.

    I might eventually make some of the values in the mod configurable. Such as the light limit.

    Tell me if you have any suggestions, or ask me any questions you have. I will be releasing a beta as soon as I polish the mod up to releasing standards (perhaps a job for the Beta Testing Guild?)

  2. I looked at it more closely and fixed a few things. This should work right:

    scn aaSackSCRIPT
    
    
    float money
    
    short button
    
    short firstuse
    
    short choosing
    
    
    Begin OnActivate
    
     If firstuse == 0
    
      set choosing to -1
    
      set firstuse to 1
    
     endif
    
    end
    
    
    Begin Gamemode 
    
     if choosing == -1
    
      messagebox "Choose Action", "Deposit money", "Withdraw money", "Show deposited money"
    
      set choosing to 1
    
     elseif choosing == 1
    
      set button to GetButtonPressed
    
      if button == 0
    
       set choosing to -10
    
      elseif button == 1
    
       set choosing to -11
    
      elseif button == 2
    
       set choosing to -12
    
      endif
    
     elseif choosing == -10
    
      messagebox "How much do you want to deposit?", "500", "1000", "10000"
    
      set choosing to 10
    
     elseif choosing == 10
    
       set button to GetButtonPressed
    
       if button == 0
    
        if player.getGold >= 500
    
         set money to money + 500
    
         player.removeitem Gold001 500
    
        else
    
         message "You do not have enough money."
    
        endif
    
        set choosing to 0
    
       elseif button == 1
    
        if player.getGold >= 1000
    
         set money to money + 1000
    
         player.removeitem Gold001 1000
    
        else
    
         message "You do not have enough money."
    
        endif
    
        set choosing to 0
    
       elseif button == 2
    
        if player.getGold >= 10000
    
         set money to money + 10000
    
         player.removeitem Gold001 10000
    
        else
    
         message "You do not have enough money."
    
        endif
    
        set choosing to 0
    
       endif
    
     elseif choosing == -11
    
      messagebox "How much do you want to withdraw?", "500", "1000", "10000"
    
      set choosing to 11
    
     elseif choosing == 11
    
       set button to GetButtonPressed
    
       if button == 0
    
        if money >= 500
    
         set money to money - 500
    
         player.additem Gold001 500
    
        else
    
         message "Not enough money in account."
    
        endif
    
        set choosing to 0 
    
       elseif button == 1
    
        if money >= 1000
    
         set money to money - 1000
    
         player.additem Gold001 1000
    
        else
    
         message "Not enough money in account."
    
        endif
    
        set choosing to 0 
    
       elseif button == 2
    
        if money >= 10000
    
         set money to money - 10000
    
         player.additem Gold001 10000
    
        else
    
         message "Not enough money in account."
    
        endif
    
        set choosing to 0
    
        endif
    
     elseif choosing == -12
    
      messagebox "You have deposited %.0f septims" money
    
     endif
    
    End
    
      

    Note: You had the "firstuse" variable in your original script make it so the player can only access the messageboxes only once. I kept it working like that, but did you intend it to do that?

  3. Shall I use 0 everywhere in my script or only in that part???

    Anywhere you use getButtonPressed. The first button in a message box is returned as button 0 with getButtonPressed. All the following buttons go up one (second button = 1, third button = 2, etc.), its like the index for arrays. The first is always 0. So use it all throughout your script.

  4. Its giving you that error because you started an if condition with an elseif. You must have an if before you can follow it with elseifs. Also, you have way too many endifs, you only need one endif per if condition. This is how it should be:

    
    if actwith == 1 (this is line 47)
    
     messagebox "How much do you want to withdraw?", "500", "1000", "10000"
    
      set button to GetButtonPressed
    
       if button == 0
    
        set money to money - 500
    
        player.additem Gold001 500
    
        set actwith to 0 
    
       elseif button == 1
    
        set money to money - 1000
    
        player.additem Gold001 1000
    
        set actwith to 0 
    
       elseif button == 2
    
        set money to money - 10000
    
        player.additem Gold001 10000
    
        set actwith to 0
    
       endif
    
    endif
    
    if actshow == 1
    
     messagebox "You have deposited %"money" septims"
    
    endif
    
    End
    
      

    Edit: yes that looks right. Except you need to start with if button == 0 not if button == 1

    See Joben's post

  5. OBSE scripting is just like vanilla scripting, just with expanded functions.

    Also, if you have experience with other programming languages like C++ or Java then some of the OBSE functions like while and arrays will be familiar to you. If not, do not fear, the OBSE Command Documentation is pretty extensive on how to use the new functions.

    If you have a specific question we can probably answer it here :)

  6. Q1:

    Would it be easier to have my lights (light script) be activated using the Quest script dialogs or what?

    There are always many ways you can go about any scripting/quest making. Here are a few ways I can see how it could be done:

    You will have a quest with a quest script attached to keep any variables you might need in other scripts, or to perform locational checks on the player.

    1. Once player enters your ruin you can check if the player is in your ruin with getInCell and advance the stage using setStage in your quest script. This displays the "too dark message"

    2. Since the light will be enabled once the player activates the object then you should put the script on the activator so you can make use of the onActivate block (so enable the light via the script on the activator object). That way when the player activates the object you can enable the light.

    3. You can do this step two ways...

    - You can put a setStage command in the onActivate block on the activator object's script, to advance the quest stage.

    - OR you can, in the quest script, use getDisabled to tell if the player activated the light, and if so you advance the stage using setStage there.

    4. You now need to unlock the AR Gate door. This can also be done a few ways:

    - In the activator object's script, under the onActivate block, use a simple unlock function on your AR Gate reference to unlock the door.

    - OR In the quest script, under gamemode, check if the light has been enabled with getDisabled and unlock door accordingly.

    - OR make a new base object for the AR Gate door, add a script to it, and in it's gamemode block, check if the light has been enabled with getDisabled and unlock door accordingly.

    As you can see, the first way is a lot easier than the second and third. I usually run through all of the different ways of doing something before I script it to avoid creating unnecessary work for myself.

    About your second question... you can start making the IDs and stages for the quests you want now. I found writing out all of the quest stages first helps guide me along better while making quests.

    So that is basically how I would do it, but like I said there are many ways to go about achieving the same result. Hopefully you can figure out the rest, it sounded like you weren't THAT experienced at scripts so I recommend WillieSea's tutorials and the CS Wiki to help with learning. And just ask here if you have any other questions :pints:.

  7. Had mice problems a while ago, but it was the mice's fault.

    Maybe it is the usb port. Do you have multiple usb ports? Try plugging your mouse into all of them.

    If not then it may be a driver problem, try updating your drivers.

    And if all else fails try googling the error and see if anyone else found a solution to your problem.

  8. I remember seeing a thread about this on the beth forums, but, several searches are not coming up with it...... there were some rather novel ideas on how to approach it... Maybe you will have better luck?

    Here is one, QQuix explained how he did the stuff in the video in this thread.

  9. You can give the player a spell ability that constantly checks the player's health and makes sure it is always above a certain threshold, but if the player gets hit by something that removes all of their health in one blow then they will still die XD

    Edit: It looks like someone has already thought what I have on the UESP Wiki :D . The hybrid approach looks nice :yes:

  10. New Version

    1.0 - 1/11/2010 - Version 1.0

    * Added a close button on the main interface to give the user a second way to exit.

    * Removed the requirement that you need to convert before using many of the features.

    * Updated readme (also added guide to making books in Oblivion)

    This I believe will be the final version but please tell me if you find anything else wrong! XD

  11. If you want to emulate the way a varla stone works you can simply script your Rune Stone to add an Varla stone to the player and use it to refil the items, it would not need OBSE, but you will see the Item Add and Used messages. Though you could try and mask them by displaying your own message before you add/use them stone, may not work though.

    here is an example:

    Scriptname RuneStoneScript
    
    
    Short DoOnce
    
    
    Begin Equip ; Used from the inventory
    
       If DoOnce == 0
    
        Message"Recharging Equipment....", 3
    
        Player.Additem VarlaStone 1
    
        Player.EquipItem VarlaStone 1
    
        Set DoOnce to 1
    
       Endif
    
    End

    If the additem/removeitem spam is not covered by that message , then copy that message and paste the copy after it so you have 2 messages right after each other. Two messages, one right after the other, usually blocks message spam from additem/removeitem, but it also blocks any of your other messages for a few frames so you have to be careful.

×
×
  • Create New...