I'm working on a superhero mod and I just completed a slew of abilities that don't need scripts. I'm now trying to make a script that lets you hotkey a targeted ability like Pyrokinesis. I'm using the fose hotkey code that is shown http://geck.gamesas.com/index.php/Useful_Scripts#Hotkey on the wiki and the targeted spellcasting script http://www.gamesas.com/bgsforums/index.php?showtopic=972091&view=findpost&p=14074294.
My questions are:
Is it possible linking these both together? I know to make the hotkey you have to attach the script to a quest.
How do I attach the targeted spellcasting script as well? The script I tried to write is below. When I just try to add the two scripts together it fails because I cant have the scripteffectstart block type on a quest script.
Is there a way to make one script start another?
scn PowerPackQuestScriptsShort sToggleshort oldlengthref targetshort countBegin GameMode if player.hasperk PerkTelekinesis == 1 if IsKeyPressed 46 != sToggle set sToggle to sToggle == 0 if sToggle ;Button pressed ;Do things when button 'p' is pressed, in this case, decrease karma set oldlength to GetNumericGameSetting iActivatePickLength SetNumericGameSetting iActivatePickLength 40000; Or w/e range you fancy set count to count + 1 if (count == 4);NOTE 1: after several testings, this seems the minimal amount of frames needed to update the crosshair ref set target to GetCrossHairRef target.SetRestrained 1 player.pushactoraway target 700000 SetNumericGameSetting iActivatePickLength oldlength endif else ;Button released ;Do things when button 'p' is released, in this case, increase karma player.pushactoraway target 700000 target.setrestrained 0 SetNumericGameSetting iActivatePickLength oldlength endif endif endifEnd
The only thing that ive been able to do with the above script is let me access containers and talk to people who are super far away. Which is effectively line of sight telekinesis and telepathy but I don't think it is a practical use as a power in the fallout world I really wanted the above script to halt someone in place for a second and send them flying when i let the key go.
Thanks for any help or insight you can provide in advance. I want to make as many powers as possible and as soon as I move passed this wall the possibilities will be grande.