67431eb3f12c4

67431eb3f233d
1 Guest is here.
 

Topic: Tweq Question Read 1777 times  

67431eb3f2676Yankee Clipper

67431eb3f26e9
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.

67431eb3f2a3dvoodoo47

67431eb3f2a98
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 »

67431eb3f2b59Yankee Clipper

67431eb3f2bad
Beautiful!

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

67431eb3f2c51voodoo47

67431eb3f2c9d
it will work as long as there is enough space.

67431eb3f2d61voodoo47

67431eb3f2db7
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.
Azure Sheep Features: Girls! In Black Mesa
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
67431eb401fca