Jump to content

Activating a script through another one.


Xilante

Recommended Posts

On another thread I asked something similar but more complicated, thinking the problem was in the script(s) but then, by trying something much more simpler I realised that I fail to activate a script through another one so I hope you guys can point me in the right direction! =)

 

If by "Fail to activate a script through a script" didn't make much sense, I'll try to explain it a bit better:

 

Basically I have a script (in a disabled marker) which is:

 

Event OnActivate(ObjectReference akActionRef)
        Debug.MessageBox("It's working!")
EndEvent

 

So unless activated (and also have the marker get enabled) the message "it's working!" won't pop up, then...

The second script is:

 

ObjectReference Property Marker  Auto  

Event OnTriggerEnter(ObjectReference akActionRef)
  
            Marker.enable()
            Marker.Activate(Game.GetPlayer(), true)

EndEvent

 

So the second script is inside a trigger, and on trigger enter the marker gets enabled and then the script within should get activated but no message pops up, it compiles fine and all but it's as if it doesn't work and I don't know what I'm doing wrong.

 

I tried many different things too (Without true but it still didn't work, put akActionRef instead of getplayer but it didn't compile, so I put Marker.enable and marker.activate inside "if akActionRef == Game.GetPlayer() ... endif", it did compile but again, that message didn't popup).

 

And if you're wondering why I don't just put the message to popup on trigger enter (without calling a second script) it's because I can already do it and I need to learn how to activate a second script through another for what I really need to do (Which is the first thread I made).

 

Any help is welcome =) I'd be glad even if you could just point me to a tutorial explaining how to do what I'm looking for as in CKwiki I didn't find anything (Just scripting stuff explaining how Onactivate, etc. work and that's where I took the script from :P).

Link to comment
Share on other sites

Thanks! :D You definitively saved me from turning mad!

*Note to self: Never use markers for anything else but enabling parents*

Let me throw a kudo at you, thanks again!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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