Deleted804086User Posted June 11, 2009 Share Posted June 11, 2009 Trying to set up a radio signal like the ones you find through out the wasteland, hit the power and the signal should activate, however so far I am unable to activate the radio or the power switch. This is the script I have used. scn FFAlertRadioSignalSCRIPT short doOnceshort switchActiveshort runSoundTimerfloat soundDelayTimerref switchref radioref radioNoPowerref questref signal short init ; set to 1 when onLoad block has run -- otherwise the rest of the script will not run for safety begin onLoad set init to 1 ; initialized -- safe to run rest of script if getIsID FFRadioAlertSignal01Switch01 || getIsID FFHamAlertRadio01 set switch to FFRadioAlertSignal01Switch01 set radio to FFHamAlertRadio01 set radioNoPower to FFHamAlertRadioNoPower01 set quest to RadioAttackAlert set signal to FFRadioAlertSignal01REF endif if getIsID radio == 1 && doOnce == 0 setOpenState 1 ; switch ham radio model to "on" position radioNoPower.setOpenState 1 ; switch radio model that is enabled before the power is restored to "on" position set doOnce to 1 endif set soundDelayTimer to 0.85end begin onActivate ; if I haven't been initialized, not safe to run my script if init == 0 return endif if getIsID switch == 1 ; activate block for power switch in tower if getStage quest == 0 ; if the main switch has never been activated radioNoPower.disable ; disable radio model enabled before power is on, which enables the real radio setOpenState 1 ; start switch anim to catch later. set switchActive to 1 set runSoundTimer to 1 ; queue radio power up sound setStage quest 1 ; quest has run endif endif if getIsID radio == 1 ; activate block for broadcasting HAM if isAnimPlaying == 0 if getQuestRunning quest == 1 ; only works if quest is active stopQuest quest ; turn off the signal (for good) signal.disable elseif getStage quest == 1 ; if the main switch has been activated startQuest quest signal.enable endif activate endif endifend begin gameMode ; if I haven't been initialized, not safe to run my script if init == 0 return endif if runSoundTimer == 1 if soundDelayTimer > 0 set soundDelayTimer to soundDelayTimer - getSecondsPassed else set runSoundTimer to 0 playSound OBJRadioTowerActivate ; play radio power up sound endif endif if switchActive == 1 ; flagged from acti. block if getOpenState == 1 ; wait until I'm open startQuest quest ; then start up the radio station signal.enable set switchActive to 0 ; flag me off endif endifend Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.