LucasForums

LucasForums (http://www.lucasforums.com/index.php)
-   Holowan Laboratories (http://www.lucasforums.com/forumdisplay.php?f=324)
-   -   Remove from Inventory (http://www.lucasforums.com/showthread.php?t=210316)

darthbdaman 06-18-2012 02:04 AM

Remove from Inventory
 
I have been trying to remove the Blue Lightsaber from the inventory. The have no scripting ability, and the scripts I have used compile, but crash the game when they trigger. I have looked at various tutorials and tried multiple different methods, but they all seem to crash the game. I am triggering the script when Trask runs off to fight Bandon at the end of "end_cut01.dlg". Can anyone show me a script that works, or tell me why the game would crash when the script compiles?

Fallen Guardian 06-18-2012 04:42 AM

Here, this should work. It compiles all fine, though having never used this function, nor tried this out in-game I don't know if it works or not. But it should...

Code:

void main()
{

object oPC = GetFirstPC();

object oLightsaber = GetObjectByTag("g_w_lghtsbr01");

ActionTakeItem(oLightsaber, oPC);

}


darthbdaman 06-18-2012 05:05 PM

Thanks. I will try it.


All times are GMT -4. The time now is 11:10 AM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2011 - All rights reserved.