Rafahil Posted July 29, 2009 Share Posted July 29, 2009 ok, I got it till the last one, how do I create a "Start Quest Enabled" quest? Link to comment Share on other sites More sharing options...
Cipscis Posted July 29, 2009 Author Share Posted July 29, 2009 Just the same way as any other quest, the important part being that you tick the box next to "Start Game Enabled". This will ensure that the script will run automatically when the game is loaded, as opposed to only running once StartQuest has been called on it. Cipscis Link to comment Share on other sites More sharing options...
Rafahil Posted July 29, 2009 Share Posted July 29, 2009 yeah I understand that, but sorry what I meant was with the script. I opened a new script from the Quest Data tab and pasted the code: Begin GameMode player.AddSpell <GlowEffectAbility> StopQuest <AddAbilityQuest> End then I tried to save the script, but it won't let me. Also what type is the script going to be? object, effect or quest? umm am I missing something? (i'm a noob when it comes to scripts...) Link to comment Share on other sites More sharing options...
Cipscis Posted July 29, 2009 Author Share Posted July 29, 2009 You'll want to attach this script to the quest that you just created, so it should be a "Quest" script. "<GlowEffectAbility>" and "<AddAbilityQuest>" are placeholders for the EditorIDs that you've assigned to your ability and quest. I often use this format to denote placeholders in code, but I really should have explained that before - sorry about that. If you want to learn more about scripting, including things like when to use each type of script and the differences between them, have a look at my Scripting for Beginners tutorial. Cipscis Link to comment Share on other sites More sharing options...
Rafahil Posted July 29, 2009 Share Posted July 29, 2009 Yes! I made it work. Thanks a lot Cipscis you are truly the master of scripts :) i'll be releasing it later today for those who care. Link to comment Share on other sites More sharing options...
HugePinball Posted August 2, 2009 Share Posted August 2, 2009 @ Rafahil & Cipscis I just read over my weekly digest of this thread and wondered if this method would work for you as well. This is a script to apply an Imagespace Modifier to sunglasses:ScriptName SunglassesScript short sIsActive Begin OnEquip player ApplyImageSpaceModifier ISMSunglasses set sIsActive to 1 End Begin OnUnequip player RemoveImageSpaceModifier ISMSunglasses set sIsActive to 0 End Begin OnDrop player if sIsActive RemoveImageSpaceModifier ISMSunglasses set sIsActive to 0 endif EndWouldn't that work if you used "player.pms DLC03GhoulFXShader" and "player.sms DLC03GhoulFXShader" in place of the ISM commands? Link to comment Share on other sites More sharing options...
eleglas Posted August 2, 2009 Share Posted August 2, 2009 Hi guys, I'm trying to make a script which when I push the 'H' button, my cloaking device activates, but I have no idea how to write this in script. I have tried looking on the forums for similar questions, no luck, but if someone could help, I would really appreciate it! Thanks guys! Link to comment Share on other sites More sharing options...
eleglas Posted August 2, 2009 Share Posted August 2, 2009 Come on guys! I really need this answering!! Link to comment Share on other sites More sharing options...
Cipscis Posted August 2, 2009 Author Share Posted August 2, 2009 @HugePinball:Yeah, that should work perfectly well, but I prefer to use effect scripts when dealing with apparel, as this allows it to be equipped and unequippied via script without any issues - OnEquip blocks won't run when the scripted item is equipped via EquipItem. @elegas:Please don't bump a question so soon. I was asleep when you asked it so couldn't answer quickly, but that doesn't mean your question isn't going to be answered. In order to do this, you'll need to use FOSE's IsKeyPressed. Here is some basic code that I use to check for keypresses, using the N key as an example:int bIsNPressed Begin GameMode if bIsNPressed != IsKeyPressed 49; N set bIsNPressed to bIsNPressed == 0 if bIsNPressed ; N has been pressed else ; N has been released endif endif EndCipscis Link to comment Share on other sites More sharing options...
eleglas Posted August 2, 2009 Share Posted August 2, 2009 I got it kinda working, it equips when I push Q (changed cos its easier to reach), however, I have to hold the button to keep the cloak equipped. How can I fix it so It toggles and I don't have to hold it? Here's my code: SCN 01CloakX Begin GameMode If IsKeyPressed 16 Player.Equipitem CloakDevice Else Player.Unequipitem CloakDevice Endif Endif Endif END Thanks, Cipscis; your a lot of help! Link to comment Share on other sites More sharing options...
Recommended Posts