Jump to content

NPC starts a fire. No magic involved. Ideally no traps either. Help.


antstubell

Recommended Posts

In a previous thread I asked how to get a NPC to drop a torch - got that sorted out. Now I need the dropped torch to ignite the oil pools he is standing in. I've considered traps but don't want the visual of a trap being set off. Player has no access to magic, neither do NPCs in my mod, so no spells allowed.

Ideally the dropped torch would be the ignition source.

Help and advice appreciated.

Edited by antstubell
Link to comment
Share on other sites

- Create a trigger box with 'Trigger' type layer, to cover all the space you need to have the torch triggering the fire, the trigger box should be low in height, i think this is obvious...

- In the trigger box add a simple script.

Example:




Light Property MyTorch Auto
ObjectReference Property MyOilPool Auto

EVENT OnTrigger(ObjectReference akActionRef)
If ( akActionRef == MyTorch as ObjectReference )
GoToState("AllDone")
MyOilPool.Activate(Self)

; Or whatever else you intend on doing to start the fire
EndIf
ENDEVENT


STATE AllDone
;
ENDSTATE



The 'State AllDone' must be called immediately because the "OnTrigger" event will fire multiple times once the object is inside the trigger box.


Good night.

Edited by maxarturo
Link to comment
Share on other sites

I got this to compile but I have no idea if it will actually work...

 

 

Scriptname AAA_SomeScript Extends ObjectReference

Light Property MyTorch Auto
ObjectReference Property MyOilPool Auto

EVENT OnTrigger(ObjectReference akActionRef)
      If ( akActionRef as Form == MyTorch as Form )
           GoToState("AllDone")
           MyOilPool.Activate(Self)
           ; Or whatever else you intend on doing to start the fire
   EndIf
ENDEVENT

STATE AllDone
    ;
ENDSTATE

 

 

 

Link to comment
Share on other sites

Ishara - Yes compiles but unfortunately nothing happens.

 

Light Property MyTorch Auto
ObjectReference Property MyOilPool Auto

EVENT OnTrigger(ObjectReference akActionRef)
If ( akActionRef as Form == MyTorch as Form )
GoToState("AllDone")
MyOilPool.Activate(Self)
debug.notification("Whoosh!")

; Or whatever else you intend on doing to start the fire
EndIf
ENDEVENT

STATE AllDone
;
ENDSTATE

 

I've tried every type of Collision Layer for the primitive but no success.

Link to comment
Share on other sites

Try this instead:

 

Light Property MyTorch Auto
ObjectReference Property MyOilPool Auto

EVENT OnTrigger(ObjectReference akActionRef)
    Form Base = akActionRef.GetBaseObject()
    
    If Base as Light 
        If Base == MyTorch
            GoToState("AllDone")
            MyOilPool.Activate(Self)
            debug.notification("Whoosh!")

            ; Or whatever else you intend on doing to start the fire
        Endif
    EndIf
ENDEVENT

STATE AllDone
;
ENDSTATE
Link to comment
Share on other sites

  • Recently Browsing   0 members

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