67433bdc74542

67433bdc759fe
2 Guests are here.
 

Topic: Tweq Question Read 1781 times  

67433bdc75d60Yankee Clipper

67433bdc75dca
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.

67433bdc760cdvoodoo47

67433bdc76120
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 »

67433bdc761d8Yankee Clipper

67433bdc76222
Beautiful!

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

67433bdc762aavoodoo47

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

67433bdc7636dvoodoo47

67433bdc763c1
necromancy - seems like adding the TrapTweqEmit script is actually not required.
« Last Edit: 05. January 2017, 19:12:07 by voodoo47 »
2 Guests are here.
who are you? you are a cat
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
67433bdc77410