Jump to content

Help with keyword based Script


MPankey

Recommended Posts

Err you still need a script, you prob need more scripts but the functionality would be better.

 

Not 100% on what you are doing exactly but ya check refcollections

 

You can just make the mines ininit add to the refcol, and on disable remove from the ref col. Then on your animation check for whatever your detonator is run a timer on the refcol alias at 0, 0 so it goes instantly, then a ontimer function on the ref col 'should' work per item, not 100% on that one. you might have to run a self.getat(1) etc for the ref col array and get distance to player, if distance is <= whatever, self.placeatme(explosion) self.disable() self.removefromrefcol or whatever the line is.

 

That should get you on your way at least.

Link to comment
Share on other sites

While DD's method would definitely work, a potentially more efficient method might be to use an OnInit() function on your mines that uses RegisterForCustomEvent to let a Quest (or even potentially a script on your remote detonator) to tell the mines to explode (this also has the benefit of avoiding RefCollections and also the SendCustomEvent call runs in parallel). Once that custom event is sent to the mines and they are in range / have successfully exploded, you would then simply call UnregisterForCustomEvent.

Edited by Reneer
Link to comment
Share on other sites

While DD's method would definitely work, a potentially more efficient method might be to use an OnInit() function on your mines that uses RegisterForCustomEvent to let a Quest (or even potentially a script on your remote detonator) to tell the mines to explode (this also has the benefit of avoiding RefCollections and also the SendCustomEvent call runs in parallel). Once that custom event is sent to the mines and they are in range / have successfully exploded, you would then simply call UnregisterForCustomEvent.

Ya I'm still not exactly sure wtf is going on lol, refcol while loop would have framerate stutter IE each mine would go off at a diff frame at the least, prob .1 sec apart or so, each mine waiting for a animation would run in parralell and they would all go off at once. I think the staggered would be a cooler effect imo :P

Link to comment
Share on other sites

Ya I'm still not exactly sure wtf is going on lol, refcol while loop would have framerate stutter IE each mine would go off at a diff frame at the least, prob .1 sec apart or so, each mine waiting for a animation would run in parralell and they would all go off at once. I think the staggered would be a cooler effect imo :tongue:

Agreed.

Link to comment
Share on other sites

So I really love the idea, especially the added side effect of slightly staggered explosions, but most of what yall have been saying goes way above my head. What's your recommendations on where to learn more about what yall were talking about so I can actually use that idea? The creation kit wiki hasn't been that halepful so far, but that may just be because if bad orginization
Link to comment
Share on other sites

I would start by looking at the Creation Kit Wiki for Skyrim - that wiki contains a lot of good information on general Papyrus things. After that, look through the script sources and figure out what the various functions (especially related to ObjectReferences) do.

Link to comment
Share on other sites

Well, not that I do have any knowledge of how this all works - but just as a simple Idea / workaround - can't you just make the mines with a trigger radius of "0" so it would not be triggered at all, and than via script (trigger item) raise that radius to "something very large" so that the bloatfly on the other side of the map will still trigger it. Well and then the delay should be lower as well.

Link to comment
Share on other sites

As the one who wrote the current script (which doesn't work) I was under the impression (for some stupid reason) that OnInit was only called the first time the object was instantiated, which I realize now obviously isn't the case. I haven't quite gotten grasps of Quests yet but will look into it.

 

One question about RefCollectionsAlias (I assumes that's what you mean). If you have references to all mines in there, doesn't that make the mines persistent (never unload) or is that just for straight up defining them as properties?

 

I agree that the stagger effect would be cool but I think using CustomEvents is the better option, you could them stagger anyway based on the distance from you, which I think would be even better.

 

 

Please do shower me with information (if you have the time) as I don't have a PC capable of running the CK and game so I'm basing all my scripting off of the base scripts and CK wiki + any information I can find. Thanks for you help so far!

Link to comment
Share on other sites

Ok. We've fixed the detonator system but we don't know how to trigger a mine by script. These are just the vanilla mines duplicated.

We've tried:

  • DamageObject
  • Fire
  • FireTrap

 

Does anyone know how to do it or is it all native functions not available to Papyrus?

And in that case we'll need to write our own explosions with the placeAtMe(explosion) thing.

 

Edit: Activate didn't work either...

Edited by timtimman
Link to comment
Share on other sites

  • 1 month later...

Please post your script. :smile:

So we got the script working! Sorta.. we can throw a mine and then detonate it with the detonator. However after the first detonation any mine thrown immediately explodes. Timtimman, thinks this is because throwing the mine counts as a weapon fire so it triggers the explosion script. Any ideas how to work around this?

Here's the latest script: http://pastebin.com/kP1BU5PN

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...