Jump to content

Need a script? Maybe I can help.


fg109

Recommended Posts

I made another topic not long ago and no one posted. Didn't see this topic or I would have just posted here. I'm a noob and I can't figure out fast travel.

 

http://www.creationkit.com/FastTravel_-_Game

 

Example: Game.FastTravel(HomeMarker)

 

What do I use in place of HomeMarker? Is it the map marker ID? Marker name? I tried both and it didn't work but I may have done it wrong.

Link to comment
Share on other sites

  • Replies 272
  • Created
  • Last Reply

Top Posters In This Topic

Thanks for telling me where I have to start for my weightsystem-change-script and telling me about the mod fg109.

 

@gasti and bobby: Gasti should be right. The =! should mean "uneven". So 1+1=2 and 1+2=!2 are both right. I hope you get what I mean. So it checks if the actor was already revived by this script or not.

Link to comment
Share on other sites

  On 4/16/2012 at 6:22 AM, fg109 said:

So whenever you want to sit, just call the function "SitAt(Game.GetPlayer())" if you want the player to sit at the exact spot he/she is currently standing, or else "SitAt(SomeTarget)" to sit at SomeTarget.

 

I haven't tried it out, so I don't know if the player really does send an "IdleFurnitureExit" event when he/she gets out of a chair.

 

Thanks for going above and beyond what I asked you to do.

 

Your script calls this function "PlaceAtMe(ChairInvisibleSingle)" I'm under the impression that only actors and activators can be moved. (http://www.creationkit.com/Complete_Example_Scripts, Move an Object to a Specific Location Without Fade) I've actually been playing with the "moveto" function, and "ChairinvisibleSingle" is static and can't be moved. I'll be testing "Placeatme" to see if it works better than "moveto".

 

I'm looking forward to testing the script. if anything it has given me some new ideas of how to make it work. Thanks

 

ADDED COMMENT:

CK Wiki had this to say about "Placeatme" "Note: the akFormToPlace can be things such as MiscItem, Actor, ActorBase, etcetera, but it cannot be an ObjectReference" http://www.creationkit.com/PlaceAtMe_-_ObjectReference

Thought I'd look it up before I tested it. It is not meantioned whether or not STATICS can be used.

Edited by leedavis
Link to comment
Share on other sites

@hydralisk77

 

Have you tried experimenting with the Hold type AI packages? If you are sure you want to use scripting, I can think of a couple ways to do it. The easiest way to do it would be to disable the gladiators' AI until the fight starts, but I am not sure you want that, since that also disables any animation or movement.

 

You can also place a collision cube around the gates and change the collision layer to L_Navcut. This will disable any navmesh that it intersects, which should prevent the navmesh jumping you're seeing. So this collision cube should be enabled while the gates are closed, and disabled when the gates are opened. (Just keep increasing the size until the NPCs can't get past it.) I don't know if it'll actually work though since from my experience, NPCs in combat has no need of navmesh to move around.

 

 

  Reveal hidden contents

 

 

So if you want to go with enabling/disabling the actors' AI, set AIMode to true, otherwise if you want to go with using collision cubes, set AIMode to False. Fill the GroupA and GroupB arrays with the gladiators from each team. If you're using collision cubes, then fill the EnableObjects array with the collision cubes.

 

As for your second request with the execution, I would have to take a look at the main quest to see how it's done. I suspect that they use a scene though, and I haven't done anything with that before.

 

EDIT: Forgot to mention that I'm assuming the gates you're using are actually the PortGatePole01 activators, and that you have a lever set up as their activate parent.

Edited by fg109
Link to comment
Share on other sites

OK, I think I have the script but I can't get it to work because Creation kit is being a (censored). I have looked through your links to Hello World and the other one, but they didn't mention the issue I have.

 

I've been working on a mod, and I'm now at the final stage. I need to find a way to make a perk edit a global variable. I've been looking for it for quite some time, and had given up on it, leaving my mod behind.

 

But then I accidentally found a way.

 

The solution was within one of the perks. The perk pointed to something called "PerksQuest" in the creation kit. I open PerksQuest, and go to scripts. I found the solution, the script was there! Here are the contents of it.

 

 

  Reveal hidden contents

 

 

I quickly began changing it to what I needed. This is just a test, and just to see if it's going to work I only used one of my Global Variables. It seemed easy enough, and I ended up with this. I saved the script, and tried to compile it. Success.

 

 

  Reveal hidden contents

 

 

By now, I have a compiled script, ready to be attached to my own "PerksQuest". I have created my own quest to avoid any compatibility issues. I them go to scripts and attach my script. I attached it, and edited the properties to point to the global variable - zHOGarlicGlobal. (Ok, I will explain later why this garlic thing is important to my mod. I'll tell you now, the "z" in the name is to put the object to the bottom of the creation kit window, for me easy to sort and find. The HO stands for my mod - Harvest Overhaul.)

 

Having the script attached, I go into the quest Stages and create a blank quest stage 10. I remembered looking at what the original "perksquest" has to make the quest stages work and change the global variables. So I go and drop in this to the "papyrus fragment" bit in the creation kit.

 

 

  Reveal hidden contents

 

 

I think I'm done here, as it looks exactly like what the original PerksQuest has. I press OK.

 

  Quote
Starting 1 compile threads for 1 files...

Compiling "QF_zHOPerksQuest_01009F48"...

c:\games\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_zHOPerksQuest_01009F48.psc(10,0): variable GlobalzHOGarlicGlobal is undefined

c:\games\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_zHOPerksQuest_01009F48.psc(10,22): none is not a known user-defined type

No output generated for QF_zHOPerksQuest_01009F48, compilation failed.

 

Batch compile of 1 files finished. 0 succeeded, 1 failed.

Failed on QF_zHOPerksQuest2_01009F48

 

I'm sorry, what? I already have the script and everything, and I inserted exactly the same thing what the original PerksQuest has.

Example -

  Reveal hidden contents

 

 

I do not want to create a new script or compile it, I already have it. Why can't the Creation kit understand this? I have tried some other things similar to this, including copy/pasting the whole script in the papyrus fragment window, but with the same outcome.

 

What should I do? Am I connecting the script wrong to the quest? Have I written the script wrong? The same script works for the perksquest, it should work for this. Oh, and I tried loading up the original PerksQuest and pressing Compile. It doesn't give any errors. What's going on?

Link to comment
Share on other sites

@ gasti

 

http://www.creationkit.com/Bethesda_Tutorial_Papyrus_Events_and_Properties

 

This could shed some light as the example within states that draugr keep on resurrecting unless debugged.

So I'm guessing the resurrection stops because the number after an even number is uneven ?

__________

 

Please don't forget about me fg109 pretty please :)

 

PS reply system bugged?

Edited by bobbythecamel
Link to comment
Share on other sites

  On 4/16/2012 at 12:44 PM, Fury945 said:

Hi,

 

Is it possible to script a spell so that it adds an effect (say like a disease) to the player,

e.g. the player casts this spell and it does masses of damage to his opponent but adds an incurable (by normal means) disease to the player?

 

I'd like to know this because I'm working on a construct race (e.g. an Android, it'd have to be Dwemer in origin) and I'd like them to be able to sacrifice a little bit of their energy/power/electricity (health) to hurt their enemies and then have to find a specific object to recharge them (most likely a power cell).

 

 

Thanks

 

This is possible, but it will require a scripted ability as well. So when you cast the spell, you add the scripted ability to the player. The scripted ability will keep checking the player to see if he has the disease, if not then it will add the disease to the player. You need the ability because diseases can be dispelled by a Cure Disease potion or a shrine. So as soon as your disease is dispelled, the scripted ability would re-apply it.

 

Your recharging activator should remove the ability and the disease from the player when activated.

Link to comment
Share on other sites

@bobbythecamel

 

You will need two scripts, one for the container and one for the dummy objects.

 

 

  Reveal hidden contents

 

 

 

  Reveal hidden contents

 

 

Also, ghasti is right. The "if !Revived" is to check whether or not the actor has been resurrected by the script already.

Link to comment
Share on other sites

  On 4/16/2012 at 2:35 PM, ChampionOfHircine said:

I made another topic not long ago and no one posted. Didn't see this topic or I would have just posted here. I'm a noob and I can't figure out fast travel.

 

http://www.creationkit.com/FastTravel_-_Game

 

Example: Game.FastTravel(HomeMarker)

 

What do I use in place of HomeMarker? Is it the map marker ID? Marker name? I tried both and it didn't work but I may have done it wrong.

 

You would have to declare a property for HomeMarker. So a part of your script would look like this:

 

ObjectReference Property HomeMarker Auto

;Some event start
Game.FastTravel(HomeMarker)
;End of some event

 

In my first post I put a link to the wiki page explaining how to set values to the properties.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...