Hi all, I decided to take up the Dark Sky Enterprises mission after all.
I need to call a script when a specific ship (a Black Wyvern) is destroyed by the player. This script should simply raise a mission variable of the number of Black Wyverns destroyed total, and of a mission variable of the number of BWs destroyed in this stage of the mission.
How exactly do I do that?
How to call script when ship is destroyed
Moderators: winston, another_commander
-
- ---- E L I T E ----
- Posts: 503
- Joined: Sat Jun 11, 2011 7:46 pm
- Mauiby de Fug
- ---- E L I T E ----
- Posts: 847
- Joined: Tue Sep 07, 2010 2:23 pm
Re: How to call script when ship is destroyed
Call the shipDied event handler from the Black Wyvern's ship script.
You'll find the wiki javascript reference pages very useful...
You'll find the wiki javascript reference pages very useful...
-
- ---- E L I T E ----
- Posts: 503
- Joined: Sat Jun 11, 2011 7:46 pm
Re: How to call script when ship is destroyed
Thank you. Yup, I've been hunting through those. Not easy to trudge through everything at this point, but I'll become more familiar with it in time.
- Mauiby de Fug
- ---- E L I T E ----
- Posts: 847
- Joined: Tue Sep 07, 2010 2:23 pm
Re: How to call script when ship is destroyed
Don't worry. When I get around to doing bits of scripting or looking through other peoples' scripts, I always have them open as a reference. I usually know where to look and what I'm looking for, but I don't recall specific details about things. You get more familiar with them the more you do.