Vox Kalam Posted April 27, 2007 Share Posted April 27, 2007 almost done with one mod, just one last issue. How do you make a placeable exit? Specifically, make it blow up after a conversation? Link to comment Share on other sites More sharing options...
stoffe Posted April 27, 2007 Share Posted April 27, 2007 almost done with one mod, just one last issue. How do you make a placeable exit? Specifically, make it blow up after a conversation? You can deal damage to placeables like normal if they aren't Plot or Static-flagged. I think applying EffectDeath() will destroy it too. If you just want to remove it you can use the DestroyObject() script command. For example: void main() { object oPlaceable = GetObjectByTag("[color=Yellow]MyPlaceableTag[/color]"); effect eBoom = EffectVisualEffect( VFX_FNF_GRENADE_FRAGMENTATION ); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eBoom, GetLocation(oPlaceable)); DestroyObject(oPlaceable, 0.5, TRUE); } (MyPlaceableTag should be set to the tag of the placeable.) Link to comment Share on other sites More sharing options...
Vox Kalam Posted April 27, 2007 Author Share Posted April 27, 2007 Thanks. Now I just encountered a glitch... grr... How come I set up a conversation for the placable, but every time the PC selects it, and trie to interact with it...nothing happens? Link to comment Share on other sites More sharing options...
stoffe Posted April 27, 2007 Share Posted April 27, 2007 Thanks. Now I just encountered a glitch... grr... How come I set up a conversation for the placable, but every time the PC selects it, and trie to interact with it...nothing happens? You'll need to put the name of a script file in the OnUsed event slot on the placeable that starts the conversation when the placeable is used. A simple script like this should work: void main() { ActionStartConversation(GetLastUsedBy()); } That would start conversation with the one using the placeable using the DLG file set in the placeable template. Also make sure the placeable is not set as Static, and has the Usable and Party Interact checks set. Link to comment Share on other sites More sharing options...
Vox Kalam Posted April 27, 2007 Author Share Posted April 27, 2007 Ktool won't let me compile the script, what do I have to add to it, exactly? Link to comment Share on other sites More sharing options...
stoffe Posted April 27, 2007 Share Posted April 27, 2007 Ktool won't let me compile the script, what do I have to add to it, exactly? Gah, typo... the opening { after the function name was missing. It's been fixed in the above post. Link to comment Share on other sites More sharing options...
Vox Kalam Posted April 27, 2007 Author Share Posted April 27, 2007 ok, thanks Last one, I promise. The script to equip an item that's in your inventory isn't compiling. This is what I'm using: void main() { AssignCommand(GetFirstPC(), ActionEquipItem("g_w_lghtsbr01", 4); }QUOTE] It keeps saying syntax error at ";". Unexpected, this is...and unfortunate. Link to comment Share on other sites More sharing options...
tk102 Posted April 27, 2007 Share Posted April 27, 2007 should be AssignCommand(GetFirstPC(), ActionEquipItem("g_w_lghtsbr01", 4)); missing an extra paranthesis at the end Link to comment Share on other sites More sharing options...
Vox Kalam Posted April 27, 2007 Author Share Posted April 27, 2007 Error: Type mismatch in parameter 1 in call to "ActionEquipItem" Error: Required argument missing in call to "AssignCommand" Frrrrtshewith@!$#$... Link to comment Share on other sites More sharing options...
tk102 Posted April 28, 2007 Share Posted April 28, 2007 Ha, ha, oh sorry... it's a Friday. If you already possess the item: AssignCommand(GetFirstPC(), ActionEquipItem(GetItemPossessedBy(GetFirstPC(),"g_w_lghtsbr01"), 4)); if you need to spawn the item first... AssignCommand(GetFirstPC(), ActionEquipItem(CreateItemOnObject("g_w_lghtsbr01",GetFirstPC()), 4)); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.