67433ad687db4

67433ad6893fa
1 Guest is here.
 

Topic: Tweq Question Read 1780 times  

67433ad6897b6Yankee Clipper

67433ad68982c
Isn't there a way to use one of the tweq properties to convert an object from one thing to another via DML? I have a grenade launcher that secretly wants to be a fusion cannon.

67433ad689b62voodoo47

67433ad689bb9
I'm not aware of a specific (tweq, or other) prop that would destroy the orig item and spawn a different item in its place upon activation (actually slay object and fliderize whatever is needed from its corpse), so I would just take the orig item, remove physics, set it to not rendered, move it up a notch or two, convert it into an emitter trap (make sure to set it to NOT inherit scripts), and use it to spawn the desired item upon sim (or any other suitable event, but make sure it can fire only once).

similar setup is used in the ss2tool dml fixes to spawn a hazard suit for newbie use in botm;
Code: [Select]
//lets use one of those redundant ambients to spawn a vacc suit
ObjProp 1450 "Position"
{
"Location" 118, -108, 5.55
}
+ObjProp 1450 "Scripts"
{
"Script 0" TrapTweq
}
+ObjProp 1450 "CfgTweqEmit"
{
"Halt" Stop Tweq
"AnimC" Sim
"Rate" 1000
"Max frames" 1
"Emit what" Vacc Suit
}
+ObjProp 706 "Scripts"
{
"Script 0" TriggerDestroy
}
+Link 706 1450 "SwitchLink"
{
}
+ObjProp 1450 "DiffPermit"
{
"quest var values" 1, 2
}

it's spawned when the player destroys the first membrane (at that point, I didn't want to mess around with sim activation or similar).


//just resolved a similar problem in T1, here is the dml;
Code: [Select]
//the broken zombie cannot be fixed, so lets turn him into an emitter and spawn another zombie
-ObjProp 855 "PhysType"
ObjProp 855 "Position"
{
    "Location" 19.3684, -93.0408, 31.98
}
+ObjProp 855 "Scripts"
{
    "Script 0" TrapTweqEmit
    "Script 1" ""
    "Script 2" ""
    "Script 3" ""
    "Don't Inherit" true
}
+ObjProp 855 "CfgTweqEmit"
{
    "Halt" Destroy Obj
    "Rate" 1
    "Max frames" 1
    "Emit what" Zombie
}
+ObjProp 855 "StTweqEmit"
{
"AnimS" On
}

this basically moves the orig obj up (there needs to be enough space or the new object will not be spawned), spawns the new object, and destroys the emitting object - pretty much exactly what you want.
« Last Edit: 01. February 2018, 18:38:01 by voodoo47 »

67433ad689c8dYankee Clipper

67433ad689cdd
Beautiful!

Just for giggles I tried it (zombie method) without the repositioning, and it still worked.

67433ad689d76voodoo47

67433ad689dc1
it will work as long as there is enough space.

67433ad689e67voodoo47

67433ad689eb6
necromancy - seems like adding the TrapTweqEmit script is actually not required.
« Last Edit: 05. January 2017, 19:12:07 by voodoo47 »
1 Guest is here.
It’s the ‘Party of the Year,’ but the Mood May Be Somber
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
67433ad68af8d