MorganKnives Posted February 10, 2010 Share Posted February 10, 2010 EDIT: Never mind, I had a weird problem and restarting helped it somehow (magic?). Link to comment Share on other sites More sharing options...
portbash Posted February 15, 2010 Share Posted February 15, 2010 how to make an object to use its MenuMode related scriptcode on inventory use? BEGIN OnActivate if MENUMODE == 1002 do code else activate endif endisn't doing the thing. is it possible at least? :mellow: edit:anyone? Link to comment Share on other sites More sharing options...
ElijahHouck Posted February 19, 2010 Share Posted February 19, 2010 I'm having a random encounter function (similar to Talon Co. or the Regulators), but I want it to only appear every 3 days. I can't get anything to do with GameDaysPassed to work, since that deals with how many days have passed since the start of the game itself... any ideas?The rest of the script is fine, but the only part I need is the timer part of it itself. A normal timer won't work, since that's in seconds and I need days. (unless I set the timer to like 86000 or something :P ) Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted February 20, 2010 Share Posted February 20, 2010 Set a variable to gamedayspassed, then compare gamedayspassed to that variable. Make sense? short encounterstart Begin GameMode set encounterstart to gamedayspassed if gamedayspassed - encounterstart >= 3 do encounterstuff set encounterstart to gamedayspassed endif End something like that Link to comment Share on other sites More sharing options...
pkleiss Posted February 20, 2010 Share Posted February 20, 2010 Well, 1 game day is 2880 real seconds, so 3 days would be 8640 seconds using getsecondspassed. You could also use gamedayspassed by storeing the value when the script fires, then comparing that to the current gamedays passed like this: If Lastdate + 3 > gamedayspassed Where LastDate is set to GameDaysPassed in the code segment where you fire off your encounter. Link to comment Share on other sites More sharing options...
ElijahHouck Posted February 20, 2010 Share Posted February 20, 2010 Set a variable to gamedayspassed, then compare gamedayspassed to that variable. Make sense? short encounterstart Begin GameMode set encounterstart to gamedayspassed if gamedayspassed - encounterstart >= 3 do encounterstuff set encounterstart to gamedayspassed endif End something like that Well, 1 game day is 2880 real seconds, so 3 days would be 8640 seconds using getsecondspassed. You could also use gamedayspassed by storeing the value when the script fires, then comparing that to the current gamedays passed like this: If Lastdate + 3 > gamedayspassed Where LastDate is set to GameDaysPassed in the code segment where you fire off your encounter.Both of these are good ideas, I'll try these out! Link to comment Share on other sites More sharing options...
Cipscis Posted February 20, 2010 Author Share Posted February 20, 2010 @thefourwings:Have you tried using GetDeadCount? @mytheos:If I remember correctly, you can create non-script archetype base effects that deal damage over time. @portbash:MenuMode doesn't work like that as a function. Because it's possible for multiple MenuModes to be active at the same time, you need to pass the relevant code to MenuMode as a parameter. It will return either 1 or 0:if MenuMode 1002@EMH:Always keep in mind that "TimeScale" can be changed. GetSecondsPassed should only ever be used for measuring time in real seconds, and only for relatively short timers. Using GameDaysPassed is the way to go here, although I'd recommend storing the finishing time in a variable so that you don't need to perform an extra operation every time you check if it has been reached:set fFinishTime to GameDaysPassed + 3 ... if GameDaysPassed > fFinishTimeCipscis Link to comment Share on other sites More sharing options...
nexus01 Posted February 20, 2010 Share Posted February 20, 2010 Hallo everyone, I just have question about my script which doesn't have worked. It is for the "cutscene" in my mod. Problem is, that I was trying to create cutscene which does the following: Flashback-like effect, player controls disabled, Imagespace modifier (looks like hallucination), after some seconds, player will be able to move around, and then, scene will end, and controls will be enabled and IMOD disabled. Also, player will have some Scriptpackage which makes him to "Fall down". For some reason, this scene has every time some error/bug in it: like the flashback-effect and sound will work but, then no other things will happen. Or even more annoying, the cripplehead-sound will be playing continuously with LOUD vloume, making me to turn the volume off. I thought I haven't understood how to set up the timer. Any clearance will be appreciated. :thanks: :whistling: scn LQ01StartScript float timerA short Startup float timerB float timerC short falldown begin ontriggerenter player ; This is the timeframe from start to the actual flash. if startup == 0 playsound3d FXExplosionGrenadeConcussion set falldown to 1 player.addscriptpackage MQ08PlayerFallsDownPackage imod MQ08FadeInFromWhiteISFX pipboyradiooff disableplayercontrols 1 1 1 1 0 1 1 set timerA to 3 set startup to 1 endif End begin gamemode if timerA < 0 ; This is the function series which sets on the ImageSpaceModifier. imod explosioninface set timerB to 7 set startup to 2 else Set TimerA to ( TimerA - GetSecondsPassed ) endif End begin gamemode ; This enables player moving around, while feeling like if the player was having headache. ;) if startup == 2 if ( TimerB < 0 ) player.removescriptpackage MQ08PlayerFallsDown enableplayercontrols 0 1 1 1 0 0 1 player.playsound FXCrippleHead set timerC to 7 else Set TimerB to ( TimerB - GetSecondsPassed ) endif endif End begin gamemode if ( TimerC < 0 ) ; Here IMOD will be disabled and player will be able to move around (full controls). rimod explosioninface enableplayercontrols set startup to 3 else Set TimerC to ( TimerC - GetSecondsPassed ) endif End Link to comment Share on other sites More sharing options...
thefourwings Posted February 20, 2010 Share Posted February 20, 2010 Cipscis, thanks for the follow-up. I saw GetDeadCount in the wiki and wondered if that might do what I wanted. Does it return the number of specified creature dead within that interior cell? If my creature in question is only used in this particular cell, would I populate the cell with them and then attach an onDeath script to the base creature that checks to see if getdeadcount equals the total number I've created in the cell? Link to comment Share on other sites More sharing options...
thefourwings Posted February 20, 2010 Share Posted February 20, 2010 Another (hopefully) quick question: what script function do I use to cancel/fail a quest objective? Link to comment Share on other sites More sharing options...
Recommended Posts