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

Altrunchen

Allies
  • Posts

    36
  • Joined

  • Last visited

Everything posted by Altrunchen

  1. So you're saying that declaring the int activatornum in the button and editing its properties will send that data automatically to the main script to be read? EDIT: Ok so after reading your response a few times I realized that you meant for the script to go on each button and for the activatornumber to be set on each button individually that way. I tried this, by placing the script on each button I wanted to use, setting the number and setting the outputactivator objectreference. When I tested this, nothing happened. I checked the global variable in-game using the console and it had not changed from 0. What exactly am I doing wrong here?
  2. Thank you so very much! It's so nice of you guys to take time out of your day to help random people on the internet with stuff like this. I'll let you guys know if it works or not. EDIT: Ok so the script compiles now but when I tried implementing it I realized that there wasn't a way in the script to send the integer assigned to the individual switches to the script to be evaluated. WillieSea did suggest modifying the button's code so that an integer could be assigned to it, and I believe his idea was that the activated button would send its assigned integer to the main script, thereby fulfilling the corresponding 'if' statement. It's probably my own fault that this didn't seem to work, but the one thing I thought was fishy was that the main script was asking me for the integer in the properties window that was supposed to come from the switches, not from itself. What I thought might work would be to have it so that there were multiple objectreferences that were part of the if statements. As in if the object reference was activated it would tell the script to do such and such. Putting that idea into effect resulted in a successful compilation but I realized that there was another problem. The "outputactivator" to be activated implied that this script was not on the object effected by the combination, so I thought what if the script would just tell the object that it is on to activate instead? What happens is that the combination doesn't seem to enter because the doors do not swing open (or activate, I would prefer if this script could work on other things apart from doors) and the one button that the script is attached to activates while I manually activate the doors. Here is what I changed: Scriptname MODCombinationLockTest01 extends ObjectReference {Test stage script for the combination lock concept.} ObjectReference Property outputactivator auto ObjectReference Property ones auto ObjectReference Property tens auto ObjectReference Property hundreds auto ObjectReference Property thousands auto ObjectReference Property reset auto Int Property combination auto GlobalVariable Property entrynumberGBL auto Event OnActivate (ObjectReference akActionRef) if ones.activate(game.getplayer()) entrynumberGBL.SetValue(entrynumberGBL.GetValue() + 1) elseif tens.activate(game.getPlayer()) entrynumberGBL.SetValue(entrynumberGBL.GetValue() + 10) elseif hundreds.activate(game.getPlayer()) entrynumberGBL.SetValue(entrynumberGBL.GetValue() + 100) elseif thousands.activate(game.getPlayer()) entrynumberGBL.SetValue(entrynumberGBL.GetValue() + 1000) elseif reset.activate(game.getPlayer()) entrynumberGBL.SetValue(entrynumberGBL.GetValue() * 0) endif if (entrynumberGBL.GetValue() == combination) activate(self) elseif (entrynumberGBL.GetValue() != combination) entrynumberGBL.SetValue(entrynumberGBL.GetValue() * 0) endif EndEvent
  3. Ah, okay thank you. I appreciate the help! EDIT: Alright, so the error report now says: Starting 1 compile threads for 1 files... Compiling "MODCombinationLockTest01"... c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(11,24): int is not a known user-defined type c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(11,35): cannot compare a none to a int (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(14,28): int is not a known user-defined type c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(14,39): cannot compare a none to a int (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(17,28): int is not a known user-defined type c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(17,39): cannot compare a none to a int (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(20,28): int is not a known user-defined type c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(20,39): cannot compare a none to a int (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(23,28): int is not a known user-defined type c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(23,39): cannot compare a none to a int (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(28,32): argument akactivator is not specified and has no default value c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(30,48): cannot multiply a globalvariable with a int (cast missing or types unrelated) No output generated for MODCombinationLockTest01, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on MODCombinationLockTest01 Sorry for bugging you guys so much about this, but to be honest I really don't know what I'm doing here.
  4. Hmm okay so I like the look of the second option there even though my intuition tells me that it might be the less efficient of the two options... So then this is what I am thinking of using (this feels just like high-school math all over again O_o): Scriptname MODCombinationLockTest01 extends ObjectReference {Test stage script for the combination lock concept.} ObjectReference Property outputactivator auto Int Property combination auto Int Property activatornum auto GlobalVariable Property entrynumberGBL auto Event OnActivate (ObjectReference akActionRef) if activatornum.GetValue() == 1 entrynumberGBL = entrynumberGBL.GetValue() + 1 elseif activatornum.GetValue() == 2 entrynumberGBL = entrynumberGBL.GetValue() + 10 elseif activatornum.GetValue() == 3 entrynumberGBL = entrynumberGBL.GetValue() + 100 elseif activatornum.GetValue() == 4 entrynumberGBL = entrynumberGBL.GetValue() + 1000 elseif activatornum.GetValue() == 0 entrynumberGBL = entrynumberGBL.GetValue() * 0 endif if (entrynumberGBL.GetValue() == combination) outputactivator.activate() elseif (entrynumberGBL.GetValue() != combination) entrynumberGBL = entrynumberGBL * 0 endif EndEvent Ok so this one didn't work and here's the error code: Starting 1 compile threads for 1 files... Compiling "MODCombinationLockTest01"... c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(11,17): int is not a known user-defined type c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(11,28): cannot compare a none to a int (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(12,9): type mismatch while assigning to a globalvariable (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(14,21): int is not a known user-defined type c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(14,32): cannot compare a none to a int (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(15,9): type mismatch while assigning to a globalvariable (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(17,21): int is not a known user-defined type c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(17,32): cannot compare a none to a int (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(18,9): type mismatch while assigning to a globalvariable (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(20,21): int is not a known user-defined type c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(20,32): cannot compare a none to a int (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(21,9): type mismatch while assigning to a globalvariable (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(23,21): int is not a known user-defined type c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(23,32): cannot compare a none to a int (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(24,9): type mismatch while assigning to a globalvariable (cast missing or types unrelated) c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(28,25): argument akactivator is not specified and has no default value c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(30,41): cannot multiply a globalvariable with a int (cast missing or types unrelated) No output generated for MODCombinationLockTest01, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on MODCombinationLockTest01
  5. Okay so then, this is what the script looks like so far: Scriptname MODCombinationLockTest01 extends ObjectReference {Test stage script for the combination lock concept.} ObjectReference Property outputactivator auto Int Property combination auto Int Property activatornum auto GlobalVariable Property EntrynumberGBL Auto Event OnActivate (ObjectReference akActionRef) activatornum.GetValue() if activatornum == 1 EntrynumberGBL = EntrynumberGBL.GetValue() + 1 elseif activatornum == 2 EntrynumberGBL = EntrynumberGBL.GetValue() + 10 elseif activatornum == 3 EntrynumberGBL = EntrynumberGBL.GetValue() + 100 elseif activatornum == 4 EntrynumberGBL = EntrynumberGBL.GetValue() + 1000 elseif activatornum == 0 EntrynumberGBL = EntrynumberGBL.GetValue() * 0 endif EndEvent if (EntrynumberGBL == combination) activate.outputactivator() elseif (EntrynumberGBL != combination) EntrynumberGBL = EntrynumberGBL * 0 endif So if this is correct, then that means all I have to do now is declare the activatornumbers in the button script like you previously mentioned and then fill in the property spaces in the scripts tab. Is that right?
  6. So let me see if I understand you. First: Add an integer property Int Property activatornum auto Second: Give the integer a local value inside of the button's script (the one that comes with it I'm assuming) in the Object Window (the window that appears when you double click an item? as well as under the "scripts" tab I would gather.) Sorry but I am not sure how to specifically go about doing this. If I were to edit a pre-existing code then I think that I would have to declare the new integer there as well. So would I need to do this then? Int Property activatornum auto Int = # Third: I do not know how to use a global variable or even know what it is precisely, but gathering from the context you used it in and its name, I'm assuming that it is some kind of variable that will act on multiple activators at once?
  7. Alright so I combined the if statements into one event, that I understand how to do...I think. But I do not know what exactly you mean by a condition check unfortunately. What exactly do you mean? Scriptname MODCombinationLockTest01 extends ObjectReference {Test stage script for the combination lock concept.} ObjectReference Property inputones auto ObjectReference Property inputtens auto ObjectReference Property inputhundreds auto ObjectReference Property inputthousands auto ObjectReference Property resetactivator auto ObjectReference Property outputactivator auto Int Property combination auto Int entrynumber = 0 Int entry = 0 Event OnActivate (ObjectReference akActionRef) if activateRef == inputones entry = entry + 1 entrynumber = entrynumber + 1 endif if activateRef == inputtens entry = entry + 10 entrynumber = entrynumber + 1EndEvent endif if activateRef == inputhundreds entry = entry +100 entrynumber = entrynumber + 1 endif if activateRef == inputthousands entry = entry +1000 entrynumber = entrynumber + 1 endif if activateRef == resetactivator entry = entry * 0 entrynumber = entrynumber * 0 endif EndEvent if (entry == combination) activate.outputactivator() elseif (entry != combination) entry = entry * 0 endif
  8. Play Sound Effect and Explosion Script This is a script that was made by WillieSea upon request and edited somewhat by myself. The purpose of this script is to play a sound effect when a trigger is activated and to place a particular explosion at the player. WillieSea's original script: Scriptname MyTriggerBoxScript extends ObjectReference {Attached to triggerzone} Sound Property QSTAstrolabeButtonPressX Auto Event OnTriggerEnter (objectReference activateRef) if activateRef == Game.GetPlayer() QSTAstrolabeButtonPressX.Play(Self) ;Depends on what you want to do endif endEvent My edited version of WillieSea's script: Scriptname MODPlayEffectonEnterTrigger extends ObjectReference {Attached to triggerzone} Sound Property QSTAstrolabeButtonPressX Auto Explosion Property MGEyeOpenExplosion Auto Event OnTriggerEnter (objectReference activateRef) if activateRef == Game.GetPlayer() QSTAstrolabeButtonPressX.Play(Self) placeAtMe(MGEyeOpenExplosion) ;Depends on what you want to do endif endEvent Please take note! That the reason I edited WillieSea's script was because I did not manage to get it to work in the state that it was in. With minor tweaking and just about all the legwork already done for me, I have found the edited version to function without any problems so far.
  9. Hello I could use some help with a script if you don't mind? You see I am trying to make a script that functions as a sort of combination locking mechanism. What this script does (in theory) is utilize four input activators that enter in integers of 1, 10, 100, and 1000 respectively upon activation. In addition to the input switches an entry-reset switch would also be involved in the script in case the user made an error in entry. Furthermore, the script would compare the entry with the creator-defined combination and if the combination was correct then it would activate an object reference of the creator's choosing. I might also add that it would be preferable if the activators, combination, and so forth could be edited outside of the "edit-source" option for the sake of ease-of-use. I am still quite a noob at this so any and all help would be greatly appreciated! Here is a copy and paste of what I have attempted so far: Scriptname MODCombinationLockTest01 extends ObjectReference {Test stage script for the combination lock concept.} ObjectReference Property inputones auto ObjectReference Property inputtens auto ObjectReference Property inputhundreds auto ObjectReference Property inputthousands auto ObjectReference Property resetactivator auto ObjectReference Property outputactivator auto Int Property combination auto Int entrynumber = 0 Int entry = 0 ;What would happen if the object called inputones was activated Event OnActivate (ObjectReference akActionRef) entry = entry + 1 entrynumber = entrynumber + 1 EndEvent ;What would happen if the object called inputtens was activated Event OnActivate (ObjectReference akActionRef) entry = entry + 10 entrynumber = entrynumber + 1 EndEvent ;What would happen if the object called inputhundreds was activated Event OnActivate (ObjectReference akActionRef) entry = entry +100 entrynumber = entrynumber + 1 EndEvent ;What would happen if the object called inputthousands was activated Event OnActivate (ObjectReference akActionRef) entry = entry +1000 entrynumber = entrynumber + 1 EndEvent ;What would happen if the object called resetactivator was activated Event OnActivate (ObjectReference akActionRef) entry = entry * 0 entrynumber = entrynumber * 0 EndEvent ;The section that would read the entry and compare it to the combination if (entry == combination) activate.outputactivator() elseif (entry != combination) entry = entry * 0 endif Here is the copy and paste of the error report: Starting 1 compile threads for 1 files... Compiling "MODCombinationLockTest01"... c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(21,0): script event onactivate already defined in the same state c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(27,0): script event onactivate already defined in the same state c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(33,0): script event onactivate already defined in the same state c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(39,0): script event onactivate already defined in the same state c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MODCombinationLockTest01.psc(45,0): missing EOF at 'if' No output generated for MODCombinationLockTest01, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on MODCombinationLockTest01
  10. Thank you so very much! I really appreciate it. Let me just see if I understood you though because I'm not entirely sure that I did. Alright so first I need to make a trigger box. Then an activator without a mesh. Which I think means like a primitive that activates itself upon entry. There is, confusingly, a triggerbox that will do this. So I am not sure what you meant exactly. Then I need to place the script you so generously made on the activator box. And "attach" it, I can only assume that means using the option that says "Attach refernce" on the properties window. Is that correct? Then in order to set up the effects that I want I will need to select the sound in the script properties tab, as well as write in a property for the explosion data with [*********.Play.(PlaceAtMe)]. Do I have this correctly understood? Thanks again for helping me this far already. EDIT: Alright so I got it to work perfectly. Thank you so much. Here let me try to copy and paste the script... Scriptname MODPlayEffectonEnterTrigger extends ObjectReference {Attached to triggerzone} Sound Property QSTAstrolabeButtonPressX Auto Explosion Property MGEyeOpenExplosion Auto Event OnTriggerEnter (objectReference activateRef) if activateRef == Game.GetPlayer() QSTAstrolabeButtonPressX.Play(Self) placeAtMe(MGEyeOpenExplosion) ;Depends on what you want to do endif endEvent Again thank you so much. You're a life-saver. If there's anything you ever need from me, just ask.
  11. Hello there I would appreciate some help with a script that doesn't exist and yet still has many other scripts that come close to resembling its function. I have searched high and low for a script that could meet this end, and the closest I could come was a script that would only fire once. I am terrible at programming, but I deeply love making things, especially in the Creation Kit. I am on a mission of mercy here. I am also posting this here because I have a hunch that I'm not the only one who could use a script that would do the following. Please if someone is willing to help, I hope you find this post. I would like it if someone could make a script that: Activates when: The Player enters a triggerbox. Plays the special effect: The Eye of Magnus Open Explosion Visual Effect. Or any visual effect of the user's choosing. A sound effect of the user's choosing. And does this: Every time an actor enters the triggerbox. Or as many times as the user desires.
×
×
  • Create New...