ChrisPydtank Posted October 27, 2009 Author Share Posted October 27, 2009 cool it makes more sense now thanks... i think i got mixed up with optional quest marker... i think its still solid... on the map marker you put down on world map is hollow... so is the "awaitinginput" an actual syntax or is it so when you have "awaitinginput ==1" it will register as your own... hmm or this way will make it sound more what im saying... Instead of preset variables... awaitinginput change to monkeyinput short monkeyinput Begin onactivate player if isactionref == player set monkeyinput 1 endif end Begin gamemode if monkeyinput ==1 activate ;random thing i picked lolz... so its not following the name... just the number following it... is that what i can do...? i found some like this to the reason why im thinking its not preset... short DONE short Offload short happenonce short onGo with codes in the same sense as above... set offload 2 if offload ==2 set offload to -1 stuff like that... like the buttonVar... its so weird how it works and how it knows what to do when you press a certain button... set buttonVar to getbuttonpressed getbuttonpressed has the numbers up to i think 200 maybe i dunno something said that... so your setting the buttonVar to get the button pressed from the numbers of the choices in the options for the button pressed... choice 1 Hi is 0 so the buttonVar finds it pressed and gets the button that is pressed which is 0 to make it true and therefore whatever is done after if buttonVar == 0player.jumps ;random words from top of head so in that sense... if this occurs set offload to getbuttonpressed then if offload ==0player.jumps has same affect... am i on track? and the endif thing is ok... that was rough copy... its all correct... i made my script look like above... even tho id like to know how to make something only work once until another condition in the script becomes active... Link to comment Share on other sites More sharing options...
spammster Posted October 27, 2009 Share Posted October 27, 2009 okay, some more: you can call it whatever you want, as long as there is not another script that uses the same variable at the same time, so if you use your own variables and pick the name at random you should be good. it doesn't matter if you call it awaitinginput, monkeyinput or even monkeyballs the compiler couldn't care less what you call it, as long as you declare once what monkeyballs is. trying to make that understandable, think of the compiler as a kid, that has never seen a book or been to the outside world, so all it knows is what you tell it. you could show it an apple and say its a cherry, the kid will believe it and from now on call it a cherry, this however does not change the fact that it is an apple you just changed its name. (for this example no kids where hurt ;) ) the reason its called awaitinginput is simply for human understanding, always try to give these variables a name that means something to you. if you read the script and don't know what it does, you will read awaitinginput and automatically know (or at least assume) that this variable is used in an interaction with an object which contains multiple choice. also don't get getbuttonpressed confused, that is not a variable so much as a function that somewhere in the deep mystical realm of the games programming is declared to become the number of the choice you made. and for the scripts you did there (ignoring if they have a purpose right now or not, this is what they should look like: short monkeyinput short offload short numberofthebuttonthatwaspressed Begin onactivate player if IsActionRef player == 1 set monkeyinput 1 endif end Begin gamemode player if monkeyinput == 1 activate set offload to 2 endif if offload == 2 set offload to -1 set numberofthebuttonthatwaspressed to getbuttonpressed endif if numberofthebuttonthatwaspressed == 0 player.jumps endif end or: Begin gamemode player if monkeyinput == 1 activate set offload to 2 endif if offload == 2 set offload to getbuttonpressed endif if offload == 0 player.jumps endif end it doesn't really matter where you declare the variables, as long as its outside of an begin/end block, but you should just always put em on top, cause thats where they should be, so start with scn nameofthescript short A short B short C float timer .... begin onactivate ... and if the script is getting more complex, add comments, this does not only help you when after some time you come back to the script to check something but it also helps people who wanna help you by looking through it, the faster one gets what something is used for, the more likely it is they will find what is wrong (cause if you need 10 minutes just to figure out what the variables are used for, you don't care anymore) Link to comment Share on other sites More sharing options...
ChrisPydtank Posted October 28, 2009 Author Share Posted October 28, 2009 BLOODY AWESOME!!!! loving it... so was I correct on "getbuttonpressed"? it registers what choice you pressed... like this: C1: Jump (0)C2: Dont Jump (1)C3: Think About Jumping (2)etc So the first choice if pressed means that the variable is 0 that was selected therefore set numberofthebuttonpressed to getbuttonpressed (or english) set choice of the button to get the number of the button pressed that the choice equals above. if numberofthebuttonpressed ==0 (or in english) if The button that was pressed was choice 1 that equals 0 player.jumps (or english) make the player jump elseif numberofthebuttonpressed == 1 - choice 2 = 1 that was clicked player.dontjump is that the function of it? it makes the choices turn from what we read to a number 012 click 0 in english is jump and numberofthebuttonpressed is basically a title to that number... you might see why im asking... you wrote if offload == 2set offload to -1set numberofthebuttonthatwaspressed to getbuttonpressedendif if numberofthebuttonthatwaspressed == 0player.jumpsendifend at no time it shows through out the script about what the choices equal... where does "if numberofthebuttonthatwaspressed == 0" get the 0 from hence why i say that the choices that become on screen get the numbers by the "getbuttonpressed" from zero up. so getbuttonpressed cant do what other functions offer in regards if you activate a certain function you must add a number like SetObjectiveDisplayed IDQuest 10 1 10= the stage in the ID Quest1= well actually I dunno why its there, nothing in any info anywhere talks about why this number has to be, I changed it to 2 but the affect stayed the same. but as soon as you remove it, the whole thing doesnt work... but some functions when used changes an invisible number to example (1) otherwise if its false it stays (0) so thats what im trying to understand lolz... what happens in that example "getbuttonpressed" to get whatever you have it set to... set monkeyballs to getbuttonpressed... to be the number you if... PS seems my new topic about my render issue isnt being helped... the topic is called Suit Error hope someone can read it and work out why its happeneing Link to comment Share on other sites More sharing options...
spammster Posted October 28, 2009 Share Posted October 28, 2009 getbuttonpressed does not have to be declared since it is used in the script applying directly to the object that works the buttons. an example of how this works (and where you will see the 0,1,2 etc.) if you apply a messagebox to an object, you can set indizies (thats the plural of index right ?) just like queststages (however not limited to 250), for instance you could add 3 choices for the selection, they will be listed in the messagebox with their corresponding indizies, however you don't have to assign the index it gets autoassigned starting with 0 and counting up (which is why the first choice always results in 0 and not 1) if you have 3 choices, the values can be 0,1,2 getbuttonpressed simply works like getstage it just looks up what button you pressed, however since getbuttonpressed is not a declared variable you cannot use it like one, so you can't go like: if getbuttonpressed == 0what you do is declare a variable, which is set to the value getbuttonpressed returns and you work with that one (remember what i said about messed up overcomplicated languaged ?) and that is where you find the numbers for getbuttonpressed, all scripts (if they are begin gamemode) are constantly running so the compiler has all the data needed so theres no reason it all has to be in the same place (thats how humans need it but not computer :D ) it is advised that you either have notepad/editor etc. open where you can make quick notes about what does what or go classic and use a pen and paper (i usually use paper cause that way i don't have to tab out of the geck) another tip: you can open several scripts at once, theres no need to close a script to open another one, so you can open up all scripts/bases etc. you work on right now and edit them simultaniously (having 2 LCD's does help a lot for that) and with your setobjectivedisplayed again its redundant, if you call a function "set objective displayed" one would assume theres no need to actually confirm it again, but thats all the 1 does. the only real purpose of this i guess is optional quest stages, if you don't complete them and go straight for the mainquest, you could use setobjectivedisplayed questid optionalstage 0 to remove it from the pipboy. consider the 0/1 thing to be a off/on switch at least its kinda consistant (its not for videofiles, if you wanna turn off radio and ambient audio you gotta set it to 1 instead of 0) but for everything else 0 = off and 1 = on so here would be an example of something that works and makes sense: (copypasta from a script i put up about tvchannels or so for someone i think) it works like this: if you click on the projector a messagebox shows up that offers 2 choices:the first one: watch fallout 3 trailer (this one has the index 0)the second one: weather (this one has the index 1) scn videoplaytrigger short awaitingInput short buttonvar begin onactivate showmessage tvselection;this show the messagebox in which you make your selection set awaitingInput to 1 end begin gamemode player if awaitingInput == 1 ; it is 1 once you clicked on the projector set buttonVar to getbuttonpressed; buttonVar now becomes either "0" for the fallout 3 trailer or "1" for weather if buttonVar > -1; this is always the case, cause the lowest value for buttonVar is 0 set awaitingInput to 0; awaitinginput is set to 0, so you don't cause a loop if buttonVar == 0 playbink "demo.bik" 1 1 1;play the fallout 3 official trailer elseif buttonVar == 1 ;playvideofile thats not yet available endif endif endif end Link to comment Share on other sites More sharing options...
ChrisPydtank Posted October 28, 2009 Author Share Posted October 28, 2009 sweet that makes tons of sense now... im going on with this with better knowledge... woot... everything else seems self explained... just the odd numbers and reasons got to me... making sure it dont screw up... thanks so much dude... very well done... you were a great help... now gotta work out the clothing issue as i mentioned above SUIT ERROR... "Hey everyone, yet another problem that someone might be able to solve... in my vault 74... i have made a texture change in the vault suits... ive put 74 on them... so anyways... i wanted to test them out... see the mesh of the clothing (GO.nif) on outside world and see it on me when i pick it up and equip it... but when i walked up to the position i put it... i couldnt see it... but when i got close enough to press to take it... it said I could take it... got it... and I could put it on with no problems... so i tried moving it into mid air and did it again... same thing... but when i walked into it... the collision occurred and it flew away like it would when you bump it and it appeared... I tried moving again... did the same thing... pushed it, shot it and stuff... same thing happens... so i thought it might be an error to everything i changed in the geck properties... so just in case i put down vault 77 suit and 87 untouched... went in... the same problem occurred... couldnt see 77 suit or 87 either... could press it... and hit it and it appeared.... any ideas??? UPDATE===== I was playing around with my new custom Fatman trying to see if i could get megaton explosion level, I died... I discovered that when i "coc" back to the vault and walked around... certain places had issues of rendering when it did it fine the first time... like the Cave piece connecting to the vault door area... when you get close to the door... the bit where it connects disappears and you can see the outside area... same when you go up the stairs to get to upper level... as you get to the arch the walls on each side disappear and you can see the other rooms through the wall... and this is where the update is... the Vault 74 suit i put down... was showing... but all those other problems were occurring... so I exit the game and start again... coc to the vault... the game works smoothly again... no rendering problems... but the suit is invisible again... I hope this helps..." Link to comment Share on other sites More sharing options...
spammster Posted October 29, 2009 Share Posted October 29, 2009 give FO3Edit a try (combined with the tutorial on how it works) there's probably an error showing up in there. for the seeing through walls etc., that sounds like you didn't connect the pieces correctly (you used snaptogrid?) Link to comment Share on other sites More sharing options...
ChrisPydtank Posted October 29, 2009 Author Share Posted October 29, 2009 ok fair enough... and yeah they are snapped together properly... its fine the first time... but not when you die and reload and go there again coz i have to use coc, there on in i have issues mentioned... so an error has probs occurred maybe... or maybe ill continue with everything more, optimize it more... double check my render and portal boxes... and finalize the whole 74a part... test it and see if it works better... and im trying to avoid loading from fomm just coz i wanna play it but with windows live so i can get achievements etc... of course i could get achievements and then play again without live... but yeah anyways... i think i downloaded fo3edit... ill look at the tutorial wherever it is and see if i can fix it... if my plans of finalizing doesnt work... still go stuff to do... Link to comment Share on other sites More sharing options...
spammster Posted October 29, 2009 Share Posted October 29, 2009 you do realize that GFWL and FOMM work together right ? FOMM only offers the option to get rid of GFWL (which is a good thing, caue GFWL is a pain) and you should hit up: archive invalidate invalidation, since you use custom textures you need it (though i assume you already use it) Link to comment Share on other sites More sharing options...
ChrisPydtank Posted October 29, 2009 Author Share Posted October 29, 2009 yes and well no i loaded fomm and played the game and it wouldnt start... yes i hear its a pain... but i like the achievements and its easier with my save files then manually fixing it to get it going on norm... Link to comment Share on other sites More sharing options...
ChrisPydtank Posted October 29, 2009 Author Share Posted October 29, 2009 ok damn you it worked lolz :wallbash: >:( :glare: THATS NOT THE POINT... maybe it is... im gonna check the game now... Link to comment Share on other sites More sharing options...
Recommended Posts