3 ..2 .. 1 .. Ignition!

Post » Wed Jun 20, 2012 3:39 pm

Hello all,

I am having a bit of bother with one of my papyrus scripts and hoped to get some help here!

What I have so far is;
  • A script that is used with newly created trigger box
  • Script option to use a an object in the render window as a 'fire trigger' - the 'TrapOilPool01' object is probably the best example for now.

What I want to do - it must be in the script attached to the trigger box and not a separate script for the oil trap;

  • If the oil trap is used (destroyed) then give a message to that effect - such as "You destroyed the oil trap."
Another way to put it;
  • My 'trigger' script has a property for 'oiltrapused'
  • I select that property
  • I 'Pick Reference in Render Window' and double click on the 'TrapOilPool01' object in the render window to select it
  • The script has to react if that oil trap is used - ignited - destroyed

Adding a notification or messagebox when the oil trap is destroyed (I'm not talking about 'disable' - I mean destroyed - as in gone for good kind of thing) is easy enough to do I just need to detect when the oil trap is destroyed (used).


I have tried 'GetCurrentDestructionStage' without luck and suspect that is because I am using a script property referenct to the 'TrapOilPool01' rather than the actual 'TrapOilPool01'.

So, If any of you can enlighten me as to how to do this, it would be a great help. (There is a pun in there somewhere!)

As some of you may have guessed, this is part of a bigger mod!

Edit: slight editions made and for formatting.
User avatar
Jimmie Allen
 
Posts: 3358
Joined: Sun Oct 14, 2007 6:39 am

Post » Wed Jun 20, 2012 4:19 pm

If you're not going to put a script on the oil trap itself, then I think you're going to have to use RegisterForUpdate() and keep checking the status of the oil trap in the OnUpdate() event.
User avatar
Sabrina Schwarz
 
Posts: 3538
Joined: Fri Jul 14, 2006 10:02 am

Post » Wed Jun 20, 2012 5:44 pm

If you're not going to put a script on the oil trap itself, then I think you're going to have to use RegisterForUpdate() and keep checking the status of the oil trap in the OnUpdate() event.

Thanks for the reply, its late and I need to stop for the night. Will check it out as soon as I can though.

UPDATE:

I think maybe I was going about this all the wrong way and will be / have been rethinking how to do what I want to.

I am very much still learning how to use the CK and Papyrus and I am able to compare Papyrus with other 'languages' I have used and I am begining to see different approaches to problems or, at least, how to better approach problems in my Papyrus script.

Again, thanks for the help. :)
User avatar
Chris Ellis
 
Posts: 3447
Joined: Thu Jul 26, 2007 10:00 am


Return to V - Skyrim